KEMBAR78
A Language Prototyping Tool Based On Sem | PDF | Computing | Mathematics
0% found this document useful (0 votes)
11 views15 pages

A Language Prototyping Tool Based On Sem

Uploaded by

Andrew Quaye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views15 pages

A Language Prototyping Tool Based On Sem

Uploaded by

Andrew Quaye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

A Language Prototyping Tool based on

Semantic Building Blocks

J. E. Labra Gayo, J. M. Cueva Lovelle,


M. C. Luengo Dı́ez, and B. M. González Rodrı́guez

Department of Computer Science, University of Oviedo


C/ Calvo Sotelo S/N, 3307, Oviedo, Spain
{labra,cueva,candi,martin}@lsi.uniovi.es

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 Σ → M V where Σ represents the ab-
stract 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 spec-
ifications 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 compo-
sition 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 sev-
eral categories, it is possible to define many-sorted algebras obtaining
the same modularity.

1 Introduction

E. Moggi [39] applied monads to denotational semantics in order to capture the


notion of computation and the intuitive idea of separating computations from
values.
After his work, there was some interest in the development of modular in-
terpreters using monads [49,43,10]. The problem was that, in general, it is not
possible to compose two monads to obtain a new monad [25]. A proposed solution
was the use of monad transformers [33,32] which transform a given monad into
a new one adding new operations. This approach was called modular monadic
semantics.
In a different context, the definition of recursive datatypes as least fixpoints
of pattern functors and the calculating properties that can be obtained be means
of folds or catamorphisms led to a complete discipline which could be named as
generic programming [3,34,35].
In [9], L. Duponcheel proposed the combined use of folds or catamorphisms
with modular monadic semantics allowing the independent specification of the
abstract syntax, the computational monad and the domain value.
Following [36], we applied monadic folds to modular monadic semantics
allowing the separation between recursive evaluation and semantic specifica-
tion [28,29,30].
In practice, the abstract syntax is usually formed from n mutually recursive
categories, In this paper we show how we can extend our previous work to handle
many-sorted algebras.
The paper is organized as follows. In section 2 we give an informal presenta-
tion of modular monadic semantics defining some monad transformers. Section 3
presents the basic concepts from generic programming extending previous work
to handle many-sorted algebras. In section 4 we specify the semantics of a simple
imperative programming language from reusable components.
Along the paper, we use Haskell syntax with some freedom in the use of
mathematical operators and datatype declarations. As an example, the prede-
fined datatype

data Either a b = Left a | Right b

could be defined with our notation as

αkβ , Lα | Rβ

We also omit the type constructors in some definitions for brevity. The no-
tions we use from category theory are defined in the paper, so it is not a prereq-
uisite.

2 Modular Monadic Semantics


A monad M captures the intuitive notion of computation. In this way, the type
M α represents a computation the returns a value of type α
In functional programming, a monad can be defined as a type constructor M
with 2 operations

return : α → M α
(≫=) : M α → (α → M β) → M β

which satisfy a number of laws (see [47,49,48]).


Example 1. The simplest monad is the identity monad

Id α ,α
return = λx → x
m ≫= f = f x
In the rest of the paper, we will use the do-notation defined as:

do { m; e } ≡ m ≫= λ → do { e }
do { x ← m; e } ≡ m ≫= λ x → do { e }
do { let exp; e } ≡ let exp in do { e }
do { e } ≡e

It is possible to define monads that capture different kinds of computations,


like partiality, nondeterminism, side-effects, exceptions, continuations, interac-
tions, etc. [39,40,5]. Table 1 presents two classes of monads that will be used in
the rest of the paper.

Table 1. Some classes of monads

Name Operations
Environment Access rdEnv : M Env
inEnv : Env → M α → M α
State transformer update : (State → State) → M State
fetch : M State
set : State → M State

When describing the semantics of a programming language using monads, the


