Abstract
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.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have