Results

**1 - 7**of**7**### Language Prototyping using Modular Monadic Semantics

, 1999

"... Modular monadic semantics allows the modular development of interpreters from semantic specifications be means of monad transformers. In this paper we show how to structure semantic descriptions using folds and monadic folds over functors that express the shape of the programming language. A given l ..."

Abstract
- Add to MetaCart

Modular monadic semantics allows the modular development of interpreters from semantic specifications be means of monad transformers. In this paper we show how to structure semantic descriptions using folds and monadic folds over functors that express the shape of the programming language. A given language can be extended combining those functors without changing the original definitions. This approach will facilitate the implementation of language prototypes from reusable components. * This research is partially supported by the Project PBP-TIC97-01"Sistema Integral Orientado a Objetos: Oviedo3" from the "II Plan Regional de Investigación del Principado de Asturias" Introduction While traditional denotational semantics maps terms to values, monadic semantics [24] maps terms to computations. Where each computation can be modelled using specific monads. In general, it is not possible to compose two monads to obtain a new monad [15] but it is possible to transform a monad into a new m...

### 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

### A Language Prototyping Tool Based on Semantic Building Blocks

, 2001

"... We present a Language Prototyping System that facilitates the modular development of interpreters from semantic specifications. ..."

Abstract
- Add to MetaCart

We present a Language Prototyping System that facilitates the modular development of interpreters from semantic specifications.

### 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

### 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.

### Specification of Logic Programming Languages from Reusable Semantic Building Blocks

, 2001

"... We specify a logic programming language using a combination of modular monadic semantics and generic programming concepts. ..."

Abstract
- Add to MetaCart

We specify a logic programming language using a combination of modular monadic semantics and generic programming concepts.

### An Implementation of Modular Monadic Semantics using Folds and Monadic Folds

, 1998

"... Modular monadic semantics can be implemented using folds or catamorphisms over a functor that expresses the abstract syntax of the language. By composing several functors, it is possible to obtain modular interpreters from reusable components. Monadic folds structure programs that process recursivel ..."

Abstract
- Add to MetaCart

Modular monadic semantics can be implemented using folds or catamorphisms over a functor that expresses the abstract syntax of the language. By composing several functors, it is possible to obtain modular interpreters from reusable components. Monadic folds structure programs that process recursively their input and control the side effects of the output they produce. We consider that the semantic specification of a programming language is a natural framework for monadic folds that improves the abstraction level and modularity. In this paper we use folds and monadic folds to develop the modular monadic semantics of a simple language. Introduction Using monads to structure denotational semantics [20] facilitates more modular semantic specifications. While traditional denotational semantics maps terms to values, monadic semantics maps terms to computations where a computation is modelled with a monad. In general, it is not possible to compose two monads to obtain a new monad [13], but ...