LPSALanguage Prototyping System Using Modular Monadic Semantics

Program-Transformation.Org: The Program Transformation Wiki
by JoseLabraGayo and M. C. Luengo Diez and J. M. Cueva Lovelle and A. Cernuda del Rio

In Electronic Notes in Theoretical Computer Science 44 No. 2 (2001) http://www.elsevier.nl/locate/entcs/volume44.html


This paper describes LPS, a Language Prototyping System that facilitates the modular development of interpreters from semantic building blocks. The system is based on the integration of ideas from Modular Monadic Semantics and Generic Programming.

To define a new programming language, the abstract syntax is described as the fixpoint of non-recursive pattern functors. For each functor an algebra is defined whose carrier is the computational monad obtained from the application of several monad transformers to a base monad. The interpreter is automatically generated by a catamorphism or, in some special cases, a monadic catamorphism.

The system has been implemented as a domain-specific language embedded in Haskell and we have also implemented an interactive framework for language testing.

CategoryPaper | CategoryReview