main problem is the combination of different classes of monads. It is not possible
to compose two monads to obtain a new monad in general [25]. Nevertheless, a
monad transformer T can transform a given monad M into a new monad T M
that has new operations and maintains the operations of M. The idea of monad
transformer is based on the notion of monad morphism that appeared in Moggi’s
work [39] and was later proposed in [33]. The definition of a monad transformer
is not straightforward because there can be some interactions between the in-
tervening operations of the different monads. These interactions are considered
in more detail in [31,32,33] and in [17] it is shown how to derive a backtracking
monad transformer from its specification.
Our system contains a library of predefined monad transformers correspond-
ing to each class of monad and the user can also define new monad transformers.
When defining a monad transformer T over a monad M, it is necessary to specify
the new return and (≫=), the lift : M α → T M α operation that transforms any
operation in M into an operation in the new monad T M, and the new operations
provided by the new monad. Table 2 presents the definitions of the two monad
transformers that will be used in the paper.

2.1 Extensible domains


[33] defines extensible union types using multi-parameter type classes. Although
we are not going to give the full details, we can assume that if α is a subtype
Table 2. Some monad transformers with their definitions
Environment reader

TEnv M α , Env → M α
return x = λρ → returnx
x ≫= f = λρ → (x ρ)≫=(λa → f a ρ)
lift x = λρ → x ≫=return
rdEnv = λρ → returnρ
inEnv ρ x = λ →xρ

State transformer

TState M α , State → M (α, State)


return x = λς → return(x , ς)
x ≫= f = λς → (x ς)≫=(λ(v , ς ′ ) → f v ς ′ )
lift x = λς → x ≫=(λx → return(x , ς))
update f = λς → return(ς, f ς)
fetch = update (λς → ς)
set ς = update (λ → ς)

of β, which will be denoted as α ∈ β, then we have the functions ↑: α → β and


↓: β → α. We also assume that α ∈ (αkβ) and that β ∈ (αkβ).
As an example, if we define a domain of integers and booleans as Int k Bool ,
then (↑ 3) belongs to that domain and to further extensions of it.

3 Generic Programming concepts

3.1 Functors, Algebras and Catamorphisms

As in the case of monads, functors also come from category theory but can easily
be defined in a functional programming setting. A functor F can be defined as a
type constructor that transforms values of type α into values of type F α and a
function mapF : (α → β) → F α → F β.
The fixpoint of a functor F can be defined as

µF , In (F (µF))

In the above definition, we explicitly write the type constructor In because


we will refer to it later.
A recursive datatype can be defined as the fixpoint of a non-recursive functor
that captures its shape.

Example 2. The following inductive datatype for arithmetic expressions Term

Term , N Int | Term + Term | Term − Term


can be defined as the fixpoint of the functor A

T x , N Int | x + x | x − x

where the mapT is1 :

mapT : (α → β) → (T α → Tβ)
mapT f (N n) =n
mapT f (x1 + x2 ) = f x1 + f x2
mapT f (x1 − x2 ) = f x1 − f x2

Once we have the shape functor T, we can obtain the recursive datatype as
the fixpoint of T

Term , µT

In this way, the expression 2 + 3 can be represented as

In ((In (N 2)) + (In (N 3))) : Term

The sum of two functors F and G, denoted by F ⊕ G can be defined as

(F ⊕ G) x , F x k G x

where mapF ⊕ G is

mapF ⊕ G : (α → β) → (F ⊕ G) α → (F ⊕ G) β
mapF ⊕ G f (L x ) = L (mapF f x )
mapF ⊕ G f (R x ) = R (mapG f x )

Using the sum of two functors, it is possible to extend recursive datatypes.

Example 3. We can define a new pattern functor for boolean expressions

B x = B Bool | x == x | x < x

and the composed recursive datatype of arithmetic and boolean expressions


can easily be defined as

Expr , µ(T ⊕ B)

Given a functor F, an F-algebra is a function ϕF : F α → α where α is


called the carrier. An homomorphism between two F-algebras ϕ : F α → α and
ψ : F β → β is a function h : α → β which satisfies

h . ϕ = ψ . mapF h
1
In the rest of the paper we omit the definition of map functions as they can be
automatically derived from the shape of the functor.
We consider a new category with F-algebras as objects and homomorphisms
between F-algebras as morphisms. In this category, In : F(µF) → µF is an initial
object, i.e. for any F-algebra ϕ : F α → α there is a unique homomorphism
([ϕ]) : µF → α satisfying the above equation.
([ϕ]) is called fold or catamorphism and satisfies a number of calculational
properties [3,6,35,42]. It can be defined as:

