Skip to main content

Semantics First!

Rethinking the Language Design Process

  • Conference paper
Software Language Engineering (SLE 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6940))

Included in the following conference series:

Abstract

The design of languages is still more of an art than an engineering discipline. Although recently tools have been put forward to support the language design process, such as language workbenches, these have mostly focused on a syntactic view of languages. While these tools are quite helpful for the development of parsers and editors, they provide little support for the underlying design of the languages. In this paper we illustrate how to support the design of languages by focusing on their semantics first. Specifically, we will show that powerful and general language operators can be employed to adapt and grow sophisticated languages out of simple semantics concepts. We use Haskell as a metalanguage and will associate generic language concepts, such as semantics domains, with Haskell-specific ones, such as data types. We do this in a way that clearly distinguishes our approach to language design from the traditional syntax-oriented one. This will reveal some unexpected correlations, such as viewing type classes as language multipliers. We illustrate the viability of our approach with several real-world examples.

This work is partially supported by the Air Force Office of Scientific Research under the grant FA9550-09-1-0229 and by the National Science Foundation under the grant CCF-0917092.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Erwig, M., Kollmansberger, S.: Probabilistic Functional Programming in Haskell. Journal of Functional Programming 16(1), 21–34 (2006)

    Article  MATH  Google Scholar 

  2. Erwig, M., Walkingshaw, E.: A DSL for Explaining Probabilistic Reasoning. In: Taha, W.M. (ed.) DSL 2009. LNCS, vol. 5658, pp. 335–359. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  3. Erwig, M., Walkingshaw, E.: Visual Explanations of Probabilistic Reasoning. In: IEEE Int. Symp. on Visual Languages and Human-Centric Computing, pp. 23–27 (2009)

    Google Scholar 

  4. Erwig, M., Walkingshaw, E.: The Choice Calculus: A Representation for Software Variation. ACM Transactions on Software Engineering and Methodology (2011) (to appear)

    Google Scholar 

  5. Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  6. Fowler, M.: Domain-Specific Languages. Addison-Wesley Professional (2010)

    Google Scholar 

  7. Halpern, J., Pearl, J.: Causes and Explanations: A Structural-Model Approach, Part I: Causes. British Journal of Philosophy of Science 56(4), 843–887 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  8. Hudak, P.: Modular Domain Specific Languages and Tools. In: IEEE 5th Int. Conf. on Software Reuse, pp. 134–142 (1998)

    Google Scholar 

  9. Hudak, P.: Building Domain-Specific Embedded Languages. ACM Computing Surveys 28(4es), 196 (1996)

    Article  Google Scholar 

  10. Gibbons, J., de Moor, O. (eds.): The Fun of Programming. Palgrave MacMillan (2003)

    Google Scholar 

  11. Kats, L.C.L., Visser, E., Wachsmuth, G.: Pure and Declarative Syntax Definition: Paradise Lost and Regained. In: ACM Int. Conf. on Object-Oriented Programming, Systems, Languages, and Applications, pp. 918–932 (2010)

    Google Scholar 

  12. Klint, P., Lämmel, R., Verhoef, C.: Toward an Engineering Discipline for Grammarware. ACM Trans. Softw. Eng. Methodol. 14, 331–380 (2005)

    Article  Google Scholar 

  13. Liang, S., Hudak, P., Jones, M.: Monad Transformers and Modular Interpreters. In: 22nd ACM Symp. on Principles of Programming Languages, pp. 333–343 (1995)

    Google Scholar 

  14. Merkle, B.: Textual Modeling Tools: Overview and Comparison of Language Workbenches. In: ACM Int. Conf. on Object-Oriented Programming, Systems, Languages, and Applications, pp. 139–148 (2010)

    Google Scholar 

  15. Mitchell, J.C.: Concepts in Programming Languages. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  16. Peyton Jones, S.L.: Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  17. Pfeiffer, M., Pichler, J.: A Comparison of Tool Support for Textual Domain-Specific Languages. In: OOPSLA Workshop on Domain-Specific Modeling, pp. 1–7 (2008)

    Google Scholar 

  18. Sheard, T.: Accomplishments and Research Challenges in Meta-Programming. In: Taha, W. (ed.) SAIG 2001. LNCS, vol. 2196, pp. 2–44. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  19. Sheard, T., Pasalic, E.: Two-Level Types and Parameterized Modules. Journal of Functional Programming 14(5), 547–587 (2004)

    Article  MATH  Google Scholar 

  20. Völter, M., Visser, E.: Language Extension and Composition With Language Workbenches. In: ACM Int. Conf. on Object-Oriented Programming, Systems, Languages, and Applications, pp. 301–304 (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Erwig, M., Walkingshaw, E. (2012). Semantics First!. In: Sloane, A., Aßmann, U. (eds) Software Language Engineering. SLE 2011. Lecture Notes in Computer Science, vol 6940. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28830-2_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-28830-2_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-28829-6

  • Online ISBN: 978-3-642-28830-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics