Abstract
Domain-specific programming languages (DSLs) are emerging as an important paradigm for the engineering of large reliable software systems. Modular interpreters are an approach to building off-the-shelf software components that implement fragments of DSLs.We describe an approach to implementing modular interpreters in an object-oriented fashion, using the design pattern of extensible computations. The modular structuring and reuse of DSL implementations has potentially important lessons for object-oriented reuse, because of the highly recursive nature of any non-trivial programming language, and the close semantic relationship between inheritance and recursion.We give paradigmatic examples of the definition of extensible computations in the Java programming language, and consider what extensions would be required for typed object-oriented languages in order to support this approach in a statically type-safe manner.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
W. Aitken, B. Dickens, P. Kwiatkowski, O. de Moor, D. Richter, and C. Simonyi. Transformation in intentional programming. In Proceedings of the International Conference on Software Reuse. ACM Press, 1998.
David Ancona and Elena Zucca. A theory of mixin modules: Basic and derived operators. Mathematical Structures in Computer Science, 8(4):401–446, 1998.
Davide Ancona, Giovanni Lagorio, and Elena Zucca. Jam: A smooth extension of Java with mixins. In European Conference on Object-Oriented Programming, Lecture Notes in Computer Science, Cannes, France, June 2000. Springer-Verlag.
Don Batory, Bernie Lofaso, and Yannis Smaragdakis. JTS: Tools for implementing domain-specific languages. In Proceedings of the International Conference on Software Reuse. ACM Press, 1998.
Edoardo Biagioni, Robert Harper, Peter Lee, and Brian G. Milnes. Signatures for a network protocol stack: A systems application of standard ML. In Proceedings of ACM Symposium on Lisp and Functional Programming, pages 55–64, Orlando, Florida, January 1994. ACM Press.
Gilad Bracha and William Cook. Mixin-based inheritance. In Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications, pages 303–311. ACM Press, October 1990. SIGPLAN Notices, volume 25, number 10.
Gilad Bracha and Gary Lindstrom. Modularity meets inheritance. In International Conference on Computer Languages, pages 282–290. IEEE, 1992.
Kim Bruce, Martin Odersky, and Philip Wadler. A statically safe alternative to virtual types. In European Conference on Object-Oriented Programming, Lecture Notes in Computer Science. Springer-Verlag, 1998.
Robert Cartwright and Matthias Felleisen. Extensible denotational language specifications. In M. Hagiya and J. C. Mitchell, editors, Theoretical Aspects of Computer Science, volume 789 of Lecture Notes in Computer Science, pages 244–272. Springer-Verlag, 1994.
J. Craig Cleveland. Building application generators. IEEE Software, July 1988.
William Clinger and Jonathan Rees, editors. IEEE Standard for the Scheme Programming Language. Institute for Electrical and Electronic Engineers, 1991. IEEE Standard 1178-1990.
William Cook. A Denotational Semantics for Inheritance. PhD thesis, Brown University, 1989.
William Cook and Jens Palsberg. A denotational semantics for inheritance and its correctness. In Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications, 1989.
Oege de Moor, Simon Peyton-Jones, and Eric Van Wik. Aspect-oriented compilers. In Proceedings of the First International Symposium on Generative and Component-Based Software Engineering, Erfurt, Germany, September 1999.
G. D. P. Dueck and G. V. Cormack. Modular attribute grammars. Computer Journal, 33(3):164–172, 1990.
Dominic Duggan. Modular domain-specific languages: A mixin module-based approach. Submitted for publication, 1999.
Dominic Duggan and Constantinos Sourelis. Mixin modules. In Proceedings of ACM International Conference on Functional Programming, pages 262–273, 1996.
Dominic Duggan and Constantinos Sourelis. Mixin-based, module-based inheritance. Technical Report 2001, Stevens Institute of Technology, Hoboken, New Jersey, 2000.
Erik Ernst. gbeta-a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. PhD thesis, Department of Computer Science, University of Aarhus, Århus, Denmark, 1999.
David Espinosa. Semantic LEGO. PhD thesis, Columbia University, May 1995.
R. Farrow, T. J. Marlowe, and D. M. Yellin. Composable attribute grammars: support for modularity in translator design and implementation. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 223–233, 1992.
Andrej Filinski. Representing layered monads. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 175–188, 1999.
M. Flatt, S. Krishnamurthi, and M. Felleisen. Classes and mixins. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 171–183. ACM Press, January 1998.
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns. Addison-Wesley, 1995.
James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. The Java Series. Addison-Wesley, 1997.
S. C. Keene. Object Oriented Programming in Common Lisp: A Programming Guide in CLOS. Addison-Wesley, 1989.
D. Knuth. Semantics of context-free languages. Mathematical Systems Theory, 2(2):127–145, February 1968. Correction, 5, 1, 95–96, March 1971.
Shriram Krishnamurthi and Matthias Felleisen. Toward a formal theory of extensible software. In Proceedings of ACM Symposium on Foundations of Computer Science, 1998.
Shriram Krishnamurthi, Matthias Felleisen, and Daniel Friedman. Synthesizing object-oriented and functional design to promote re-use. In European Conference on Object-Oriented Programming, pages 91–113, 1998.
Sheng Liang, Paul Hudak, and Mark Jones. Monad transformers and modular interpreters. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 333–343, San Francisco, January 1995. ACM Press.
Karl J. Lieberherr. Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns. PWS Publishing Company, Boston, 1996.
Ole Lehrmann Madsen, Birger Moller-Pedersen, and Kristen Nygaard. Object-Oriented Programming in the BETA Programming Language. ACM Press, 1993.
Mira Mezini and Karl Lieberherr. Adaptive plug-and-play components for evolutionary software development. In Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications, 1998.
Robin Milner, Mads Tofte, Robert Harper, and David MacQueen. The Revised Definition of Standard ML. The MIT Press, 1997.
Eugenio Moggi. An abstract view of programming languages. Technical Report ECS-LFCS-90-113, Laboratory for Foundations of Computer, University of Edinburgh, Scotland, 1990.
Eugenio Moggi. Notions of computation and monads. Information and Computation, 93:55–92, 1991.
Peter Mosses. Action Semantics. Number 26 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1992.
J. Neighbours. Draco: A method for engineering reusable software components. In T. J. Biggerstaff and A. Perlis, editors, Software Reusability. Addison-Wesley/ACM Press, 1989.
Johan Ovlinger and Mitchell Wand. A language for specifying traversals of object structures. In Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications, 1999.
R. Prieto-Diaz and G. Arango. Domain Analysis and Software Systems Modelling. IEEE Computer Society Press, 1991.
Guy Steele. Building interpreters by composing monads. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 472–492. ACM Press, 1994.
P. Wadler. Comprehending monads. Mathematical Structures in Computer Science, 2:461–493, 1992.
Keith Wansbrough and John Hamer. Modular monadic action semantics. In USENIX Symposium on Domain-Specific Languages, pages 157–170, Santa Barbara, California, October 1997. USENIX.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Duggan, D. (2000). A Mixin-Based, Semantics-Based Approach to Reusing Domain-Specific Programming Languages. In: Bertino, E. (eds) ECOOP 2000 — Object-Oriented Programming. ECOOP 2000. Lecture Notes in Computer Science, vol 1850. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45102-1_9
Download citation
DOI: https://doi.org/10.1007/3-540-45102-1_9
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67660-7
Online ISBN: 978-3-540-45102-0
eBook Packages: Springer Book Archive