A generic abstract syntax model for embedded languages
Paper in proceeding, 2012

Representing a syntax tree using a data type often involves having many similar-looking constructors. Functions operating on such types often end up having many similar-looking cases. Different languages often make use of similar-looking constructions. We propose a generic model of abstract syntax trees capable of representing a wide range of typed languages. Syntactic constructs can be composed in a modular fashion enabling reuse of abstract syntax and syntactic processing within and across languages. Building on previous methods of encoding extensible data types in Haskell, our model is a pragmatic solution to Wadler's "expression problem". Its practicality has been confirmed by its use in the implementation of the embedded language Feldspar.

the expression problem

generic programming

embedded domain-specific languages

Author

Emil Axelsson

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

SIGPLAN Notices (ACM Special Interest Group on Programming Languages)

07308566 (ISSN)

Vol. 47 9 323-334
978-145031054-3 (ISBN)

Areas of Advance

Information and Communication Technology

Subject Categories

Computer and Information Science

DOI

10.1145/2364527.2364573

ISBN

978-145031054-3

More information

Created

10/7/2017