Results 1 
9 of
9
Fusion of recursive programs with computational effects
 Theoretical Computer Science
"... ..."
(Show Context)
Towards Merging Recursion and Comonads
, 2000
"... Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold op ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold operator on the product comonad. Both versions capture functions that require extra arguments for their computation and are related with the notion of strong datatype. 1 Introduction One of the main features of recursive operators derivable from datatype definitions is that they impose a structure upon programs which can be exploited for program transformation. Recursive operators structure functional programs according to the data structures they traverse or generate and come equipped with a battery of algebraic laws, also derivable from type definitions, which are used in program calculations [24, 11, 5, 15]. Some of these laws, the socalled fusion laws, are particularly interesting in p...
Monadic Corecursion  Definition, Fusion Laws, and Applications
 Electronic Notes in Theoretical Computer Science
, 1998
"... This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that cap ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
(Show Context)
This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that captures definitions of this kind. We also explore another class of monadic recursive functions, corresponding to the composition of a monadic anamorphism followed by (the lifting of) a function defined by structural recursion on the data structure that the monadic anamorphism generates. Such kind of functions are captured by socalled monadic hylomorphism. We present transformation laws for these monadic functionals. Two nontrivial applications are also described.
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

Cited by 1 (0 self)
 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 nonrecursive 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 domainspecific language embedded in Haskell and we have also implemented an interactive framework for language testing. 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
(Show Context)
We present a Language Prototyping System that facilitates the modular development of interpreters from semantic specifications.
Fusion of Monadic (Co)Recursive Programs
"... this paper we present the definitions and some fusion laws corresponding to monadic anamorphism and monadic hylomorphism. We also give a brief account of some nontrivial applications that can be represented in terms of these functionals. (A detailed treatment of the topics presented in this paper ca ..."
Abstract
 Add to MetaCart
(Show Context)
this paper we present the definitions and some fusion laws corresponding to monadic anamorphism and monadic hylomorphism. We also give a brief account of some nontrivial applications that can be represented in terms of these functionals. (A detailed treatment of the topics presented in this paper can be found in [17].) 2 Preliminaries
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
(Show Context)
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 PBPTIC9701"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...
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
(Show Context)
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 ...