Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1992896.1992905acmconferencesArticle/Chapter ViewAbstractPublication PagesuccsConference Proceedingsconference-collections
research-article

Separating different responsibilities into parallel hierarchies

Published: 16 May 2011 Publication History

Abstract

The Tease Apart Inheritance is a big refactoring technique used to separate different responsibilities tangled along a class hierarchy. This refactorization associates two parallel hierarchies through their roots in order to use one from the other. The interface of the root class in the used hierarchy is commonly too general to be employed by the classes below in the parallel hierarchy, where a more specific behavior is needed. This paper describes a design that, using two parallel class hierarchies, allows recovering the specific interface of each corresponding class in the parallel hierarchy, improving the collaboration between both hierarchies. Although different implementations of the proposed design are discussed, the use of generics offers the robustness of static type checking and better runtime performance.

References

[1]
A. Appel and J. Palsberg. Modern compiler implementation in Java. Cambridge University Press, 2002.
[2]
P. Canning, W. Cook, W. Hill, W. Olthoff, and J. Mitchell. F-bounded polymorphism for object-oriented programming. In Proceedings of the fourth international conference on Functional programming languages and computer architecture, pages 273--280. ACM, 1989.
[3]
E. Ernst. Higher-order hierarchies. ECOOP 2003--Object-Oriented Programming, pages 109--156, 2003.
[4]
European Computer Manufacturers Association (ECMA). ECMA 335, Common Language Infrastructure (CLI), Partition IV: CIL Instruction Set, 4th Edition, 2006.
[5]
M. Fowler and K. Beck. Refactoring: improving the design of existing code. Addison-Wesley Professional, 1999.
[6]
C. Fraser and D. Hanson. A retargetable C compiler: design and implementation. Addison-Wesley Longman Publishing Co., Inc. Boston, MA, USA, 1995.
[7]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design patterns: elements of reusable object-oriented software, volume 206. Addison-wesley Reading, MA, 1995.
[8]
J. Hugunin. Bringing dynamic languages to. net with the dlr. In Proceedings of the 2007 symposium on Dynamic languages, pages 101--101. ACM, 2007.
[9]
JSR 294 Sun Microsystems, http://jcp.org/en/jsr/detail?id=294. JSR 294: Improved Modularity Support in the Java Programming Language, 2007.
[10]
T. Lindholm and F. Yellin. Java virtual machine specification. Addison-Wesley Longman Publishing Co., Inc., 1999.
[11]
B. Liskov. Keynote address-data abstraction and hierarchy. In ACM Sigplan Notices, volume 23, pages 17--34. ACM, 1987.
[12]
B. Liskov and J. Wing. A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems (TOPLAS), 16(6):1811--1841, 1994.
[13]
J. Meyer. Jasmin instructions. http://jasmin.sourceforge.net/instructions.html, 1996.
[14]
E. Nielsen, K. Larsen, S. Markert, and K. Kjaer. The expression problem in scala. Technical report, Technical Report, Aarhus University, May 2005.
[15]
M. Odersky and P. Wadler. Pizza into Java: Translating theory into practice. In Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 146--159. ACM, 1997.
[16]
F. Ortin and M. García. Union and intersection types to support both dynamic and static typing. Information Processing Letters, 111(6):278--286, 2011.
[17]
F. Ortin, J. Redondo, and J. Baltasar García Perez-Schofield. Efficient virtual machine support of runtime structural reflection. Science of Computer Programming, 74(10):836--860, 2009.
[18]
F. Ortin, D. Zapico, and J. Cueva. Design patterns for teaching type checking in a compiler construction course. Education, IEEE Transactions on, 50(3):273--283, 2007.
[19]
F. Ortin, D. Zapico, J. Perez-Schofield, and M. Garcia. Including both static and dynamic typing in the same programming language. Software, IET, 4(4):268--282, 2010.
[20]
J. Redondo, F. Ortin, and J. Cueva. Optimizing Reflective Primitives of Dynamic Languages. International Journal of Software Engineering and Knowledge Engineering, 18(6):759--783, 2008.
[21]
M. Torgersen. The expression problem revisited. ECOOP 2004--Object-Oriented Programming, pages 1--44, 2004.
[22]
P. Wadler. The expression problem. java-genericity Mailing List, 1998.
[23]
D. Watt and D. Brown. Programming language processors in Java: compilers and interpreters. Pearson Education, 2000.

Index Terms

  1. Separating different responsibilities into parallel hierarchies

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    C3S2E '11: Proceedings of The Fourth International C* Conference on Computer Science and Software Engineering
    May 2011
    162 pages
    ISBN:9781450306263
    DOI:10.1145/1992896
    • General Chair:
    • Bipin C. Desai,
    • Program Chairs:
    • Alain Abran,
    • Sudhir P. Mudur
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 16 May 2011

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. design patterns
    2. generics
    3. parametric polymorphism
    4. refactoring
    5. software design

    Qualifiers

    • Research-article

    Funding Sources

    • Department of Science and Technology (Spain) under the National Program for Research, Development and Innovation

    Conference

    C3S2E '11
    Sponsor:
    • ACM
    • Concordia University

    Acceptance Rates

    Overall Acceptance Rate 12 of 42 submissions, 29%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 94
      Total Downloads
    • Downloads (Last 12 months)3
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 26 Sep 2024

    Other Metrics

    Citations

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media