[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ 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 2017 Publication 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.
[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.
[3]
Alfred V Aho, Ravi Sethi, and Jeffrey D Ullman. 1986. Compilers, Principles, Techniques. Addison wesley Boston.
[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.
[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.
[6]
WR Campbell. 1978. A compiler definition facility based on the syntactic macro. Comput. J. 21, 1 (1978), 35–41.
[7]
Luca Cardelli. 1996. Type systems. Comput. Surveys 28, 1 (1996), 263–264.
[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).
[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.
[10]
Figure 1. Execution time of the different memory models
[11]
Plotkin G.D. 1981. A structural approach to operational semantics. Technical Report. Computer science department, Aarhus University.
[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.
[13]
Gilles Kahn. 1987. Natural semantics. STACS 87 (1987), 22–39.
[14]
Samuel N Kamin. 1998. Research on domain-specific embedded languages and program generators. Electronic Notes in Theoretical Computer Science 14 (1998), 149–168.
[15]
O. Kiselyov. 2016. Free and Freer Monads: Putting Monads Back into Closet. http://okmij.org/ftp/Computation/free-monad.html . (2016).
[16]
Jan Willem Klop et al. 1992. Term rewriting systems. Handbook of logic in computer science 2 (1992), 1–116.
[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.
[18]
Mikael Pettersson. 1996. A compiler for natural semantics. In Compiler Construction. Springer, 177–191.
[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.
[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.
[21]
Arie Van Deursen, Paul Klint, Joost Visser, et al. 2000. Domain-specific languages: An annotated bibliography. Sigplan Notices 35, 6 (2000), 26–36.
[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.
[23]
Daniel Weise and Roger Crew. 1993. Programmable syntax macros. In ACM SIGPLAN Notices, Vol. 28. ACM, 156–165.

Index Terms

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

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    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
    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]

    Sponsors

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 23 October 2017

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. meta-compiler
    2. operational semantics
    3. optimization

    Qualifiers

    • Research-article

    Conference

    SPLASH '17
    Sponsor:

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 106
      Total Downloads
    • Downloads (Last 12 months)4
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 12 Dec 2024

    Other Metrics

    Citations

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media