Results 1 - 10
of
12
Monad Transformers and Modular Interpreters
- In Proceedings of the 22nd ACM Symposium on Principles of Programming Languages. ACMPress
, 1995
"... We show how a set of building blocks can be used to construct programming language interpreters, and present implementations of such building blocks capable of supporting many commonly known features, including simple expressions, three different function call mechanisms (call-by-name, callby -value ..."
Abstract
-
Cited by 213 (10 self)
- Add to MetaCart
We show how a set of building blocks can be used to construct programming language interpreters, and present implementations of such building blocks capable of supporting many commonly known features, including simple expressions, three different function call mechanisms (call-by-name, callby -value and lazy evaluation), references and assignment, nondeterminism, first-class continuations, and program tracing. The underlying mechanism of our system is monad transformers, a simple form of abstraction for introducing a wide range of computational behaviors, such as state, I/O, continuations, and exceptions. Our work is significant in the following respects. First, we have succeeded in designing a fully modular interpreter based on monad transformers that includes features missing from Steele's, Espinosa's, and Wadler's earlier efforts. Second, we have found new ways to lift monad operations through monad transformers, in particular difficult cases not achieved in Moggi's original work. ...
Towards an Engineering Discipline for GRAMMARWARE
- ACM Transactions on Software Engineering Methodology
, 2003
"... Grammarware comprises grammars and all grammar-dependent software, i.e., software artifacts that directly involve grammar knowledge. The term grammar is meant here in the widest sense to include XML schemas, syntax definitions, interface descriptions, APIs, and interaction protocols. The most obv ..."
Abstract
-
Cited by 91 (7 self)
- Add to MetaCart
Grammarware comprises grammars and all grammar-dependent software, i.e., software artifacts that directly involve grammar knowledge. The term grammar is meant here in the widest sense to include XML schemas, syntax definitions, interface descriptions, APIs, and interaction protocols. The most obvious examples of grammar-dependent software are document processors, parsers, import/export functionality, and generative programming tools. Even though grammarware is so omnipresent, it is somewhat neglected --- from an engineering point of view. We lay out an agenda that is meant to promote research on improving the quality of grammarware and on increasing the productivity of grammarware development.
Modular Denotational Semantics for Compiler Construction
- In European Symposium on Programming
, 1996
"... . We show the benefits of applying modular monadic semantics to compiler construction. Modular monadic semantics allows us to define a language with a rich set of features from reusable building blocks, and use program transformation and equational reasoning to improve code. Compared to denotational ..."
Abstract
-
Cited by 52 (4 self)
- Add to MetaCart
. We show the benefits of applying modular monadic semantics to compiler construction. Modular monadic semantics allows us to define a language with a rich set of features from reusable building blocks, and use program transformation and equational reasoning to improve code. Compared to denotational semantics, reasoning in monadic style offers the added benefits of highly modularized proofs and more widely applicable results. To demonstrate, we present an axiomatization of environments, and use it to prove the correctness of a well-known compilation technique. The monadic approach also facilitates generating code in various target languages with different sets of built-in features. 1 Introduction We propose a modular semantics which allows language designers to add (or remove) programming language features without causing global changes to the existing specification, derive a compilation scheme from semantic descriptions, prove the correctness of program transformation and compilation...
Multi-Stage Programming: Axiomatization and Type Safety (Extended Abstract)
- In 25th International Colloquium on Automata, Languages, and Programming
, 1998
"... Multi-staged programming provides a new paradigm for constructing efficient solutions to complex problems. Techniques such as program generation, multi-level partial evaluation, and run-time code generation respond to the need for general purpose solutions which do not pay run-time interpretive over ..."
Abstract
-
Cited by 33 (15 self)
- Add to MetaCart
Multi-staged programming provides a new paradigm for constructing efficient solutions to complex problems. Techniques such as program generation, multi-level partial evaluation, and run-time code generation respond to the need for general purpose solutions which do not pay run-time interpretive overheads. This paper provides a foundation for the formal analysis of one such system. We introduce a multi-stage language and present its axiomatic, reduction, and natural semantics. Our axiomatic semantics is an extension of the call-by-value -calculus with staging constructs. We demonstrate the soundness of the axiomatic semantics with respect to the natural semantics. We show that staged-languages can "go Wrong" in new ways, and devise a type system that screens out such programs. Finally, we present a proof of the soundness of this type system with respect to the reduction semantics, and show how to extend this result to the natural semantics. 1 Introduction Recently, there has been signi...
DSL Implementation Using Staging and Monads
- In Second Conference on Domain-Specific Languages (DSL'99
, 1999
"... The impact of Domain Specific Languages (DSLs) on software design is considerable. They allow programs to be more concise than equivalent programs written in a high-level programming languages. They relieve programmers from making decisions about data-structure and algorithm design, and thus allows ..."
Abstract
-
Cited by 15 (5 self)
- Add to MetaCart
The impact of Domain Specific Languages (DSLs) on software design is considerable. They allow programs to be more concise than equivalent programs written in a high-level programming languages. They relieve programmers from making decisions about data-structure and algorithm design, and thus allows solutions to be constructed quickly. Because DSL's are at a higher level of abstraction they are easier to maintain and reason about than equivalent programs written in a highlevel language, and perhaps most importantly they can be written by domain experts rather than programmers. The problem is that DSL implementation is costly and prone to errors, and that high level approaches to DSL implementation often produce inefficient systems. By using two new programming language mechanisms, program staging and monadic abstraction, we can lower the cost of DSL implementations by allowing reuse at many levels. These mechanisms provide the expressive power that allows the construction of many compil...
A guide to VLISP, a verified programming language implementation
- M 92B091, The MITRE Corporation
, 1992
"... The Verified Programming Language Implementation project has developed a formally verified implementation of the Scheme programming language, called VLISP. This report summarizes the results of the project. It also provides an overview of a group of reports presenting the details of the VLISP implem ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
The Verified Programming Language Implementation project has developed a formally verified implementation of the Scheme programming language, called VLISP. This report summarizes the results of the project. It also provides an overview of a group of reports presenting the details of the VLISP implementation and the logical proofs of its correctness.
From Interpreter to Compiler using Staging and Monads
, 1998
"... In writing this paper we had two goals. First, to promote MetaML, a programming language for writing staged programs, and second, to demonstrate that staging a program can have significant benefits. We do this by example: the derivation of an executable compiler for a small language. We derive the c ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
In writing this paper we had two goals. First, to promote MetaML, a programming language for writing staged programs, and second, to demonstrate that staging a program can have significant benefits. We do this by example: the derivation of an executable compiler for a small language. We derive the compiler in a rigorous fashion from a semantic description of the language. This is done by staging a denotational semantics, expressed as a monadic interpreter. The compiler is a program generator, taking a program in the source language "a while-program" as input and producing an ML program as target. The ML program produced is in a restricted subset of ML over which the programmer has complete control. It is encapsulated in a special data-structure called code. The meta-programming capabilities of MetaML allow this data-structure to be directly executed "run-time code generation", or to be analysed. We illustrate this analysis of generated code to build a source to source transf...
Sort Inference in Action Semantics
, 1996
"... Action semantics is a semantic meta-language developed by Mosses and Watt for specifying programming languages. The work reported in this thesis is part of a project to develop a system, called ACTRESS, that is a semantics-directed compiler generator based on action semantics. The aims of this proje ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Action semantics is a semantic meta-language developed by Mosses and Watt for specifying programming languages. The work reported in this thesis is part of a project to develop a system, called ACTRESS, that is a semantics-directed compiler generator based on action semantics. The aims of this project are to demonstrate the suitability of action semantics for this task, and to produce a system that improves on the performance of previous semantics-directed compiler generators. Moreover the ACTRESS system aims to accept a wide range of programming languages, including dynamically-scoped and dynamically-typed languages, but not to penalise the implementations of statically-typed or statically-bound languages as a result. ACTRESS automatically generates a compiler from an action semantic description of a programming language, and has been used to generate compilers for a small declarative language and a small imperative language. The generated compiler uses a number of standard modules to...
Proof Abstraction for Imperative Languages
, 2003
"... Modularity in programming language semantics derives from abstracting over the structure of underlying denotations, yielding semantic descriptions that are more abstract and reusable. One such semantic framework is Liang’s modular monadic semantics in which the underlying semantic structure is encap ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Modularity in programming language semantics derives from abstracting over the structure of underlying denotations, yielding semantic descriptions that are more abstract and reusable. One such semantic framework is Liang’s modular monadic semantics in which the underlying semantic structure is encapsulated with a monad. Such abstraction can be at odds with program verification, however, because program specifications require access to the (deliberately) hidden semantic representation. The techniques for reasoning about modular monadic definitions of imperative programs introduced here overcome this barrier. And, just like program definitions in modular monadic semantics, our program specifications and proofs are representation-independent and hold for whole classes of monads, thereby yielding proofs of great generality.
Verdi Compiler: Final Report
, 1994
"... Syntax : : : : : : : : : : : : : : : : : : : : : : 4 2.2 Definition of the Intermediate Language : : : : : : : : : : : : : : : : : : : : : : : : : 4 2.3 Determine the Mapping from the Abstract Syntax to IL : : : : : : : : : : : : : : : : 4 2.4 Prove the Correctness of the Mapping from Abstract Synta ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Syntax : : : : : : : : : : : : : : : : : : : : : : 4 2.2 Definition of the Intermediate Language : : : : : : : : : : : : : : : : : : : : : : : : : 4 2.3 Determine the Mapping from the Abstract Syntax to IL : : : : : : : : : : : : : : : : 4 2.4 Prove the Correctness of the Mapping from Abstract Syntax to IL : : : : : : : : : : 4 2.5 Implementation of the Well-formedness Checking Passes : : : : : : : : : : : : : : : : 5 2.6 Implementation of the IL Generator Pass : : : : : : : : : : : : : : : : : : : : : : : : 5 2.7 Implementation of the Code Generator Pass : : : : : : : : : : : : : : : : : : : : : : : 5 3 Problems Encountered 7 3.1 Mapping Concrete Syntax to Abstract Syntax : : : : : : : : : : : : : : : : : : : : : : 7 3.2 Definition of the Intermediate Language : : : : : : : : : : : : : : : : : : : : : : : : : 8 3.3 Determine the Mapping from the Abstract Syntax to IL : : : : : : : : : : : : : : : : 9 3.3.1 Conditional Expressions : : : : : : : : : : : : : : : : : : : : : : : : : : :...

