Results 1 -
3 of
3
Reusable Monadic Semantics of Logic Programs with Arithmetic Predicates
, 2001
"... We present a combination of modular monadic semantics and generic programming concepts that improves the reusability of semantic specifications. The computational structure is defined as the composition of several monad transformers, where each monad transformer adds a new notion of computation to a ..."
Abstract
- Add to MetaCart
We present a combination of modular monadic semantics and generic programming concepts that improves the reusability of semantic specifications. The computational structure is defined as the composition of several monad transformers, where each monad transformer adds a new notion of computation to a given monad. The abstract syntax is defined as the fixed point of several non-recursive pattern functors. In the case of several syntactic categories, it is possible to define many sorted algebras and n-catamorphisms. As an application, we combine the kernel of a pure logic programming language with independently specified arithmetic expressions obtaining a logic programming language with arithmetic predicates.
LPS: A Language Prototyping System Using Modular Monadic Semantics
, 2001
"... 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 s ..."
Abstract
- Add to MetaCart
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. 1
Monads, Zippers and Views Virtualizing the Monad
"... Abstract. This work aims at making monadic components more reusable and robust to changes by employing two new techniques for virtualizing the monad stack: the monad zipper and monad views. The monad zipper is a monad transformer that creates virtual monad stacks by ignoring particular layers in a c ..."
Abstract
- Add to MetaCart
Abstract. This work aims at making monadic components more reusable and robust to changes by employing two new techniques for virtualizing the monad stack: the monad zipper and monad views. The monad zipper is a monad transformer that creates virtual monad stacks by ignoring particular layers in a concrete stack. Monad views provide a general framework for monad stack virtualization: they take the monad zipper one step further and integrate it with a wide range of other virtualizations. For instance, particular views allow restricted access to monads in the stack. Furthermore, monad views can be used by components to provide a call-by-reference-like mechanism to access particular layers of the monad stack. With these two mechanisms component requirements in terms of the monad stack shape no longer need to be literally reflected in the concrete monad stack, making these components more reusable and robust to changes. 1

