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

The safety of dynamic mixin composition

Published: 13 April 2015 Publication History

Abstract

Dynamic mixins are a modular means of developing features or roles that can be composed with objects at run-time. However, naive use of this construct can cause unexpected behaviour due to interference caused by the presence of an object's previously bound mixins. This work proposes a method for developing mixins that can be bound to base objects such that the mixins do not interfere with each other; the method achieves compositionally through a coupling invariant and by syntactically restricting mixins. The refinement calculus is used for formalization, as it treats implementations and specifications uniformly. The formalization relies on a new notion of mixin refinement.

References

[1]
P. America. Designing an object-oriented programming language with behavioural subtyping. In J. W. d. Bakker, W. P. d. Roever, and G. Rozenberg, editors, Foundations of Object-Oriented Languages, volume 489 of Lecture Notes in Computer Science, pages 60--90. Springer Berlin Heidelberg, 1990.
[2]
S. Apel, T. Leich, and G. Saake. Aspectual mixin layers: Aspects and features in concert. In Proceedings of the 28th International Conference on Software Engineering, ICSE '06, pages 122--131, New York, NY, USA, 2006. ACM.
[3]
R.-J. Back and J. v. Wright. Refinement Calculus: A Systematic Introduction. Springer-Verlag, 1998.
[4]
M. Barnett, R. DeLine, M. Fähndrich, K. R. M. Leino, and W. Schulte. Verification of object-oriented programs with invariants. Journal of Object P@Technology, 3(6), 2004.
[5]
A. Bergel, S. Ducasse, O. Nierstrasz, and R. Wuyts. Stateful traits. In Advances in Smalltalk, pages 66--90. Springer, 2007.
[6]
L. Bettini, S. Capecchi, and F. Damiani. On flexible dynamic trait replacement for java-like languages. Sci. Comput. Program., 78(7):907--932, July 2013.
[7]
E. Burton and E. Sekerinski. Correctness of intrusive data structures using mixins. In Proceedings of the 16th International ACM Sigsoft Symposium on Component-Based Software Engineering, CBSE '13, pages 53--58. ACM, 2013.
[8]
P. Chalin, J. Kiniry, G. Leavens, and E. Poll. Beyond assertions: Advanced specification and verification with jml and esc/java2. In F. de Boer, M. Bonsangue, S. Graf, and W.-P. de Roever, editors, Formal Methods for Components and Objects, volume 4111 of Lecture Notes in Computer Science, pages 342--363. Springer Berlin Heidelberg, 2006.
[9]
K. K. Dhara and G. T. Leavens. Forcing behavioral subtyping through specification inheritance. In Proceedings of the 18th International Conference on Software Engineering, ICSE '96, pages 258--267, Washington, DC, USA, 1996. IEEE Computer Society.
[10]
E. Gamma. The extension objects pattern. In R. Martin, D. Riehle, and F. Buschmann, editors, PLoP'96. 3rd Conference on Pattern Languages of Programs. Addison-Wesley, 1997.
[11]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1994.
[12]
R. Harmes and D. Diaz. Pro JavaScript Design Patterns. 1 edition, 2007.
[13]
H. Jouve, P. L. Gall, and S. Coudert. An automatic off-line feature interaction detection method by static analysis of specifications. pages 131--146. IOS Press, 2005.
[14]
C. Kästner, S. Apel, S. S. ur Rahman, M. Rosenmüller, D. Batory, and G. Saake. On the impact of the optional feature problem: Analysis and case studies. In Proceedings of the 13th International Software Product Line Conference, SPLC '09, pages 181--190, Pittsburgh, PA, USA, 2009. Carnegie Mellon University.
[15]
S. Katz. Aspect categories and classes of temporal properties. In A. Rashid and M. Aksit, editors, Transactions on Aspect-Oriented Software Development I, volume 3880 of Lecture Notes in Computer Science, pages 106--134. Springer Berlin Heidelberg, 2006.
[16]
K. R. M. Leino and P. Müller. Advanced lectures on software engineering. chapter Using the Spec# Language, Methodology, and Tools to Write Bug-free Programs, pages 91--139. Springer-Verlag, Berlin, Heidelberg, 2010.
[17]
B. H. Liskov and J. M. Wing. A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems, 16(6):1811--1841, 1994.
[18]
J. Liu, D. Batory, and C. Lengauer. Feature oriented refactoring of legacy applications. In Proceedings of the 28th International Conference on Software Engineering, ICSE '06, pages 112--121, New York, NY, USA, 2006. ACM.
[19]
M. Lutz. Learning Python. O'Reilly Media, 2009.
[20]
A. Mikhajlova and E. Sekerinski. Class refinement and interface refinement in object-oriented programs. In J. Fitzgerald, C. Jones, and P. Lucas, editors, FME '97: Industrial Applications and Strengthened Foundations of Formal Methods, volume 1313 of Lecture Notes in Computer Science, pages 82--101, Graz, Austria, 1997. Springer-Verlag.
[21]
C. C. Morgan. Programming from Specifications. Prentice Hall, 2nd edition, 1998.
[22]
D. A. Naumann. Predicate transformers and higher-order programs. Theoretical Computer Science, 150(1):111--159, Oct. 1995.
[23]
M. Plath and M. Ryan. Feature integration using a feature construct. Science of Computer Programming, 41(1):53--84, 2001.
[24]
C. Prehofer. Feature-oriented programming: A new way of object composition. Concurrency and Computation: Practice and Experience, 13(6):465--501, 2001.
[25]
C. Ruby and G. T. Leavens. Safely creating correct subclasses without seeing superclass code. SIGPLAN Notices, 35(10):208--228, Oct. 2000.
[26]
E. Sekerinski. A type-theoretic basis for an object-oriented refinement calculus. In S. J. Goldsack and S. J. H. Kent, editors, Formal Methods and Object Technology, pages 317--335. Springer-Verlag, 1996.
[27]
E. Sekerinski. Concurrent object-oriented programs: From specification to code. In F. S. d. Boer, M. Bonsangue, S. Graf, and W.-P. d. Roever, editors, Formal Methods for Components and Objects, First International Symposium, FMCO 02, volume 2852 of Lecture Notes in Computer Science, pages 403--423. Springer-Verlag, 2003.
[28]
M. Utting and K. Robinson. Modular reasoning in an object-oriented refinement calculus. In R. S. Bird, C. C. Morgan, and J. C. P. Woodcock, editors, Mathematics of Program Construction, Lecture Notes in Computer Science, pages 344--367, Oxford, U. K, June/July 1992, 1993. Springer-Verlag.
[29]
M. VanHilst and D. Notkin. Using role components in implement collaboration-based designs. SIGPLAN Notices, 31(10):359--369, Oct. 1996.

