Abstract
There are a few basic computational concepts that are at the core of all programming languages. The exact elements making out such a set of concepts determine (1) the specific nature of the computational services such a language is designed for, (2) for what users it is intended, and (3) on what devices and in what environment it is to be used. It is therefore possible to propose a set of basic building blocks and operations thereon as combination procedures to enable programming software by specifying desired tasks using a tool-box of generic constructs and meta-operations. Syntax specified through LALR(k) grammar technology can be enhanced with greater recognizing power thanks to a simple augmentation of yacc technology. Upon this basis, a set of implementable formal operational semantics constructs may be simply designed and generated (syntax and semantics) à la carte, by simple combination of its desired features. The work presented here, and the tools derived from it, may be viewed as a tool box for generating language implementations with a desired set of features. It eases the automatic practical generation of programming language pioneered by Peter Landin’s SECD Machine. What is overviewed constitutes a practical computational algebra extending the polymorphically typed λ-Calculus with object/classes and monoid comprehensions. This paper describes a few of the most salient parts of such a system, stressing most specifically any innovative features—formal syntax and semantics. It may be viewed as a high-level tour of a few reusable programming language design techniques prototyped in the form of a set of composable abstract machine constructs and operations.
Thanks to Val Tannen for his patience, Nabil Layaïda for his comments, and the anonymous referee for catching many glitches and giving good advice in general.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aït-Kaci, H.: An Abstract and Reusable Programming Language Architecture. keynote presentation. In: LDTA 2003 (April 6, 2003)
Landin, P.J.: The next 700 programming languages. Communications of the ACM 9(3), 157–166 (1966)
Sethi, R.: Programming Languages—Concepts and Constructs, 2nd edn. Addison-Wesley, Reading (1996)
Johnson, S.: Yacc: Yet another compiler compiler. Computer Science Technical Report 32, AT&T Bell Labs, Murray Hill, NJ (1975); Reprinted in the 4.3BSD Unix Programmer’s Manual, Supplementary Documents 1, PS1:15. UC Berkeley (1986)
Buneman, P., Libkin, L., Suciu, D., Tannen, V., Wong, L.: Comprehension syntax. ACM SIGMOD Record 23(1), 87–96 (1994)
Buneman, P., Naqvi, S., Tannen, V., Wong, L.: Principles of programming with complex objects and collection types. Theoretical Computer Science 149(1), 3–48 (1995)
Brodky, A., Segal, V.E., Chen, J., Exarkhopoulo, P.A.: The CCUBE system object-oriented database system. In: Ramakrishnan, R., Stuckey, P.J. (eds.) Constraints and Databases, pp. 245–277. Kluwer Academic Publishers, Norwell (1998); Special Issue on Constraints: An International Journal 2(3&4) (1997)
Fegaras, L., Maier, D.: Optimizing object queries using an effective calculus. ACM Transactions on Database Systems 25(4), 457–516 (2000)
Aït-Kaci, H.: An introduction to LIFE—Programming with Logic, Inheritance, Functions, and Equations. In: Miller, D. (ed.) Proceedings of the International Symposium on Logic Programming, pp. 52–68. MIT Press (October 1993)
Aït-Kaci, H., Di Cosmo, R.: Compiling order-sorted feature term unification. PRL Technical Note 7, Digital Paris Research Laboratory, Rueil-Malmaison, France (December 1993)
DeRemer, F., Pennello, T.: Efficient computation of LALR(1) look-ahead sets. ACM Transactions on Programming Languages and Systems 4(4), 615–649 (1982)
Park, J., Choe, K.M., Chang, C.: A new analysis of LALR formalisms. ACM Transactions on Programming Languages and Systems 7(1), 159–175 (1985)
Landin, P.J.: The mechanical evaluation of expressions. Computer Journal 6(4), 308–320 (1963)
Cardelli, L.: The functional abstract machine. Technical Report TR-107, AT&T Bell Laboratories, Murray Hill, New Jersey (May 1983)
Banâtre, J.P., Le Métayer, D.: A new computational model and its discipline of programming. INRIA Technical Report 566, Institut National de Recherche en Informatique et Automatique, Le Chesnay, France (1986)
Berry, G., Boudol, G.: The chemical abstract machine. In: Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1990, pp. 81–94. ACM Press, New York (1990)
Aït-Kaci, H.: Warren’s Abstract Machine—A Tutorial Reconstruction. Logic Programming. MIT Press, Cambridge (1991)
Grust, T.: Monad comprehensions—a versatile representation for queries. In: Gray, P., Kerschberg, L., King, P., Poulovassilis, A. (eds.) The Functional Approach to Data Management: Modeling, Analyzing and Integrating Heterogeneous Data. Springer (2003)
Bothner, P.: XQuery tutorial
Nic, M., Jirat, J.: XPath tutorial
Gesbert, N., Genevès, P., Layaïda, N.: Parametric polymorphism and semantic subtyping: the logical connection. In: Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming (ICFP 2011), Tokyo Japan, September 19-21, pp. 107–116. Association for Computing Machinery, New York (2011)
Gesbert, N., Genevès, P., Layaïda, N.: Parametric polymorphism and semantic subtyping: the logical connection. SIGPLAN Notices 46(9) (2011)
Bierman, G.M., Gordon, A.D., Hriţcu, C., Langworthy, D.: Semantic subtyping with an SMT solver. In: Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programmingm (ICFP 2010), Baltimore, MA USA, September 27-29, pp. 105–116. Association for Computing Machinery, New York (2010)
Bierman, G.M., Gordon, A.D., Hriţcu, C., Langworthy, D.: Semantic subtyping with an SMT solver. Journal of Functional Programming, 1–75 (2012)
Jaffar, J., Maher, M.J.: Constraint Logic Programming: A survey. Journal of Logic Programming 19/20, 503–581 (1994)
Leroy, X.: Unboxed objects and polymorphic typing. In: Proceedings of the 19th Symposium on Principles of Programming Languages (POPL 1992), pp. 177–188. Association for Computing Machinary (1992)
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers—Principles, Techniques, and Tools. Addison-Wesley (1986)
Choe, K.M.: Personal communication. Korean Advanced Institute of Science and Technology, Seoul, South Korea (December 2000), choecompiler.kaist.ac.kr
Aït-Kaci, H.: A generic XML-generating metacompiler. Part of the documentation of the \(\mathfrak{Jacc}\)package (July 2008)
Cardelli, L.: Typeful programming. In: Neuhold, E.J., Paul, M. (eds.) Formal Description of Programming Concepts. Springer (1991)
Hentenryck, P.: The OPL Optimization Programming Language. The MIT Press (1999)
Wong, L.: Querying Nested Collections. PhD thesis, University of Pennsylvania (Computer and Information Science) (1994)
Fegaras, L.: An experimental optimizer for OQL. Technical Report TR-CSE-97-007, University of Texas at Arlington (May 1997)
Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, Faculteit Wiskunde, Informatics, Natuurkunde en Strenkunde, Universiteit van Amsterdam, Amsterdam, The Netherlands (September 1997)
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading (1974)
Plotkin, G.D.: A structural approach to operational semantics. Technical Report DAIMI FN-19, University of Århus, Århus, Denmark (1981)
Plotkin, G.D.: A structural approach to operational semantics. Journal of Logic and Algebraic Programming 60-61, 17–139 (2004)
Dershowitz, N.: A taste of rewrite systems. In: Lauer, P.E. (ed.) Functional Programming, Concurrency, Simulation and Automated Reasoning. LNCS, vol. 693, pp. 199–228. Springer, Heidelberg (1993)
Knuth, D.E., Bendix, P.B.: Simple word problems in universal algebras. In: Leech, J. (ed.) Computational Problems in Abstract Algebra, pp. 263–297. Pergamon Press, Oxford (1970); Reprinted in Automatic Reasoning 2, pp. 342–276. Springer (1983)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Aït-Kaci, H. (2013). An Abstract, Reusable, and Extensible Programming Language Design Architecture. In: Tannen, V., Wong, L., Libkin, L., Fan, W., Tan, WC., Fourman, M. (eds) In Search of Elegance in the Theory and Practice of Computation. Lecture Notes in Computer Science, vol 8000. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41660-6_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-41660-6_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-41659-0
Online ISBN: 978-3-642-41660-6
eBook Packages: Computer ScienceComputer Science (R0)