Writing Composable Software with InterpreterLib

  • Mark Snyder
  • Nicolas Frisby
  • Garrin Kimmell
  • Perry Alexander
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5634)


InterpreterLib is a Haskell library for building and composing modular syntactic and semantic definitions. We identify two forms of composition within this domain. Composition along syntax combines semantics for denoting differing term spaces to a common denotational domain. Composition along semantics combines semantics for denoting a common term space to differing domains. We demonstrate these composition mechanisms by applying InterpreterLib to examples and then relate our experiences with InterpreterLib implementing tools for the Rosetta language.


Composition Operator Denotational Semantic Type Check Concrete Type Composition Mechanism 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Cartwright, R., Felleisen, M.: Extensible denotational language specifications. In: Hagiya, M., Mitchell, J.C. (eds.) TACS 1994. LNCS, vol. 789, pp. 244–272. Springer, Heidelberg (1994)CrossRefGoogle Scholar
  2. 2.
    Deursen, A.v., Heering, J., Klint, P. (eds.): Language Prototyping: An Algebraic Specification Approach. AMAST Series in Computing, vol. 5. World Scientific Publishing Co., Singapore (1996)zbMATHGoogle Scholar
  3. 3.
    Espinosa, D.: Semantic Lego. PhD thesis, Columbia University (1995)Google Scholar
  4. 4.
    Gayo, J.E.L., Lovelle, J.M.C., Díez, M.C.L., del Río, A.C.: Modular development of interpreters from semantic building blocks. Nordic J. of Computing 8(3), 391–407 (2001)MathSciNetzbMATHGoogle Scholar
  5. 5.
    Heering, J., Hendriks, P.R.H., Klint, P., Rekers, J.: The syntax definition formalism sdf—reference manual—. SIGPLAN Not. 24(11), 43–75 (1989), CrossRefGoogle Scholar
  6. 6.
    Jones, M.P.: Qualified types: theory and practice. Cambridge University Press, Cambridge (1995)zbMATHGoogle Scholar
  7. 7.
    Kimmell, G.: System Synthesis from a Monadic Functional Language. PhD thesis, University of Kansas (2008)Google Scholar
  8. 8.
    Komp, E., Kimmell, G., Ward, J., Alexander, P.: The Raskell Evaluation Environment. Technical report, The University of Kansas Information and Telecommunications Technology Center, 2335 Irving Hill Rd, Lawrence, KS, USA (November 2003)Google Scholar
  9. 9.
    Lämmel, R.: Typed Generic Traversal With Term Rewriting Strategies. Journal of Logic and Algebraic Programming, 54 (2003); arXiv technical report cs.PL/0205018Google Scholar
  10. 10.
    Lämmel, R., Visser, J.: A Strafunski application letter. In: Dahl, V., Wadler, P. (eds.) PADL 2003. LNCS, vol. 2562, pp. 357–375. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  11. 11.
    Lämmel, R., Visser, J., Kort, J.: Dealing with large bananas. In: Jeuring, J. (ed.), Proceedings of WGP 2000, Technical Report, Universiteit Utrecht, pp. 46–59 (July 2000)Google Scholar
  12. 12.
    Leijen, D.: Parsec, a fast combinator parser (2001)Google Scholar
  13. 13.
    Liang, S., Hudak, P., Jones, M.: Monad transformers and modular interpreters. In: ACM (ed.) 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Francisco, California, January 22–25, 1995, pp. 333–343. ACM Press, New York (1995)CrossRefGoogle Scholar
  14. 14.
    Mosses, P.D.: Modular structural operational semantics. J. Log. Algebr. Program. 60-61, 195–228 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Peyton Jones, S. (ed.): Haskell 98 Language and Libraries – The Revised Report. Cambridge University Press, Cambridge (2003)zbMATHGoogle Scholar
  16. 16.
    Pierce, B.C.: Types and Programming Languages. The MIT Press, Cambridge (2002)zbMATHGoogle Scholar
  17. 17.
    Plotkin, G.: The origins of structural operational semantics (2003),
  18. 18.
    Plotkin, G.D.: A structural approach to operational semantics (1981)Google Scholar
  19. 19.
    Reps, T., Teitelbaum, T.: The synthesizer generator. SIGSOFT Softw. Eng. Notes 9(3), 42–48 (1984), CrossRefzbMATHGoogle Scholar
  20. 20.
    Rodriguez, A., Jeuring, J., Jansson, P., Gerdes, A., Kiselyov, O., Oliveira, B.C.d.S.: Comparing libraries for generic programming in haskell. In: Haskell 2008: Proceedings of the first ACM SIGPLAN symposium on Haskell, pp. 111–122. ACM, New York (2008)CrossRefGoogle Scholar
  21. 21.
    Sheard, T., Peyton Jones, S.: Template metaprogramming for Haskell. In: Chakravarty, M.M.T. (ed.) ACM SIGPLAN Haskell Workshop 2002, pp. 1–16. ACM Press, New York (2002)Google Scholar
  22. 22.
    Steele, G.L.: Building interpreters by composing monads. In: ACM (ed.) 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Portland, Oregon, January 17–21, 1994, pp. 472–492. ACM Press, New York (1994)CrossRefGoogle Scholar
  23. 23.
    van den Brand, M., Heering, J., de Jong, H., de Jonge, M., Kuipers, T., Klint, P., Moonen, L., Olivier, P., Scheerder, J., Vinju, J., Visser, E., Visser, J.: The ASF+SDF Meta-Environment: a Component-Based Language Development Environment. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, p. 365. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  24. 24.
    Visser, E.: Language independent traversals for program transformation. In: Jeuring, J. (ed.) Workshop on Generic Programming (WGP 2000), Ponte de Lima, Portugal, Technical Report UU-CS-2000-19, Department of Information and Computing Sciences, Universiteit Utrecht (July 2000)Google Scholar
  25. 25.
    Wadler, P.: The essence of functional programming. In: Conference Record of the Nineteenth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Albequerque, New Mexico, pp. 1–14 (1992)Google Scholar
  26. 26.
    Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad hoc. In: POPL 1989: Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 60–76. ACM Press, New York (1989)Google Scholar
  27. 27.
    Weaver, P., Kimmell, G., Frisby, N., Alexander, P.: Modular and generic programming with interpreterlib. In: Stirewalt, R.E.K., Egyed, A., Fischer, B. (eds.) ASE, pp. 473–476. ACM, New York (2007)CrossRefGoogle Scholar
  28. 28.
    Weaver, P., Kimmell, G., Frisby, N., Alexander, P.: Constructing language processors with algebra combinators. In: GPCE 2007: Proceedings of the 6th international conference on Generative programming and component engineering, pp. 155–164. ACM Press, New York (2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Mark Snyder
    • 1
  • Nicolas Frisby
    • 1
  • Garrin Kimmell
    • 1
  • Perry Alexander
    • 1
  1. 1.Information and Telecommunication Technology CenterThe University of KansasLawrenceUSA

Personalised recommendations