Affiliation:
1. Tohoku University, Japan
2. University of Bristol, UK
Abstract
This paper describes a new embedding technique of invertible programming languages, through the case of the FliPpr language. Embedded languages have the advantage of inheriting host languages' features and supports; and one of the influential methods of embedding is the tagless-final style, which enables a high level of programmability and extensibility. However, it is not straightforward to apply the method to the family of invertible/reversible/bidirectional languages, due to the different ways functions in such domains are represented. We consider FliPpr, an invertible pretty-printing system, as a representative of such languages, and show that Atkey et al.'s unembedding technique can be used to address the problem. Together with a reformulation of FliPpr, our embedding achieves a high level of interoperability with the host language Haskell, which is not found in any other invertible languages. We implement the idea and demonstrate the benefits of the approach with examples.
Funder
Royal Society
Japan Society for the Promotion of Science
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference38 articles.
1. Unembedding domain-specific languages. In Haskell, Stephanie Weirich (Ed.);Atkey Robert;ACM,2009
2. Typed Transformations of Typed Grammars: The Left Corner Transform
3. Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages
4. Parametric higher-order abstract syntax for mechanized semantics. In ICFP, James Hook and Peter Thiemann (Eds.);Chlipala Adam;ACM,2008
Cited by
2 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献