Modular Denotational Semantics for Compiler Construction
نویسندگان
چکیده
We show the benefits of applying modular monadic semantics to compiler construction. Modular monadic semantics allows us to define a languagewith 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.
منابع مشابه
Modular Denotational Semantics for Compiler Construction ? Sheng
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 m...
متن کاملThe Template and Multiple Inheritance Approach into Attribute Grammars
Formal methods for describing programming language semantics, such as attribute grammars, operational semantics and denotational semantics, are not widely used since they are not modular, extensible and reusable. In the paper a new modular, extensible and reusable approach for specifying programming languages with attribute grammars is presented. The concepts from object-oriented programming, i...
متن کاملInterpreters From Functions and Grammars
-The addition of context free grammar rules to a functional language simplifies the construction of interpreters from denotationaI semantic language definitions. Functional abstraction over grammar rules enables the specification and processing of context sensitive language syntax aspects in a functional style. DenotatLonaI semantics Language design Language implementation Functional language G...
متن کاملIncreasing Modularity and Language-Independency in Automatically Generated Compilers
The work reported here is based on ideas from (modular) algebraic specifications of abstract data types [3 1,2,6,23], abstract semantic algebras [25,26], and compiler descriptions based on attribute grammars [22]. Many papers have utilized ideas of abstract data type theory to improve the structure of semantics definitions and/or compiler descriptions. In [4], following [lo] and [24], the funda...
متن کاملFrom standard to implementation denotational semantics
e are developing a compiler compiler. It takes as input the formal definition of a programming lanquage in Denotational Semantics and produces as output a fairly efficient compiler written in a systems programming language which in turn will produce code for a real machine. This wor:c ~ainly deals with the code qeneration parts.
متن کامل