Results 1 -
4 of
4
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...
Action Semantics Reasoning About Functional Programs
- Mathematical Structures in Computer Science
, 1996
"... syntax The algebraic definition of abstract syntax trees below can, more or less, be read as a BNF grammar. Emphatic brackets, [[: : : ]], indicate nodes in an abstract syntax tree. grammar: ffl Expression = Identifier "true" "false" [[ "" Identifier "." Expression ]] [[ Expression Expression ]] ..."
Abstract
-
Cited by 5 (2 self)
- Add to MetaCart
syntax The algebraic definition of abstract syntax trees below can, more or less, be read as a BNF grammar. Emphatic brackets, [[: : : ]], indicate nodes in an abstract syntax tree. grammar: ffl Expression = Identifier "true" "false" [[ "" Identifier "." Expression ]] [[ Expression Expression ]] [[ "rec" Identifier "." Expression ]] [[ "if" Expression "then" Expression "else" Expression ]] . Action semantics reasoning about functional programs 3 ffl Identifier = [[ letter + ]] . 2.2. Semantic functions Action semantic descriptions are syntax-directed in the denotational style: compositional semantic functions map abstract syntax into meaning and are defined inductively by semantic equations. There is one universal semantic domain, namely action, the sort of actions. Actions are expressed in a notation that looks a little like informal English prose but, in fact, it is a completely formal combinator-based notation. The verbose notation should be suggestive of the meaning of th...
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...
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...