Cited By

View all
  • (2016)An object model for a dynamic mixin based languageProceedings of the 31st Annual ACM Symposium on Applied Computing10.1145/2851613.2851755(1986-1992)Online publication date: 4-Apr-2016
  • (2014)Using dynamic mixins to implement design patternsProceedings of the 19th European Conference on Pattern Languages of Programs10.1145/2721956.2721991(1-19)Online publication date: 9-Jul-2014

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SAC '15: Proceedings of the 30th Annual ACM Symposium on Applied Computing
April 2015
2418 pages
ISBN:9781450331968
DOI:10.1145/2695664
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: 13 April 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. compositionality
  2. mixins
  3. modularity
  4. refinement
  5. safety

Qualifiers

  • Research-article

Conference

SAC 2015
Sponsor:
SAC 2015: Symposium on Applied Computing
April 13 - 17, 2015
Salamanca, Spain

Acceptance Rates

SAC '15 Paper Acceptance Rate 291 of 1,211 submissions, 24%;
Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2016)An object model for a dynamic mixin based languageProceedings of the 31st Annual ACM Symposium on Applied Computing10.1145/2851613.2851755(1986-1992)Online publication date: 4-Apr-2016
  • (2014)Using dynamic mixins to implement design patternsProceedings of the 19th European Conference on Pattern Languages of Programs10.1145/2721956.2721991(1-19)Online publication date: 9-Jul-2014

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