Abstract

We present a Language Prototyping System that facilitates the modular development of interpreters from independent semantic building blocks. The abstract syntax is modelled as the fixpoint of a pattern functor which can be obtained as the sum of functors. For each functor we define an algebra whose carrier is the computational structure. This structure is obtained as the composition of several monad transformers applied to a base monad, where each monad transformer adds a new notion of computation. When the abstract syntax is composed from mutually recursive categories, we use many-sorted algebras. With this approach, the prototype interpreters are automatically obtained as a catamorphism over the defined algebras.As an example, in this paper, we independently specify an arithmetic evaluator and a simple logic programming language and combine both specifications to obtain a logic programming language with arithmetic capabilities.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.