Skip to main content
×
Home
    • Aa
    • Aa

MRI: Modular reasoning about interference in incremental programming

  • BRUNO C. D. S. OLIVEIRA (a1), TOM SCHRIJVERS (a2) and WILLIAM R. COOK (a3)
Abstract
Abstract

Incremental Programming (IP) is a programming style in which new program components are defined as increments of other components. Examples of IP mechanisms include Object-oriented programming inheritance, aspect-oriented programming advice, and feature-oriented programming. A characteristic of IP mechanisms is that, while individual components can be independently defined, the composition of components makes those components become tightly coupled, sharing both control and data flows. This makes reasoning about IP mechanisms a notoriously hard problem: modular reasoning about a component becomes very difficult; and it is very hard to tell if two tightly coupled components interfere with each other's control and data flows. This paper presents modular reasoning about interference (MRI), a purely functional model of IP embedded in Haskell. MRI models inheritance with mixins and side effects with monads. It comes with a range of powerful reasoning techniques: equational reasoning, parametricity, and reasoning with algebraic laws about effectful operations. These techniques enable MRI in the presence of side effects. MRI formally captures harmlessness, a hard-to-formalize notion in the interference literature, in two theorems. We prove these theorems with a non-trivial combination of all three reasoning techniques.

Copyright
Linked references
Hide All

This list contains references from the content that can be linked to their source. For a full set of references and notes please see the PDF or HTML where available.

G. Bracha & W. Cook (1990) Mixin-based inheritance. In Proceedings of the European Conference on Object-Oriented Programming on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA/ECOOP ‘90). New York, NY: ACM, pp. 303311.

K. Chen , S.-C. Weng , J.-Y. Lin , M. Wang & S.-C. Khoo (2011) Side-effect localization for lazy, purely functional languages via aspects. Higher-Order Symb. Comput. 24 (1–2), 139.

W. Cook & J. Palsberg (1989) A denotational semantics of inheritance and its correctness. In Conference Proceedings on Object-Oriented Programming Systems, Languages and Applications (OOPSLA ‘89), New York, NY, USA: ACM, pp. 433443.

O.-J. Dahl & K. Nygaard (1966) Simula: An ALGOL-based simulation language. Commun. AC. 9 (9), 671678.

D. S. Dantas , D. Walker , G. Washburn & S. Weirich (2008) AspectML: A polymorphic aspect-oriented functional programming language. ACM Trans. Program. Lang. Syst. 30 (3), 160.

B. De Fraine & M. Braem (2007) Requirements for reusable aspect deployment. In Software Composition, M. Lumpe & W. Vanderperren (eds), Lecture Notes in Computer Science, vol. 4829. Berlin, Germany: Springer, pp. 176183.

R. Douence , P. Fradet & M. Südholt (2004) Composition, reuse and interaction analysis of stateful aspects. In Proceedings of the 3rd International Conference on Aspect-Oriented Software Development (AOSD'04), New York, NY, USA: ACM, pp. 141150.

C. Dutchyn , D. B. Tucker & S. Krishnamurthi (2006) Semantics and scoping of aspects in higher-order languages. Sci. Comput. Program. 63 3, 207239.

M. Flatt , S. Krishnamurthi & M. Felleisen (1998) Classes and mixins. In Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Popl ‘98), San Diego, CA. New York, NY: ACM, pp. 171183.

J. Hughes (1998) Generalising monads to arrows. Sci. Comput. Program. 37, 67111.

S. Katz (1993) A superimposition control construct for distributed systems. ACM Trans. Program. Lang. Syst. 15 2, 337356.

S. Katz (2006) Aspect categories and classes of temporal properties. Trans. Aspect-Oriented Softw. Dev. 3880, 106134.

G. Kiczales & J. Lamping (1992) Issues in the design and specification of class libraries. In Proceedings of the 7th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'92), New York, NY, USA: ACM, pp. 435451.

G. Kiczales , J. Lamping , A. Menhdhekar , C. Maeda , C. Lopes , J. Loingtier , & J. Irwin (1997) Aspect-oriented programming. In Proceedings of the 17th European Conference on Object-Oriented Programming (ECOOP'97), Berlin, Heidelberg: Springer-Verlag, pp. 220242.

G. Kiczales & M. Mezini (2005) Aspect-oriented programming and modular reasoning. Proceedings of the 27th International Conference on Software Engineering (ICSE'05), New York, NY, USA: ACM, St. Louis, MO, May 15–21, pp. 4958.

J. Lamping (1993) Typing the specialization interface. In Proceedings of the 8th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'93), New York, NY, USA: ACM, pp. 201214.

K. Leino & M. Rustan (1998) Data groups: Specifying the modification of extended state. In Proceedings of the 13th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'98), New York, NY, USA: ACM, pp. 144153.

J. R. Lewis , J. Launchbury , E. Meijer & M. B. Shields (2000) Implicit parameters: Dynamic scoping with static types. In Proceedings of the 27th Symposium on Principles of Programming Languages (POPL'00), New York, NY, USA: ACM, pp. 108118.

S. Liang , P. Hudak & M. Jones (1995) Monad transformers and modular interpreters. In Proceedings of the 22nd Symposium on Principles of Programming Languages (POPL'95), New York, NY, USA: ACM, pp. 333343.

J. Ligatti , D. Walker & S. Zdancewic (2006) A type-theoretic interpretation of pointcuts and advice. Sci. Comput. Program. 63 3, 240266.

C. McBride & R. Paterson (2008) Applicative programming with effects. J. Funct. Program. 18 1, 113.

P. Müller , A. Poetzsch-Heffter & G. T. Leavens (2003) Modular specification of frame properties in JML. Concurrency Comput. Pract. Exp. 15 2, 117154.

C. Prehofer (1997) Feature-oriented programming: A fresh look at objects. In Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP'97), Berlin, Heidelberg: Springer-Verlag, pp. 419443.

C. Prehofer (2006) Semantic reasoning about feature composition via multiple aspect-weavings. In Proceedings of the 5th International Conference on Generative Programming and Component Engineering (GPCE'06), New York, NY, USA: ACM, pp. 237242.

J. C. Reynolds (1974) Towards a theory of type structure. Proceedings of Programming Symposium, Lecture Notes in Computer Science, vol. 19. New York: Springer-Verlag, pp. 408423.

M. Rinard , A. Salcianu & S. Bugrara (2004) A classification system and analysis for aspect-oriented programs. ACM SIGSOFT Softw. Eng. Notes. 29 6, 147158.

C. Ruby & G. T. Leavens (2000) Safely creating correct subclasses without seeing superclass code. In Proceedings of the 15th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'00), New York, NY, USA: ACM, pp. 208228.

A. Salcianu & M. C. Rinard (2005) Purity and side effect analysis for JAVA programs. In Proceedings of the 6th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI'05), Berlin, Heidelberg: Springer-Verlag, Lecture Notes in Computer Science, vol. 3385, pp. 199215.

R. Stata & J. V. Guttag (1995) Modular reasoning in the presence of subclassing. In Proceedings of the 10th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'95), New York, NY, USA: ACM, pp. 200214.

É Tanter . (2008) Expressive scoping of dynamically deployed aspects. In Proceedings of the 7th International Conference on Aspect-Oriented Software Development (AOSD'08), New York, NY, USA: ACM, pp. 168179.

P. Wadler (1992a) The essence of functional programming. In Proceedings of the 19th Symposium on Principles of Programming Languages (POPL'92), New York, NY, USA: ACM, pp. 114.

Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×