A Language Prototyping Tool Based on Semantic Building Blocks

  • Authors:
  • Jose Emilio Labra Gayo;Juan Manuel Cueva Lovelle;María Cándida Luengo Díez;Bernardo M. González Rodríguez

  • Affiliations:
  • -;-;-;-

  • Venue:
  • Computer Aided Systems Theory - EUROCAST 2001-Revised Papers
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a Language Prototyping System that facilitates the modular development of interpreters from semantic specifications. The theoretical basis of our system is the integration of ideas from generic programming and modular monadic semantics. The system is implemented as a domain-specific language embedded in Haskell and contains an interactive framework for language prototyping. In the monadic approach, the semantic spscification of a programming language is captured as a function Σ → MV where Σ represents the abstract syntax, M the computational monad, and V the domain value. In order to obtain more extensibility, we use folds or catamorphisms over the fixpoint of non-recursive pattern functors that capture the structure of the abstract syntax. For each pattern functor F, the semantic specifications are defined as independent F-Algebras whose carrier is M V, where M is the computational monad and V models the domain value. The copmputational monad M can itself be obtained from the composition of several monad transformers applied to a base monad, and the domain value V can be defined using extensible union types. In this paper, we also show that when the abstract syntax contains several categories, it is possible to define many-sorted algebras obtaining the same modularity.