An agile approach to language modelling and development

  • Adrian Johnstone
  • Peter D. Mosses
  • Elizabeth Scott
Original Paper


We have developed novel techniques for component-based specification of programming languages. In our approach, the semantics of each fundamental programming construct is specified independently, using an inherently modular framework such that no reformulation is needed when constructs are combined. A language specification consists of an unrestricted context-free grammar for the syntax of programs, together with an analysis of each language construct in terms of fundamental constructs. An open-ended collection of fundamental constructs is currently being developed. When supported by appropriate tools, our techniques allow a more agile approach to the design, modelling, and implementation of programming and domain-specific languages. In particular, our approach encourages language designers to proceed incrementally, using prototype implementations generated from specifications to test tentative designs. The components of our specifications are independent and highly reusable, so initial language specifications can be rapidly produced, and can easily evolve in response to changing design decisions. In this paper, we outline our approach, and relate it to the practices and principles of agile modelling.


Programming language models Syntax Semantics Agile methods 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ambler SW (2009) Agile Modeling (AM).
  2. 2.
    Balaban I, Tip F, Fuhrer RM (2005) Refactoring support for class library migration. In: OOPSLA 2005, ACM, New York, pp 265–279Google Scholar
  3. 3.
    Brown DF, Moura H, Watt DA (1992) Actress: an action semantics directed compiler generator. In: CC ’92. LNCS, vol 641. Springer, Berlin, pp 95–109Google Scholar
  4. 4.
    Chalub F, Braga C (2007) Maude MSOS tool. In: WRLA 2006. ENTCS, vol 176(4). Elsevier, Amsterdam, pp 133–146Google Scholar
  5. 5.
    Doh K-G, Mosses PD (2003) Composing programming languages by combining action-semantics modules. Sci Comput Program 47(1): 3–36zbMATHCrossRefGoogle Scholar
  6. 6.
    Ekman T, Hedin G (2007) The JastAdd system—modular extensible compiler construction. Sci Comput Program 69(1–3): 14–26zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Gosling J, Joy B, Steele G (1996) The Java language specification, 1st edn. Addison-Wesley, ReadingzbMATHGoogle Scholar
  8. 8.
    Gosling J, Joy B, Steele G, Bracha G (2005) The Java language specification, 3rd edn. Addison-Wesley, ReadingGoogle Scholar
  9. 9.
    Gurevich Y (1995) Evolving algebras 1993: Lipari guide. In: Börger E (ed) Specification and validation methods. Oxford University Press, Oxford, pp 9–36Google Scholar
  10. 10.
    Heering J, Klint P (2000) Semantics of programming languages: a tool-oriented approach. SIGPLAN Notices 35(3): 39–48CrossRefGoogle Scholar
  11. 11.
    Hudak P, Hughes J, Peyton Jones SL, Wadler P (2007) A history of Haskell: being lazy with class. In: HOPL III, ACM, New York, pp 12.1–12.55Google Scholar
  12. 12.
    Iversen J (2007) An action compiler targeting Standard ML. Sci Comput Program 68(2): 79–94zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Iversen J, Mosses PD (2005) Constructive action semantics for Core ML. IEE Proc-Softw 152: 79–98CrossRefGoogle Scholar
  14. 14.
    Jaskelioff M (2009) Modular monad transformers. In: ESOP 2009. LNCS, vol 5502. Springer, Berlin, pp 64–79Google Scholar
  15. 15.
    Johnstone A, Scott E (2007) Proofs and pedagogy; science and systems: The Grammar Tool Box. Sci Comput Program 69: 76–85zbMATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    Kastens U, Waite WM (1994) Modularity and reusability in attribute grammars. Acta Inf 31(7): 601–627zbMATHCrossRefGoogle Scholar
  17. 17.
    Kutter P, Pierantonio A (1997) Montages: specifications of realistic programming languages. J Univers Comput Sci 3(5): 416–442zbMATHMathSciNetGoogle Scholar
  18. 18.
    Labra Gayo JE, Cueva Lovelle JM, Luengo Díez MC, Cernuda del Río A (2002) Reusable monadic semantics of object oriented programming languages. In: SBLP 2002, PUC-Rio, Brazil, pp 86–100Google Scholar
  19. 19.
    Liang S, Hudak P (1996) Modular denotational semantics for compiler construction. In: ESOP ’96. LNCS, vol 1058. Springer, Berlin, pp 219–234Google Scholar
  20. 20.
    Milner R, Tofte M, Harper R, MacQueen D (1997) The Definition of Standard ML—Revised. MIT Press, CambridgeGoogle Scholar
  21. 21.
    Moggi E (1989) An abstract view of programming languages. Tech. Rep. ECS-LFCS-90-113, Univ. of EdinburghGoogle Scholar
  22. 22.
    Mosses PD (1992) Action Semantics, Cambridge Tracts in Theoretical Computer Science, vol 26. Cambridge University Press, CambridgeGoogle Scholar
  23. 23.
    Mosses PD (1996) Theory and practice of action semantics. In: MFCS ’96. LNCS, vol 1113. Springer, Berlin, pp 37–61Google Scholar
  24. 24.
    Mosses PD (2002) Pragmatics of modular SOS. In: AMAST’02. LNCS, vol 2422. Springer, Berlin, pp 21–40Google Scholar
  25. 25.
    Mosses PD (2004) Modular structural operational semantics. J Log Algebraic Program 60–61: 195–228CrossRefMathSciNetGoogle Scholar
  26. 26.
    Mosses PD (2008) Component-based description of programming languages. In: Visions of computer science, BCS, electronic proceedings, pp 275–286Google Scholar
  27. 27.
    Mosses PD (2009) Component-based semantics. In: SAVCBS ’09, ACM, New York, pp 3–10Google Scholar
  28. 28.
    Mosses PD, New MJ (2009) Implicit propagation in structural operational semantics. In: SOS 2008. ENTCS, vol 229, issue 9. Elsevier, Amsterdam, pp 49–66Google Scholar
  29. 29.
    Mosses PD, Watt DA (1987) The use of action semantics. In: Formal description of programming concepts III. North-Holland, Amsterdam, pp 135–166Google Scholar
  30. 30.
    de Moura HP, Watt DA (1994) Action transformations in the ACTRESS compiler generator. In: CC ’94. LNCS, vol 786. Springer, Berlin, pp 16–60Google Scholar
  31. 31.
    Plotkin GD (2004) A structural approach to operational semantics. J Log Algebraic Program 60–61: 17–139MathSciNetGoogle Scholar
  32. 32.
    Plotkin GD, Power AJ (2004) Computational effects and operations: an overview. In: Domains VI. ENTCS, vol 73. Elsevier, Amsterdam, pp 149–163Google Scholar
  33. 33.
    Scott E, Johnstone A (2006) Right nulled GLR parsers. ACM Trans Program Lang Syst 28(4): 577–618CrossRefGoogle Scholar
  34. 34.
    Scott E, Johnstone A (2010) GLL parsing. In: LDTA 2009, ENTCS. Elsevier, Amsterdam (to appear)Google Scholar
  35. 35.
    Scott E, Johnstone A, Economopoulos G (2007) A cubic Tomita-style GLR parsing algorithm. Acta Inf 44(6): 427–461zbMATHCrossRefMathSciNetGoogle Scholar
  36. 36.
    Stärk R, Schmid J, Börger E (2001) Java and the Java Virtual Machine. Springer, BerlinzbMATHGoogle Scholar
  37. 37.
    van den Brand M, van Deursen A, Heering J, de Jong HA, de Jonge M, Kuipers T, Klint P, Moonen L, Olivier PA, Scheerder J, Vinju JJ, Visser E, Visser J (2001) The ASF+SDF meta-environment: a component-based language development environment. In: CC 2001. LNCS, vol 2027. Springer, Berlin, pp 365–370Google Scholar
  38. 38.
    van den Brand M, Scheerder J, Vinju JJ, Visser E (2002) Disambiguation filters for scannerless generalized LR parsers. In: CC 2002. LNCS, vol 2304. Springer, Berlin, pp 143–158Google Scholar
  39. 39.
    van den Brand M, Iversen J, Mosses PD (2006) An action environment. Sci Comput Program 61(3): 245–264zbMATHCrossRefGoogle Scholar
  40. 40.
    van Deursen A, Heering J, Klint P (eds) (1996) Language prototyping: an algebraic specification approach, AMAST series in computing, vol 5. World Scientific, SingaporeGoogle Scholar
  41. 41.
    Visser E (1997) Syntax definition for language prototyping. PhD thesis, University of AmsterdamGoogle Scholar
  42. 42.
    Visser E (2004) Program transformation with Stratego/XT: Rules, strategies, tools, and systems in Stratego/XT 0.9. In: Domain-specific program generation. LNCS, vol 3016. Springer, Berlin, pp 216–238Google Scholar
  43. 43.
    Watt DA (1988) An action semantics of Standard ML. In: MFPS III. LNCS, vol 298. Springer, Berlin, pp 572–598Google Scholar
  44. 44.
    Watt DA (2004) Programming language design concepts. John Wiley & Sons, New YorkGoogle Scholar
  45. 45.
    Watt DA, Thomas M (1991) Programming language syntax and semantics. Prentice-Hall, Englewood CliffsGoogle Scholar

Copyright information

© Springer-Verlag London Limited 2009

Authors and Affiliations

  • Adrian Johnstone
    • 1
  • Peter D. Mosses
    • 2
  • Elizabeth Scott
    • 1
  1. 1.Department of Computer Science, Royal HollowayUniversity of LondonEghamUK
  2. 2.Department of Computer ScienceSwansea UniversitySwanseaUK

Personalised recommendations