Results 1 - 10
of
12
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...
The essence of eta-expansion in partial evaluation
- LISP AND SYMBOLIC COMPUTATION
, 1995
"... Selective eta-expansion is a powerful "binding-time improvement", i.e., a source-program modification that makes a partial evaluator yield better results. But like most binding-time improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few. ..."
Abstract
-
Cited by 32 (11 self)
- Add to MetaCart
Selective eta-expansion is a powerful "binding-time improvement", i.e., a source-program modification that makes a partial evaluator yield better results. But like most binding-time improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few. In this paper, we describe the problem and the effect of eta-redexes in terms of monovariant binding-time propagation: eta-redexes preserve the static data ow of a source program by interfacing static higher-order values in dynamic contexts and dynamic higher-order values in static contexts. They contribute to two distinct binding-time improvements. We present two extensions of Gomard's monovariant binding-time analysis for the pure-calculus. Our extensions annotate and eta-expand-terms. The rst one eta-expands static higher-order values in dynamic contexts. The second also eta-expands dynamic higher-order values in static contexts. As a significant application, we show that our first binding-time analysis suffices to reformulate the traditional formulation of a CPS transformation into a modern onepass CPS transformer. This binding-time improvement is known, but it is still left unexplained in contemporary literature, e.g., about "cps-based" partial evaluation. We also outline the counterpart of eta-expansion for partially static data structures.
Theory and Practice of Action Semantics
- In MFCS '96, Proc. 21st Int. Symp. on Mathematical Foundations of Computer Science
, 1996
"... Action Semantics is a framework for the formal description of programming languages. Its main advantage over other frameworks is pragmatic: action-semantic descriptions (ASDs) scale up smoothly to realistic programming languages. This is due to the inherent extensibility and modifiability of ASD ..."
Abstract
-
Cited by 29 (13 self)
- Add to MetaCart
Action Semantics is a framework for the formal description of programming languages. Its main advantage over other frameworks is pragmatic: action-semantic descriptions (ASDs) scale up smoothly to realistic programming languages. This is due to the inherent extensibility and modifiability of ASDs, ensuring that extensions and changes to the described language require only proportionate changes in its description.
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...
OASIS: An Optimizing Action-based Compiler Generator
, 1994
"... . Action Semantics is a new and interesting foundation for semantics based compiler generation. In this paper we present several analyses of actions, and apply them in a compiler generator capable of generating efficient, optimizing compilers for procedural and functional languages with higher order ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
. Action Semantics is a new and interesting foundation for semantics based compiler generation. In this paper we present several analyses of actions, and apply them in a compiler generator capable of generating efficient, optimizing compilers for procedural and functional languages with higher order recursive functions. The automatically generated compilers producecode that is comparable with code produced by handwritten compilers. 1 Introduction Semantics based compiler generation has long been a goal in computer science. Automatic generation of compilers from semantic descriptions of programming languages relieves programmers and language theorists from much of the burden of writing compilers. We describe the OASIS (OptimizingAction-based Semantic Implementation System) compiler generator, and especially the analyses that provide the information enabling the code generator to produce good quality code. The generated compilers expand a given abstract syntax tree to the equivalent ac...
A Study in Higher-Order Programming Languages
, 1997
"... : This thesis describes some interplays between the specification and the implementation of higher-order programming languages. We first investigate a traditional implementation of Scheme (compiler, run-time machine). We then turn to Action Semantics. And finally we cross-fertilize these two approac ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
: This thesis describes some interplays between the specification and the implementation of higher-order programming languages. We first investigate a traditional implementation of Scheme (compiler, run-time machine). We then turn to Action Semantics. And finally we cross-fertilize these two approaches using both syntax-directed and type-directed partial evaluation and introducing an alternative representation of data structures. December 1997 To my late father Acknowledgments First of all I thank my supervisor, Olivier Danvy, from whom I learn every day. I appreciate his technical expertise and his knowledge of how to work scientifically. His insight in computer science and his will to share this insight with his students exceeds what I have otherwise been exposed to. Peter D. Mosses's course at DAIMI in the spring of 1997 was an inspiring tour of Action Semantics. Rene Vestergaard gave useful comments on a draft of this thesis of both syntactic and semantic nature. He pointed ou...
Compiling Actions by Partial Evaluation, Revisited
- Department of Computer Science, University of Aarhus
, 1998
"... We revisit Bondorf and Palsberg's compilation of actions using the oine syntax-directed partial evaluator Similix (FPCA'93, JFP'96), and we compare it in detail with using an online typedirected partial evaluator. In contrast to Similix, our typedirected partial evaluator is idempotent and requires ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
We revisit Bondorf and Palsberg's compilation of actions using the oine syntax-directed partial evaluator Similix (FPCA'93, JFP'96), and we compare it in detail with using an online typedirected partial evaluator. In contrast to Similix, our typedirected partial evaluator is idempotent and requires no \bindingtime improvements." It also appears to consume about 7 times less space and to be about 28 times faster than Similix, and to yield residual programs that are perceptibly more eÆcient than those generated by Similix. Basic Research in Computer Science, Centre of the Danish National Research Foundation. Home page: http://www.brics.dk y Building 540, Ny Munkegade, DK-8000 Aarhus C, Denmark. E-mail: fdanvy,mrhigerg@brics.dk Contents 1 Introduction 4 2 Syntax-Directed vs. Type-Directed Partial Evaluation 6 2.1 Syntax-directed partial evaluation (sdpe) . . . . . . . . . . . 6 2.2 Type-directed partial evaluation (tdpe) . . . . . . . . . . . . 7 2.3 Comparing the input to synta...
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...
Design, Analysis and Reasoning about Tools: Abstracts from the Third Workshop
, 1993
"... s from the Third Workshop Flemming Nielson (editor) October 1993 1 Introduction The third DART workshop took place on Thursday August l9th and Friday August 20th at the Department of Computer Science (DIKU) at the University of Copenhagen; it was organized by Mads Rosendahl and others at DIKU, and ..."
Abstract
- Add to MetaCart
s from the Third Workshop Flemming Nielson (editor) October 1993 1 Introduction The third DART workshop took place on Thursday August l9th and Friday August 20th at the Department of Computer Science (DIKU) at the University of Copenhagen; it was organized by Mads Rosendahl and others at DIKU, and Torben Amtoft and Susanne Brønberg helped producing this report. The first day comprised survey presentations whereas the second contained more research oriented talks. The primary aim of the workshop was to increase the awareness of DART participants for each other's work, to stimulate collaboration between the di#erent groups, and to inform Danish industry about the skills possessed by the groups. The DART project started in March 1991 (prematurely terminating a smaller project on Formal Implementation, Transformation and Analysis of Programs) and is funded by the Danish Research Councils as part of the Danish Research Programme on Informatics. To date it has received about 8 million Danis...

