Abstract
Implementing Programming Languages (PLs) has always been a challenge for various reasons. One reason is the excess of routine tasks to be redone on every implementation cycle. This is despite the remarkable fraction of syntax and semantics usually shared between successive cycles. In this paper, we present a component-based approach to avoid reimplementation of shared PL fractions. We provide two sets of reusable components; one for syntax implementation and another for semantics. Our syntax and semantics components correspond to syntactic categories and semantics rules of a PL specification, respectively. We show how, in addition to their service to reusability in syntax and semantics, our components can cater reusable implementation of PL analyses.
Our current level of experimentation suggests that this approach is applicable wherever the following two features are available or can be simulated: Type Constraints and Multiple Inheritance. Implementing a PL using our approach, however, requires some modest programming discipline that we will explain throughout the text.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Abramsky, S., Ong, C.-H.: Full Abstraction in the Lazy Lambda Calculus. Inf. & Comp. 105(2), 159–267 (1993)
Axelsson, E.: A Generic Abstract Syntax Model for Embedded Languages. In: Proc. 17th ACM SIGPLAN Int. Conf. Func. Prog., pp. 323–334. ACM, New York (2012)
Bahr, P., Hvitved, T.: Parametric Compositional Data Types. In: Chapman, J., Levy, P.B. (eds.) Proc. 4th W. Math. Struct. Funct. Prog., February 2012. Elec. Proc. Theo. Comp. Sci., vol. 76, pp. 3–24 (2012)
Chalub, F., Braga, C.: Maude MSOS Tool. ENTCS 176(4), 133–146 (2007)
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: The Maude 2.0 System. In: Nieuwenhuis, R. (ed.) RTA 2003. LNCS, vol. 2706, pp. 76–87. Springer, Heidelberg (2003)
Danvy, O., Millikin, K., Munk, J., Zerny, I.: On inter-deriving small-step and big-step semantics: A case study for storeless call-by-need evaluation. Theo. Comp. Sci. 435, 21–42 (2012)
Dijkstra, A., Fokker, J., Swierstra, S.D.: The Architecture of the Utrecht Haskell Compiler. In: Proc. 2nd ACM SIGPLAN Symp. on Haskell, pp. 93–104. ACM, New York (2009)
Ekman, T., Hedin, G.: The JastAdd Extensible Java Compiler. In: Proc. 22nd ACM Int. Conf. Obj.-Oriented Prog. Sys. Lang. & Appl., pp. 1–18 (2007)
Erdweg, S., Rieger, F., Rendel, T., Ostermann, K.: Layout-sensitive Language Extensibility with SugarHaskell. In: Voigtländer, J. (ed.) Proc. 5th ACM SIGPLAN Symp. on Haskell, September 2012, pp. 149–160. ACM, New York (2012)
Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex, pp. 1–502. MIT Press, Cambridge (2009)
T. Florin Şerbănuţă, A. Arusoaie, D. Lazar, C. Ellison, D. Lucanu, and G. Roşu, The K Primer (version 2.5), K’11 (M. Hills, ed.), ENTCS, to appear
Haeri, S.H.: Observational Equivalence and a New Operational Semantics for Lazy Evaluation with Selective Strictness. In: Proc. Int. Conf. Theo. & Math. Found. Comp. Sci (TMFCS-10), pp. 143–150 (2010)
Johnstone, A., Mosses, P.D., Scott, E.: An Agile Approach to Language Modelling and Development. Innovations in Sys. & Soft. Eng. 6, 145–153 (2010)
Kastens, U., Waite, M.W.: Modularity and Reusability in Attribute Grammars. Acta Informatica 31, 601–627 (1994)
Kats, L.C.L., Visser, E.: The Spoofax Language Workbench: Rules for Declarative Specification of Languages and IDEs. In: Proc. 25th ACM Int. Conf. Obj.-Oriented Prog. Sys. Lang. & Appl., pp. 444–463. ACM, New York (2010)
Klint, P., van der Storm, T., Vinju, J.: EASY meta-programming with rascal. In: Fernandes, J.M., Lämmel, R., Visser, J., Saraiva, J. (eds.) Generative and Transformational Techniques in Software Engineering III. LNCS, vol. 6491, pp. 222–289. Springer, Heidelberg (2011)
Launchbury, J.: A Natural Semantics for Lazy Evaluation. In: Proc. 20th ACM SIGPLAN-SIGACT Symp. Princ. Prog. Lang., pp. 144–154. ACM, New York (1993)
Loogen, R., Ortega-mallén, Y., Peña-marí, R.: Parallel Functional Programming in Eden. J. Func. Prog. 15(3), 431–475 (2005)
Lumpe, M.: Growing a language: The gLoo perspective. In: Pautasso, C., Tanter, É. (eds.) SC 2008. LNCS, vol. 4954, pp. 1–19. Springer, Heidelberg (2008)
Mosses, P.D.: Theory and Practice of Action Semantics. In: Penczek, W., Szałas, A. (eds.) MFCS 1996. LNCS, vol. 1113, pp. 37–61. Springer, Heidelberg (1996)
Mosses, P.D.: Modular Structural Operational Semantics. J. Logic & Alg. Prog. 60–61, 195–228 (2004)
Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An Extensible Compiler Framework for Java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)
Odersky, M., Zenger, M.: Scalable Component Abstractions. In: Proc. 20th ACM Int. Conf. Obj.-Oriented Prog. Sys. Lang. & Appl., pp. 41–57. ACM, New York (2005)
Sinot, F.-R.: Complete Laziness: a Natural Semantics. ENTCS 204, 129–145 (2008)
Sloane, A.: Lightweight Language Processing in Kiama. In: Gener. & Transform. Techs Soft. Eng. III, pp. 408–425 (2011)
Swierstra, W.: Data Types à la Carte. J. Func. Prog. 18(4), 423–436 (2008)
van Eekelen, M., de Mol, M.: Reflections on Type Theory, λ-Calculus, and the Mind. Essays dedicated to Henk Barendregt on the Occasion of his 60\(^\mathnormal{th}\) Birthday, ch. Proving Lazy Folklore with Mixed Lazy/Strict Semantics, pp. 87–101, Radboud U. Nijmegen (2007)
Van Wyk, E., Bodin, D., Gao, J., Krishnan, L.: Silver: an Extensible Attribute Grammar System. Sci. Comp. Prog. 75(1–2), 39–54 (2010)
Wadler, P.: The Expression Problem, Java Genericity Mailing List (November 1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 IFIP International Federation for Information Processing
About this paper
Cite this paper
Haeri, S.H.(., Schupp, S. (2013). Reusable Components for Lightweight Mechanisation of Programming Languages. In: Binder, W., Bodden, E., Löwe, W. (eds) Software Composition. SC 2013. Lecture Notes in Computer Science, vol 8088. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39614-4_1
Download citation
DOI: https://doi.org/10.1007/978-3-642-39614-4_1
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39613-7
Online ISBN: 978-3-642-39614-4
eBook Packages: Computer ScienceComputer Science (R0)