([ ]) : (Fα → α) → (µF → α)
([ϕ]) (In x ) = ϕ ( mapF ([ϕ]) x )

Example 4. We can obtain a simple evaluator for arithmetic expressions defining


an T-algebra whose carrier is the type m v , where m is, in this case, any kind of
monad, and Int is a subtype of v .

ϕT : (Monad m, Int ⊆ v ) ⇒ T(m v ) → m v


ϕT (Num n) = return (↑ n)
ϕT (e1 + e2 ) = do
v1 ← e1
v2 ← e2
return(↑ (↓ v1 + ↓ v2 ))
ϕT (e1 − e2 ) = do
v1 ← e1
v2 ← e2
return(↑ (↓ v1 − ↓ v2 ))

Applying a catamorphism over ϕT we obtain the evaluation function for


terms:

evalTerm : (Monad m, Int ⊆ v ) ⇒ Term → m v


evalTerm = ([ϕT ])

The operator ⊕ allows to obtain a (F ⊕ G)-algebra from an F-algebra ϕ and


a G-algebra ψ

⊕ : (F α → α) → (G α → α) → (F ⊕ G)α → α
(ϕ ⊕ ψ)(L x ) = ϕ x
(ϕ ⊕ ψ)(R x ) = ψ x

Example 5. The above definition allows to extend the evaluator of example 4 to


arithmetic and boolean expressions.
We can specify the semantics of boolean expressions with the following B-
algebra

ϕB : (Monad m, Bool ⊆ v ) ⇒ B(m v ) → m v


ϕB (B b) = return (↑ b)
ϕB (e1 == e2 ) = do
v1 ← e1
v2 ← e2
return(↑ (↓ v1 == ↓ v2 ))
ϕB (e1 < e2 ) = do
v1 ← e1
v2 ← e2
return(↑ (↓ v1 < ↓ v2 ))

Now, the new evaluator of boolean and arithmetic expressions is automati-


cally obtained as a catamorphism over the (T ⊕ B)-algebra.

evalExpr : (Monad m, Int ⊆ v , Bool ⊆ v ) ⇒ Expr → m v


evalExpr = ([ϕT ⊕ ϕB ])

The theory of catamorphisms can be extended to monadic catamorphisms as


described in [12,19,28,30].

3.2 Many-sorted algebras and catamorphisms


The abstract syntax of a programming language is usually divided in several
mutually recursive categories. It is possible to extend the previous definitions to
handle many-sorted algebras. In this section, we present the theory for n = 2,
but it can be defined for any number of sorts [11,37,21,41].
A bifunctor F is a type constructor that assigns a type F α β to a pair of
types α and β and an operation

bimapF : (α → γ) → (β → δ) → (F α β → F γ δ)

The fixpoint of two bifunctors F and G is a pair of values (µ1 FG,µ2 FG) that
can be defined as:

µ1 FG , In1 (F (µ1 FG) (µ2 FG))


µ2 FG , In2 (G (µ1 FG) (µ2 FG))

Given two bifunctors F and G, a two-sorted F, G-algebra is a pair of functions


(ϕ, ψ) such that:

ϕ:Fαβ → α
ψ :Gαβ → β

where α, β are called the carriers of the two-sorted algebra.


It is possible to define F, G-homomorphisms and a new category where (In1 , In2 )
form the initial object. This allows the definition of bicatamorphisms as:

