skip to main content
10.1145/3136014.3136015acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Metacasanova: an optimized meta-compiler for domain-specific languages

Published:23 October 2017Publication History

ABSTRACT

Domain-Specific Languages (DSL's) offer language-level abstractions that General-Purpose Languages do not offer, thus speeding up the implementation of the solution of problems within a specific domain. Developers have the choice of developing a DSL by building an interpreter/compiler for it, which is a hard and time-consuming task, or embedding it in a host language, thus speeding up the development process but losing several advantages that having a dedicated compiler might bring. In this work we present a meta-compiler called Metacasanova, whose meta-language is based on operational semantics. Then, we propose a language extension with functors and modules that allows to embed the type system of a language definition inside the meta-type system of Metacasanova and improves the performance of manipulating data structures at run-time. Our results show that Metacasanova dramatically reduces the code lines required to develop a compiler, and that the running time of the Meta-program is improved by embedding the host language type system in the meta-type system with the use of functors in the meta-language.

References

  1. Mohamed Abbadi. 2017. Casanova 2, A domain specific language for general game development. Ph.D. Dissertation. Università Ca’ Foscari, Tilburg University.Google ScholarGoogle Scholar
  2. Mohamed Abbadi, Francesco Di Giacomo, Agostino Cortesi, Pieter Spronck, Giulia Costantini, and Giuseppe Maggiore. 2015. Casanova: a simple, high-performance language for game development. In Joint International Conference on Serious Games. Springer, 123–134. Google ScholarGoogle ScholarCross RefCross Ref
  3. Alfred V Aho, Ravi Sethi, and Jeffrey D Ullman. 1986. Compilers, Principles, Techniques. Addison wesley Boston.Google ScholarGoogle Scholar
  4. Erwin Book, Dewey Val Shorre, and Steven J Sherman. 1970. The cwic/36o system, a compiler for writing and implementing compilers. ACM SIGPLAN Notices 5, 6 (1970), 11–29. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Martin Bravenboer, Karl Trygve Kalleberg, Rob Vermaas, and Eelco Visser. 2008. Stratego/XT 0.17. A language and toolset for program transformation. Science of computer programming 72, 1 (2008), 52–70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. WR Campbell. 1978. A compiler definition facility based on the syntactic macro. Comput. J. 21, 1 (1978), 35–41. Google ScholarGoogle ScholarCross RefCross Ref
  7. Luca Cardelli. 1996. Type systems. Comput. Surveys 28, 1 (1996), 263–264. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Krzysztof Czarnecki, Ulrich W Eisenecker, G Goos, J Hartmanis, and J van Leeuwen. 2000. Generative programming. Edited by G. Goos, J. Hartmanis, and J. van Leeuwen 15 (2000).Google ScholarGoogle Scholar
  9. Francesco Di Giacomo, Mohamed Abbadi, Agostino Cortesi, Pieter Spronck, and Giuseppe" Maggiore. 2017. Building Game Scripting DSL’s with the Metacasanova Metacompiler. In INTETAIN 2016, Utrecht, The Netherlands, June 28–30. Springer, 231–242.Google ScholarGoogle Scholar
  10. Figure 1. Execution time of the different memory modelsGoogle ScholarGoogle Scholar
  11. Plotkin G.D. 1981. A structural approach to operational semantics. Technical Report. Computer science department, Aarhus University. Google ScholarGoogle Scholar
  12. F. Di Giacomo, M. Abbadi, A. Cortesi, P. Spronck, G. Costantini, and G. Maggiore. 2017. High performance encapsulation and networking in Casanova 2. Entertainment Computing 20 (2017), 25 – 41. Google ScholarGoogle ScholarCross RefCross Ref
  13. Gilles Kahn. 1987. Natural semantics. STACS 87 (1987), 22–39. Google ScholarGoogle ScholarCross RefCross Ref
  14. Samuel N Kamin. 1998. Research on domain-specific embedded languages and program generators. Electronic Notes in Theoretical Computer Science 14 (1998), 149–168.Google ScholarGoogle ScholarCross RefCross Ref
  15. O. Kiselyov. 2016. Free and Freer Monads: Putting Monads Back into Closet. http://okmij.org/ftp/Computation/free-monad.html . (2016).Google ScholarGoogle Scholar
  16. Jan Willem Klop et al. 1992. Term rewriting systems. Handbook of logic in computer science 2 (1992), 1–116.Google ScholarGoogle Scholar
  17. Marjan Mernik, Jan Heering, and Anthony M Sloane. 2005. When and how to develop domain-specific languages. ACM computing surveys (CSUR) 37, 4 (2005), 316–344. Google ScholarGoogle ScholarCross RefCross Ref
  18. Mikael Pettersson. 1996. A compiler for natural semantics. In Compiler Construction. Springer, 177–191.Google ScholarGoogle Scholar
  19. Tim Sheard and Simon Peyton Jones. 2002. Template metaprogramming for Haskell. In Proceedings of the 2002 ACM SIGPLAN workshop on Haskell. ACM, 1–16.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Anthony M Sloane. 2002. Post-design domain-specific language embedding: A case study in the software engineering domain. In System Sciences, 2002. HICSS. Proceedings of the 35th Annual Hawaii International Conference on. IEEE, 3647–3655. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Arie Van Deursen, Paul Klint, Joost Visser, et al. 2000. Domain-specific languages: An annotated bibliography. Sigplan Notices 35, 6 (2000), 26–36.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Markus Voelter, Sebastian Benz, Christian Dietrich, Birgit Engelmann, Mats Helander, Lennart CL Kats, Eelco Visser, and Guido Wachsmuth. 2013. DSL engineering: Designing, implementing and using domainspecific languages. dslbook. org.Google ScholarGoogle Scholar
  23. Daniel Weise and Roger Crew. 1993. Programmable syntax macros. In ACM SIGPLAN Notices, Vol. 28. ACM, 156–165.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Metacasanova: an optimized meta-compiler for domain-specific languages

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      SLE 2017: Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering
      October 2017
      267 pages
      ISBN:9781450355254
      DOI:10.1145/3136014

      Copyright © 2017 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 23 October 2017

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Upcoming Conference

    • Article Metrics

      • Downloads (Last 12 months)3
      • Downloads (Last 6 weeks)2

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader