skip to main content
research-article

XPL

Published: 01 February 2015 Publication History

Abstract

Languages that are used for Software Language Engineering (SLE) offer a range of features that support the construction and deployment of new languages. SLE languages offer features for constructing and processing syntax and defining the semantics of language features. New languages may be embedded within an existing language (internal) or may be stand-alone (external). Modularity is a desirable SLE property for which there is no generally agreed approach. This article analyses the current tools for SLE and identifies the key features that are common. It then proposes a language called XPL that supports these features. XPL is higher-order and allows languages to be constructed and manipulated as first-class elements and therefore can be used to represent a range of approaches to modular language definition. This is validated by using XPL to define the notion of a language module that supports modular language construction and language transformation. A new meta-language for defining languages is proposed.The meta-language supports modular definition of both syntax and semantics.New languages can be embedded in the host language.Patterns of definition are shown to support language composition, transformation and extension.

References

[1]
M. Fowler, Domain Specific Languages, Addison-Wesley Professional, 2010.
[2]
M. Mernik, J. Heering, A. Sloane, When and how to develop domain-specific languages, ACM Comput. Surv., 37 (2005) 316-344.
[3]
M. Eysholdt, H. Behrens, Xtext: implement your language faster than the quick and dirty way, in: Proceedings of the ACM International Conference Companion on Object-Oriented Programming Systems Languages and Application, ACM, 2010, pp. 307-309.
[4]
M. Voelter, Language and IDE modularization and composition with MPS, in: Lect. Notes Comput. Sci., vol. 7680, Springer, 2011, pp. 383-430.
[5]
J.R. Cordy, TXL - a language for programming language tools and applications, Electron. Notes Theor. Comput. Sci., 110 (2004) 3-31.
[6]
M. Bravenboer, K. Kalleberg, R. Vermaas, E. Visser, Stratego/XT 0.17. A language and toolset for program transformation, Sci. Comput. Program., 72 (2008) 52-70.
[7]
G.L. Steele, E.E. Allen, D. Chase, C.H. Flood, V. Luchangco, J.-W. Maessen, S. Ryu, Fortress (Sun HPCS language), in: Encyclopedia of Parallel Computing, Springer, 2011, pp. 718-735.
[8]
T. Parr, The Definitive ANTLR Reference: Building Domain-Specific Languages, Pragmatic Bookshelf, 2007.
[9]
V. Kodaganallur, Incorporating language processing into Java applications: a JavaCC tutorial, IEEE Softw., 21 (2004) 70-77.
[10]
D.A. Ladd, J.C. Ramming, A*: a language for implementing language processors, IEEE Trans. Softw. Eng., 21 (1995) 894-901.
[11]
E. Moggi, W. Taha, Z.-E.-A. Benaissa, T. Sheard, An idealized metaml: simpler, and more expressive, in: Lect. Notes Comput. Sci., vol. 1576, Springer, 1999, pp. 193-207.
[12]
T. Sheard, S. Peyton-Jones, Template meta-programming for Haskell, in: Proc. Haskell Workshop 2002, ACM, 2002.
[13]
C. Brabrand, M.I. Schwartzbach, Growing languages with metamorphic syntax macros, in: PEPM '02: Proceedings of the 2002 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, ACM, New York, NY, USA, 2002, pp. 31-40.
[14]
R. Lämmel, C. Verhoef, Cracking the 500-language problem, IEEE Softw., 18 (2001) 78-88.
[15]
P. Klint, R. Laemmel, C. Verhoef, Toward an engineering discipline for grammarware, ACM Trans. Softw. Eng. Methodol., 14 (2005) 331-380.
[16]
M.P. Ward, Language-oriented programming, Softw., Concepts Tools, 15 (1994) 147-161.
[17]
J. Baker, W.C. Hsieh, Maya: multiple-dispatch syntax extension in Java, in: PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, ACM, New York, NY, USA, 2002, pp. 270-281.
[18]
M. Tatsubori, S. Chiba, K. Itano, M.-O. Killijian, OpenJava: a class-based macro system for Java, in: Lect. Notes Comput. Sci., vol. 1826, Springer, 1999, pp. 117-133.
[19]
G.L. Steele, Common LISP: The Language, Digital Press, Newton, MA, USA, 1990.
[20]
M. Sperber, R.k. Dybvig, M. Flatt, A. Van straaten, R. Findler, J. Matthews, Revised6 report on the algorithmic language scheme, J. Funct. Program., 19 (2009) 1-301.
[21]
D. Batory, J.N. Sarvela, A. Rauschmayer, Scaling step-wise refinement, IEEE Trans. Softw. Eng., 30 (2004) 355-371.
[22]
L. Cardelli, F. Ma, T.M. Abadi, Extensible grammars for language specialization, in: Proceedings of the Fourth International Workshop on Database Programming Languages, Springer-Verlag, 1993, pp. 11-31.
[23]
E.V. Wyk, D. Bodin, J. Gao, L. Krishnan Silver, An extensible attribute grammar system, Sci. Comput. Program., 75 (2010) 39-54.
[24]
A. Schwerdfeger, E.V. Wyk, Verifiable composition of deterministic grammars, in: PLDI, ACM, 2009, pp. 199-210.
[25]
M. Bravenboer, E. Visser, Parse table composition, in: Lect. Notes Comput. Sci., vol. 5452, Springer, 2008, pp. 74-94.
[26]
A. Granicz, J. Hickey, Phobos: a front-end approach to extensible compilers, in: HICSS, 2003, pp. 324.
[27]
L.C.L. Kats, E. Visser, G. Wachsmuth, Pure and declarative syntax definition: paradise lost and regained, in: Proceedings of Onward! 2010, ACM, 2010.
[28]
D. Herman, M. Wand, A theory of hygienic macros, in: Lect. Notes Comput. Sci., vol. 4960, Springer, 2008, pp. 48-62.
[29]
T. Clark, L. Tratt, Formalizing homogeneous language embeddings, Electron. Notes Theor. Comput. Sci., 253 (2010) 75-88.
[30]
M. Berger, L. Tratt, Program logics for homogeneous meta-programming, in: Lect. Notes Comput. Sci., vol. 6355, Springer, 2010, pp. 64-81.
[31]
C. Wende, N. Thieme, S. Zschaler, A role-based approach towards modular language engineering, in: Lect. Notes Comput. Sci., vol. 5969, Springer, 2009, pp. 254-273.
[32]
P. Klint, R. Laemmel, C. Verhoef, Toward an engineering discipline for grammarware, ACM Trans. Softw. Eng. Methodol., 14 (2005) 331-380.
[33]
M. Tomita, Efficient Parsing for Natural Language: A Fast Algorithm for Practical Systems, Kluwer Academic Pub., 1985.
[34]
J. Earley, An efficient context-free parsing algorithm, Commun. ACM, 13 (1970) 94-102.
[35]
R. Grimm, Better extensibility through modular syntax, in: Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, ACM, 2006, pp. 38-51.
[36]
D. Spinellis, Notable design patterns for domain-specific languages, J. Syst. Softw., 56 (2001) 91-99.
[37]
M. Voelter, K. Solomatov, Language modularization and composition with projectional language workbenches illustrated with MPS, in: Software Language Engineering, SLE, 2010, pp. 16.
[38]
H. Krahn, B. Rumpe, S. Völkel, MontiCore: modular development of textual domain specific languages, in: Lect. Notes Bus. Inf. Process., vol. 11, Springer, 2008, pp. 297-315.
[39]
C. Wende, N. Thieme, S. Zschaler, A role-based approach towards modular language engineering, in: Software Language Engineering, Springer, 2010, pp. 254-273.
[40]
M. Bravenboer, E. Visser, Designing syntax embeddings and assimilations for language libraries, in: Lect. Notes Comput. Sci., vol. 5002, Springer, 2007, pp. 34-46.
[41]
W. Cazzola, I. Speziale, Sectional domain specific languages, in: Proceedings of the 4th Workshop on Domain-Specific Aspect Languages, ACM, 2009, pp. 11-14.
[42]
T. Clark, L. Tratt, Language factories, in: OOPSLA '09: Proceedings of the 24th ACM SIGPLAN Conference Companion on Object-Oriented Programming Systems Languages and Applications, ACM, New York, NY, USA, 2009, pp. 949-955.
[43]
G. Hutton, E. Meijer, Monadic parsing in Haskell, J. Funct. Program., 8 (1998) 437-444.
[44]
D. Devriese, F. Piessens, Explicitly recursive grammar combinators - a better model for shallow parser DSLs, in: Lect. Notes Comput. Sci., vol. 6539, Springer, 2011, pp. 84-98.
[45]
P.J. Landin, Calculations, High.-Order Symb. Comput., 22 (2009) 333-359.
[46]
S. Liang, P. Hudak, Modular denotational semantics for compiler construction, in: Lect. Notes Comput. Sci., vol. 1058, Springer, 1996, pp. 219-234.
[47]
J. Labra Gayo, M. Luengo Díez, J. Cueva Lovelle, A. Cernuda del Río, LPS: a language prototyping system using modular monadic semantics, Electron. Notes Theor. Comput. Sci., 44 (2001) 110-131.
[48]
G. Hutton, E. Meijer, Monadic parser combinators, J. Funct. Program., 8 (1996) 437-444.
[49]
J.L. Gayo, M. JMCL, A. del Rio, Reusable monadic semantics of object oriented programming languages, in: Proceedings of 6th Brazilian Symposium on Programming Languages, SBLP02, 2002.
[50]
J. Labra Gayo, J. Cueva Lovelle, M. Luengo Díez, A. Cernuda del Río, Specification of logic programming languages from reusable semantic building blocks, Electron. Notes Theor. Comput. Sci., 64 (2002) 220-233.
[51]
A. Johnstone, E. Scott, M. van den Brand, LDT: a language definition technique, in: Proceedings of the Eleventh Workshop on Language Descriptions, Tools and Applications, ACM, 2011, pp. 9.
[52]
B. Ford, Packrat Parsing: Simple, Powerful, Lazy, Linear Time, Functional Pearl, ACM, 2002.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Science of Computer Programming
Science of Computer Programming  Volume 98, Issue P4
February 2015
347 pages

Publisher

Elsevier North-Holland, Inc.

United States

Publication History

Published: 01 February 2015

Author Tags

  1. Domain specific languages
  2. Language modules
  3. Software language engineering

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media