([ , ])1 : (F α β → α) → (G α β → β) → (µ1 FG → α)
([ϕ, ψ])1 (In1 x ) = ϕ (bimapF ([ϕ, ψ])1 ([ϕ, ψ])2 x )
([ , ])2 : (F α β → α) → (G α β → β) → (µ2 FG → β)
([ϕ, ψ])2 (In2 x ) = ψ (bimapG ([ϕ, ψ])1 ([ϕ, ψ])2 x )
The sum of two bifunctors F and G is a new bifunctor F ⊞ G and can be
defined as:
(F ⊞ G) α β , F α β k G α β
where the bimap operator is
bimapF⊞G : (α → γ) → (β → δ) → ((F ⊞ G) α β → ((F ⊞ G) γ δ)
bimapF⊞G f g (L x ) = L (bimapF⊞G f g x )
bimapF⊞G f g (R x ) = R (bimapF⊞G f g x )
In order to extend two-sorted algebras, we define the operators ⊞1 and ⊞2
as:
(⊞1 ) : (F α β → α) → (G α β → α) → (F ⊞ G) α β → α
(φ1 ⊞1 φ2 ) (L x ) = φ1 x
(φ2 ⊞1 φ2 ) (R x ) = φ2 x

(⊞2 ) : (F α β → β) → (G α β → β) → (F ⊞ G) α β → β
(ψ1 ⊞2 ψ2 ) (L x ) = ψ1 x
(ψ2 ⊞2 ψ2 ) (R x ) = ψ2 x

3.3 From functors to bifunctors


When specifying several programming languages, it is very important to be able
to share common blocks and to reuse the corresponding specifications. For exam-
ple, arithmetic expressions should be specified in one place and their specification
should be reused between different languages.
In order to reuse specifications made using single-sorted algebras in a two-
sorted framework, it is necessary to extend functors to bifunctors.
Given a functor F, we define the bifunctors F21 and F22 as:
F21 α β , F α
F22 α β , F β
where the bimap operations are defined as
bimapF21 f g x = f x
bimapF22 f g x = g x
Given an F-algebra, the operators ǫ21 and ǫ22 obtain the corresponding two-
sorted algebras
ǫ21 : (F α → α) → F21 α β → α
ǫ21 ϕ x = ϕ x

ǫ22 : (F β → β) → F22 α β → β
ǫ22 ϕ x = ϕ x
4 Specification of a simple imperative language

4.1 Abstract syntax

A typical imperative programming language can be divided in two different


worlds: expressions and commands. In our example, the expressions will be arith-
metic, boolean and variables. The abstract syntax of arithmetic and boolean
expressions are captured by the functors T and B defined in examples 2 and 3.
Variables are defined using the functor V

V x , V Name

We will define commands in two steps. Firstly, sequence and assignments are
defined using the bifunctor S

S e c , c ; c | String := e

Secondly, control structures (conditional and loops) are defined using the
bifunctor R

R e c , If e c c | While e c

In order to define the imperative languge, we need a bifunctor that represents


the shape of expressions and another one representing commands. The bifunctor
of expressions can be defined as an extension of the functor obtained as the sum
of T, B and V

E , (T ⊕ B ⊕ V)21

The bifunctor of commands is defined as the sum of the bifunctors S and R

C , S ⊞ R

Finally, the imperative language is the fixpoint of E and C

Imp , µ2 E R

4.2 Computational structure

In this simple language, the computational structure needs to access the envi-
ronment and to transform a global state. We will use the monad Comp which
is obtained by transforming the identity monad using the monad transformers
TState and TEnv defined in table 2.

Comp , (TState . TEnv ) Id

The domain value of expressions consist of integer and boolean values


Value , IntkBool

and the domain value of commands is the null type ()2 indicating that com-
mands do not return any value. The state and environment are defined as:

Env , Name → Loc


State , Loc → Value

where Loc represent memory locations. We will also use the notation ς ⊲ {x /v }
to represent the updated state ς which assigns v to x .

4.3 Semantic functions

The semantic specification of arithmetic and boolean expressions were defined


in the examples 4 and 5. We will reuse those specifications in the imperative
language. With regard to variables, the V-algebra is

ϕV : V(Comp Value) → Comp Value


ϕV (Var x ) = do
ρ ← rdEnv
ς ← fetch
return(ς (ρ x ))

The specification of sequence and assignment is

ψS : S (Comp Value) (Comp ()) → Comp ()


ψS (c1 ; c2 )
= do
c1
c2
ψS (x := e) = do
v ← e
ρ ← rdEnv
ς ← fetch
set (ς ⊲ {ρ x /v })
return ()

In the same way, the specification of conditional and repetitive commands is:

ψR : R (Comp Value) (Comp ()) → Comp ()


ψR (If e c1 c2 ) = do
v ← e
if v then
c1
else
c2
2
() is a predefined Haskell datatype that only contains the value ()
ψR (While e c) = loop
where
loop = do
v ← e
if v then
do { c ; loop }
else
return()
Finally, the interpreter is automatically obtained as a bicatamorphism
InterImp : Imp → Comp ()
InterImp = ([ǫ21 (ϕT ⊕ ϕB ⊕ ϕV ), ϕS ⊞2 ϕR ])2
Although in the above definition we have explicitily written the particular al-
gebras, it is not necessary to do so in the implementation because the overloading
mechanism of Haskell allows to detect which is the corresponding algebra.

5 Conclusions and future work


We have presented an integration of modular monadic semantics and generic
programming concepts that allows the definition of programming languages from
reusable semantic especifications.
This approach has been implemented in a Language Prototyping System
which allows to share semantic building blocks and provides an interactive frame-
work for language testing. The system can be considered as another example of
a domain-specific language embedded in Haskell [46,26,20]. This approach has
some advantages: The development is easier as we can rely on the fairly good
type system of Haskell, it is possible to obtain direct access to Haskell libraries
and tools, and we do not need to define a new language with its syntax, seman-
tics, type system, etc. At the same time, the main disadvantages are the mix-
ture of error messages from the domain-specific language and the host language,
Haskell type system limitations and the Haskell dependency which impedes the
development of interpreters implemented in different languages. It would be in-
teresting to define an independent domain specific meta-language for semantic
specifications following [5,7,38].
On the theoretical side, [17] shows how to derive a backtracking monad trans-
former from its specification. That approach should be applied to other types of
monad transformers and it would be interesting to define a general framework
for the combination many-sorted algebras and monadic catamorphisms. It would
also be fruitful to study the combination of algebras, coalgebras, monads and
comonads in order to provide the semantics of interactive and object-oriented
features [4,23,22,27,45].
Another line of research is the automatic derivation of compilers from the
interpreters built. This line has already been started in [14,15].
With regard to the implementation, we have also made a simple version of
the system using first-class polymorphism [24] and extensible records [13]. This
allows the definition of monads as first class values and monad transformers
as functions between monads without the need of type classes. However, this
feature is still not fully implemented in current Haskell systems. Recent advances
in generic programming would also improve the implementation [18,16].
At this moment, we have specified simple imperative, functional, object-
oriented and logic programming languages. The specifications have been made
in a modular way reusing common components of the different languages.
The original goal of our research was to develop prototypes for the abstract
machines underlying the integral object-oriented operating System Oviedo3 [2]
whith the aim to test new features as security, concurrency, reflectiveness and
distribution [8,44].
More information on the Language Prototyping System can be obtained at [1].

References
1. Language Prototyping System. http://lsi.uniovi.es/~labra/LPS/LPS.html.
2. D. Álvarez, L. Tajes, F. Álvarez, M. A. Dı́az, R. Izquierdo, and J. M. Cueva.
An object-oriented abstract machine as the substrate for an object-oriented op-
erating system. In J. Bosch and S. Mitchell, editors, Object Oriented Technology
ECOOP’97, Jÿvaskÿla, Finland, June 1997. Springer Verlag, LNCS 1357.
3. Roland Backhouse, Patrik Jansson, Johan Jeuring, and Lambert Meertens. Generic
programming - an introduction. In S. D. Swierstra, P. R. Henriques, and J. N.
Oliveira, editors, Advanced Functional Programming, volume 1608 of Lecture Notes
in Computer Science. Springer, 1999.
4. L. S. Barbosa. Components as processes: An exercise in coalgebraic modeling. In
S. F. Smith and C. L. Talcott, editors, FMOODS’2000 - Formal Methods for Open
Object-Oriented Distributed Systems, pages 397–417, Stanford, USA, September
2000. Kluwer Academic Publishers.
5. N. Benton, J. Hughes, and E. Moggi. Monads and effects. In International Summer
School On Applied Semantics APPSEM’2000, Caminha, Portugal, 2000.
6. R. Bird and Oege de Moor. Algebra of Programming. Prentice Hall, 1997.
7. Pietro Ceciarelli and Engenio Moggi. A syntactic approach to modularity in de-
notational semantics. In 5th Biennial Meeting on Category Theory and Computer
Science, volume CTCS-5. CWI Technical Report, 1993.
8. M. A. Dı́az, D. Álvarez, A. Garcı́a-Mendoza, F. Álvarez, L. Tajes, and J. M. Cueva.
Merging capabilities with the object model of an object-oriented abstract machine.
In S. Demeyer and J. Bosch, editors, Ecoop’98 Workshop on Distributed Object
Security, volume 1543, pages 273–276. LNCS, 1998.
9. Luc Duponcheel. Writing modular interpreters using catamorphisms, subtypes and
monad transformers. Utrecht University, 1995.
10. David Espinosa. Semantic Lego. PhD thesis, Columbia University, 1995.
11. Maarten M. Fokkinga. Law and Order in Algorithmics. PhD thesis, University of
Twente, February 1992.
12. Maarten M. Fokkinga. Monadic maps and folds for arbitrary datatypes. Mem-
oranda Informatica 94-28, Dept. of Computer Science, Univ. of Twente, June
1994.
13. Benedict R. Gaster and Mark P. Jones. A Polymorphic Type System for Exten-
sible Records and Variants. Technical Report NOTTCS-TR-96-3, Department of
Computer Science, University of Nottingham, November 1996.
14. William Harrison and Samuel Kamin. Modular compilers based on monad trans-
formers. In Proceedings of the IEEE International Conference on Computer Lan-
guages, 1998.
15. William Harrison and Samuel Kamin. Compilation as metacomputation: Binding
time separation in modular compilers. In 5th Mathematics of Program Construction
Conference, MPC2000, Ponte de Lima, Portugal, June 2000.
16. R. Hinze. A generic programming extension for Haskell. In E. Meijer, editor,
Proceedings of the 3rd Haskell Workshop, Paris, France, September 1999. The
proceedings appear as a technical report of Universiteit Utrecht, UU-CS-1999-28.
17. Ralf Hinze. Deriving backtracking monad transformers. In Roland Backhouse
and J.Ñ. Oliveira, editors, Proceedings of the 2000 International Conference on
Functional Programming, Montreal, Canada, September 2000.
18. Ralf Hinze. A new approach to generic functional programming. In Conference
Record of POPL’00: The 27th ACM SIGPLAN-SIGACT Symposium on Principles
of Programming Languages, January 2000.
19. Z. Hu and H. Iwasaki. Promotional transformation of monadic programs. In Work-
shop on Functional and Logic Programming, Susono, Japan, 1995. World Scientific.
20. P. Hudak. Domain-specific languages. In Peter H. Salus, editor, Handbook of Pro-
gramming Languages, volume III, Little Languages and Tools. Macmillan Technical
Publishing, 1998.
21. H. Iwasaki, Z. Hu, and M. Takeichi. Towards manipulation of mutually recursive
functions. In 3rd. Fuji International Symposium on Functional and Logic Program-
ming (FLOPS’98), Kyoto, Japan, 1998. World Scientific.
22. B. Jacobs and E. Poll. A monad for basic java semantics. In T. Rus, editor,
Algebraic Methodology and Software Technology, number 1816 in LNCS. Springer,
2000.
23. Bart Jacobs. Coalgebraic reasoning about classes in object-oriented languages. In
Coalgebraic Methods in Computer Science, number 11. Electronic Notes in Com-
puter Science, 1998.
24. Mark P. Jones. First-class Polymorphism with Type Inference. In Proceedings of
the Twenty Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of
Programming Languages, Paris, France, January 15-17 1997.
25. Mark P. Jones and L. Duponcheel. Composing monads. YALEU/DCS/RR 1004,
Yale University, New Haven, CT, USA, 1993.
26. S. Kamin. Research on domain-specific embedded languages and program genera-
tors. Electronic Notes in Theoretical Computer Science, Elsevier Press, 12, 1998.
27. Richard B. Kieburtz. Designing and implementing closed domain-specific lan-
guages. Invited talk at the Workshop on Semantics, Applications and Implemen-
tation of Program Generation (SAIG), 2000.
28. J. E. Labra. An implementation of modular monadic semantics using folds and
monadic folds. In Workshop on Research Themes on Functional Programming,
Third International Summer School on Advanced Functional Programming, Braga
- Portugal, 1998.
29. J. E. Labra, J. M. Cueva, and C. Luengo. Language prototyping using modular
monadic semantics. In 3rd Latin-American Conference on Functional Program-
ming, Recife - Brazil, March 1999.
30. J. E. Labra, J. M. Cueva, and M. C. Luengo. Modular development of interpreters
from semantic building blocks. In The 12th Nordic Workshop on Programming
Theory, Bergen, Norway, October 2000. University of Bergen.
31. Sheng Liang. Modular Monadic Semantics and Compilation. PhD thesis, Graduate
School of Yale University, May 1998.
32. Sheng Liang and Paul Hudak. Modular denotational semantics for compiler con-
struction. In Programming Languages and Systems – ESOP’96, Proc. 6th European
Symposium on Programming, Linköping, volume 1058 of Lecture Notes in Com-
puter Science, pages 219–234. Springer-Verlag, 1996.
33. Sheng Liang, Paul Hudak, and Mark P. Jones. Monad transformers and modular
interpreters. In 22nd ACM Symposium on Principles of Programming Languages,
San Francisco, CA. ACM, January 1995.
34. Grant Malcolm. Data structures and program transformation. Science of Computer
Programming, 14:255–279, 1990.
35. E. Meijer, M. M. Fokkinga, and R. Paterson. Functional programming with ba-
nanas, lenses, envelopes and barbed wire. In Functional Programming and Com-
puter Architecture, pages 124–144. Springer-Verlag, 1991.
36. E. Meijer and J. Jeuring. Merging monads and folds for functional programming.
In J. Jeuring and E. Meijer, editors, Advanced Functional Programming, Lecture
Notes in Computer Science 925, pages 228–266. Springer-Verlag, 1995.
37. Erik Meijer. Calculating Compilers. PhD thesis, University of Nijmegen, February
1992.
38. E. Moggi. Metalanguages and applications. In A. M. Pitts and P. Dybjer, edi-
tors, Semantics and Logics of Computation, Publications of the Newton Institute.
Cambridge University Press, 1997.
39. Eugenio Moggi. An abstract view of programming languages. Technical Report
ECS-LFCS-90-113, Edinburgh University, Dept. of Computer Science, June 1989.
Lecture Notes for course CS 359, Stanford University.
40. Eugenio Moggi. Notions of computacion and monads. Information and Computa-
tion, (93):55–92, 1991.
41. Alberto Pardo. Fusion of monadic (co)recursive programs. In Roland Back-
house and Tim Sheard, editors, Proceedings Workshop on Generic Program-
ming, WGP’98, Marstrand, Sweden, 18 June 1998. Dept. of Computing Science,
Chalmers Univ. of Techn., and Göteborg Univ., June 1998.
42. Tim Sheard and Leonidas Fegaras. A fold for all seasons. In Proceedings 6th
ACM SIGPLAN/SIGARCH Intl. Conf. on Functional Programming Languages
and Computer Architecture, FPCA’93, Copenhagen, Denmark, 9–11 June 1993,
pages 233–242. ACM, New York, 1993.
43. Guy L. Steele, Jr. Building interpreters by composing monads. In Conference
record of POPL ’94, 21st ACM SIGPLAN-SIGACT Symposium on Principles of
Programming Languages: Portland, Oregon, January 17–21, 1994, pages 472–492,
New York, USA, 1994. ACM Press.
44. L. Tajes, F. Álvarez, D. Álvarez, M. A. Dı́az, and J.M. Cueva. A computational
model for a distributed object-oriented operating system based on a reflective
abstract machine. In S. Demeyer and J. Bosch, editors, Ecoop’98 Workshop on
Reflective Object-Oriented Programming and Systems, volume 1543, pages 382–
383. LNCS, 1998.
45. Daniele Turi and Jan Rutten. On the foundations of final coalgebra semantics:
non-well-founded sets, partial orders, metric spaces. Mathematical Structures in
Computer Science, 8(5):481–540, 1998.
46. Arie van Deursen, Paul Klint, and Joost Visser. Domain-specific languages: An
annotated bibliography. ACM SIGPLAN Notices, 35(6):26–36, June 2000.
47. P. Wadler. Comprehending monads. In ACM Conference on Lisp and Functional
Programming, pages 61–78, Nice, France, June 1990. ACM Press.
48. P. Wadler. Monads for functional programming. Lecture notes for Marktoberdorf
Summer School on Program Design Calculi, Springer-Verlag, Aug 1992.
49. P. Wadler. The essence of functional programming. In POPL ’92, Albuquerque,
1992.

You might also like