Skip to main content

Approaches and Tools for Implementing Type Systems in Xtext

  • Conference paper
Software Language Engineering (SLE 2012)

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

Included in the following conference series:

Abstract

With the Xtext framework, building domain specific languages (DSLs) integrated into the Eclipse IDE has become increasingly popular and viable even for non-trivial domains. However, sophisticated DSLs may require advanced type checking capabilities, since they usually include expressions, types and the notion of type conformance. In this paper we compare a number of approaches and frameworks for implementing type systems for Xtext languages regarding flexibility, required effort and usability. We use a common case study to illustrate the trade-offs between the various tools.

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. DLTK, http://www.eclipse.org/dltk

  2. Xtend, http://xtend-lang.org

  3. Xtext, http://www.eclipse.org/Xtext

  4. Bertot, Y., Castéran, P.P.: Interactive theorem proving and program development: Coq’Art: the calculus of inductive constructions. Texts in theoretical computer science. Springer (2004)

    Google Scholar 

  5. Bettini, L.: An Eclipse-based IDE for Featherweight Java implemented in Xtext. In: ECLIPSE-IT, pp. 14–28 (2010)

    Google Scholar 

  6. Bettini, L.: A DSL for Writing Type Systems for Xtext Languages. In: PPPJ, pp. 31–40. ACM (2011)

    Google Scholar 

  7. Bettini, L.: Xsemantics (2012), http://xsemantics.sourceforge.net/

  8. Bettini, L., Damiani, F., Schaefer, I., Strocco, F.: TraitRecordJ: A programming language with traits and records. Science of Computer Programming (to appear, 2012)

    Google Scholar 

  9. Borras, P., Clement, D., Despeyroux, T., Incerpi, J., Kahn, G., Lang, B., Pascual, V.: CENTAUR: the system. SIGPLAN 24(2), 14–24 (1988)

    Article  Google Scholar 

  10. Van Den Brand, M.G.J., Heering, J., Klint, P., Olivier, P.A.: Compiling language definitions: the ASF+SDF compiler. ACM TOPLAS 24(4), 334–368 (2002)

    Article  Google Scholar 

  11. Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A language and toolset for program transformation. Science of Computer Programming 72(1-2), 52–70 (2008)

    Article  MathSciNet  Google Scholar 

  12. Cardelli, L.: Type Systems. ACM Computing Surveys 28(1), 263–264 (1996)

    Article  Google Scholar 

  13. Charles, P., Fuhrer, R., Sutton Jr., S., Duesterwald, E., Vinju, J.: Accelerating the creation of customized, language-Specific IDEs in Eclipse. In: OOPSLA. ACM (2009)

    Google Scholar 

  14. 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)

    Chapter  Google Scholar 

  15. Dijkstra, A., Swierstra, S.D.: Ruler: Programming Type Rules. In: Hagiya, M. (ed.) FLOPS 2006. LNCS, vol. 3945, pp. 30–46. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  16. Ekman, T., Hedin, G.: The JastAdd system – modular extensible compiler construction. Science of Computer Programming 69(1-3), 14–26 (2007)

    Article  MathSciNet  MATH  Google Scholar 

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

    MATH  Google Scholar 

  18. Gordon, M.: From LCF to HOL: a short history. In: Proof, Language, and Interaction: Essays in Honour of Robin Milner, pp. 169–186. The MIT Press (2000)

    Google Scholar 

  19. Heidenreich, F., Johannes, J., Karol, S., Seifert, M., Wende, C.: Derivation and Refinement of Textual Syntax for Models. In: Paige, R.F., Hartman, A., Rensink, A. (eds.) ECMDA-FA 2009. LNCS, vol. 5562, pp. 114–129. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  20. Hindley, J.R.: Basic Simple Type Theory. Cambridge University Press (1987)

    Google Scholar 

  21. Hofer, C., Ostermann, K., Rendel, T., Moors, A.: Polymorphic embedding of DSLs. In: Smaragdakis, Y., Siek, J.G. (eds.) Proceedings of the 7th International Conference on Generative Programming and Component Engineering, GPCE 2008, Nashville, TN, USA, October 19-23, pp. 137–148. ACM (2008)

    Google Scholar 

  22. Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. ACM TOPLAS 23(3), 396–450 (2001)

    Article  Google Scholar 

  23. Jouault, F., Bézivin, J., Kurtev, I.: TCS: a DSL for the specification of textual concrete syntaxes in model engineering. In: GPCE, pp. 249–254. ACM (2006)

    Google Scholar 

  24. Kats, L.C.L., Visser, E.: The Spoofax language workbench. Rules for declarative specification of languages and IDEs. In: OOPSLA, pp. 444–463. ACM (2010)

    Google Scholar 

  25. Levine, J.: flex & bison. O’Reilly Media (2009)

    Google Scholar 

  26. Mernik, M., Lenič, M., Avdicauševic, E., Zumer, V.: LISA: An Interactive Environment for Programming Language Development. In: Nigel Horspool, R. (ed.) CC 2002. LNCS, vol. 2304, pp. 1–4. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  27. Object Management Group. Object Constraint Language, Version 2.2 (2010), http://www.omg.org/spec/OCL/2.2

  28. Parr, T.: The Definitive ANTLR Reference: Building Domain-Specific Languages. Pragmatic Programmers (2007)

    Google Scholar 

  29. Paulson, L.C.: Isabelle: A Generic Theorem Prover. LNCS, vol. 828. Springer, Heidelberg (1994)

    Book  MATH  Google Scholar 

  30. Pfeiffer, M., Pichler, J.: A comparison of tool support for textual domain-specific languages. In: DSM, pp. 1–7 (2008)

    Google Scholar 

  31. Pierce, B.C.: Types and Programming Languages. The MIT Press (2002)

    Google Scholar 

  32. Reps, T., Teitelbaum, T.: The Synthesizer Generator. In: Software Engineering Symposium on Practical Software Development Environments, pp. 42–48. ACM (1984)

    Google Scholar 

  33. Schaefer, I., Bettini, L., Damiani, F.: Compositional Type-Checking for Delta-oriented Programming. In: AOSD, pp. 43–56. ACM (2011)

    Google Scholar 

  34. Sewell, P., Nardelli, F.Z., Owens, S., Peskine, G., Ridge, T., Sarkar, S., Strnisa, R.: Ott: Effective tool support for the working semanticist. J. Funct. Program 20(1) (2010)

    Google Scholar 

  35. Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: EMF: Eclipse Modeling Framework, 2nd edn. Addison-Wesley (2008)

    Google Scholar 

  36. Vlissides, J.: Generation Gap Pattern. C++ Report 8(10):12, 14–18 (1996)

    Google Scholar 

  37. Voelter, M.: Language and IDE Development, Modularization and Composition with MPS. In: 4th Summer School on Generative and Transformational Techniques in Software Engineering (GTTSE 2011). LNCS, Springer (2011)

    Google Scholar 

  38. Völter, M.: Xtext/TS - A Typesystem Framework for Xtext (May 2011), http://code.google.com/a/eclipselabs.org/p/xtext-typesystem/

  39. Warmer, J., Kleppe, A.: The Object Constraint Language: Precise Modeling with UML. Addison Wesley (1999)

    Google Scholar 

  40. Van Wyk, E., Bodin, D., Gao, J., Krishnan, L.: Silver: an Extensible Attribute Grammar System. Electronic Notes in Theoretical Computer Science 203(2), 103–116 (2008)

    Article  Google Scholar 

  41. Xu, H.: EriLex: An Embedded Domain Specific Language Generator. In: Vitek, J. (ed.) TOOLS 2010. LNCS, vol. 6141, pp. 192–212. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bettini, L., Stoll, D., Völter, M., Colameo, S. (2013). Approaches and Tools for Implementing Type Systems in Xtext. In: Czarnecki, K., Hedin, G. (eds) Software Language Engineering. SLE 2012. Lecture Notes in Computer Science, vol 7745. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36089-3_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-36089-3_22

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-642-36089-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics