Results 1 - 10
of
29
Representing Layered Monads
- PROCEEDINGS OF THE TWENTY-SIXTH ANNUAL ACM SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES
, 1999
"... There has already been considerable research on constructing modular, monad-based specications of computational effects (state, exceptions, nondeterminism, etc.) in programming languages. We present a simple framework in this tradition, based on a Church-style effect-typing system for an ML-like lan ..."
Abstract
-
Cited by 48 (2 self)
- Add to MetaCart
There has already been considerable research on constructing modular, monad-based specications of computational effects (state, exceptions, nondeterminism, etc.) in programming languages. We present a simple framework in this tradition, based on a Church-style effect-typing system for an ML-like language. The semantics of this language is formally dened by a series of monadic translations, each one expanding away a layer of effects. Such a layered specication is easy to reason about, but its direct implementation (whether by parameterized interpretation or by actual translation) is often prohibitively inefficient. By exploiting deeper semantic properties of monads, however, it is also possible to derive a vastly more efficient implementation: we show that each layer of eects can be uniformly simulated by continuation-passing, and further that multiple such layers can themselves be simulated by a standard semantics for call/cc and mutable state. Thus, even multi-effect programs can be execu...
On the Construction of Correct Compiler Back-Ends: An ASM Approach
- Journal of Universal Computer Science
, 1997
"... : Existing works on the construction of correct compilers have at least one of the following drawbacks: (i) correct compilers do not compile into machine code of existing processors. Instead they compile into programs of an abstract machine which ignores limitations and properties of real-life proce ..."
Abstract
-
Cited by 27 (5 self)
- Add to MetaCart
: Existing works on the construction of correct compilers have at least one of the following drawbacks: (i) correct compilers do not compile into machine code of existing processors. Instead they compile into programs of an abstract machine which ignores limitations and properties of real-life processors. (ii) the code generated by correct compilers is orders of magnitudes slower than the code generated by unverified compilers. (iii) the considered source language is much less complex than real-life programming languages. This paper focuses on the construction of correct compiler backends which generate machine-code for real-life processors from realistic intermediate languages. Our main results are the following: (i) We present a proof approach based on abstract state machines for bottom-up rewriting system specifications (BURS) for back-end generators. A significant part of this proof can be parametrized with the intermediate and machine language. (ii) The performance of the code con...
Verification of Compilers
- In Correct System Design
, 1999
"... We report about a joint project of the universities at Karlsruhe, Kiel and Ulm on how to get correct compilers for realistic programming languages. Arguing about compiler correctness must start from a compiling specification describing the correspondence of source and target language in formal t ..."
Abstract
-
Cited by 25 (1 self)
- Add to MetaCart
We report about a joint project of the universities at Karlsruhe, Kiel and Ulm on how to get correct compilers for realistic programming languages. Arguing about compiler correctness must start from a compiling specification describing the correspondence of source and target language in formal terms. We have chosen to use abstract state machines to formalize this correspondence. This allows us to stay with traditional compiler architectures for subdividing the compiler task. A main achievement is the use of program checking for replacing large parts of compiler verification by the much simpler task of verifying program checkers.
Two for the Price of One: Composing Partial Evaluation and Compilation
, 1997
"... One of the flagship applications of partial evaluation is compilation and compiler generation. However, partial evaluation is usually expressed as a source-to-source transformation for high-level languages, whereas realistic compilers produce object code. We close this gap by composing a partial eva ..."
Abstract
-
Cited by 20 (3 self)
- Add to MetaCart
One of the flagship applications of partial evaluation is compilation and compiler generation. However, partial evaluation is usually expressed as a source-to-source transformation for high-level languages, whereas realistic compilers produce object code. We close this gap by composing a partial evaluator with a compiler by automatic means. Our work is a successful application of several meta-computation techniques to build the system, both in theory and in practice. The composition is an application of deforestation or fusion. The result is a run-time code generation system built from existing components. Its applications are numerous. For example, it allows the language designer to perform interpreter-based experiments with a source-to-source version of the partial evaluator before building a realistic compiler which generates object code automatically.
Modular Compilers Based on Monad Transformers
- In Proceedings of the IEEE International Conference on Computer Languages
, 1998
"... The monadic style of language specification has the advantages of modularity and extensibility: it is simple to add or change features in an interpreter to reflect modifications in the source language. It has proven difficult to extend the method to compilation. We demonstrate that by introducing ma ..."
Abstract
-
Cited by 19 (2 self)
- Add to MetaCart
The monadic style of language specification has the advantages of modularity and extensibility: it is simple to add or change features in an interpreter to reflect modifications in the source language. It has proven difficult to extend the method to compilation. We demonstrate that by introducing machine-like stores (code and data) into the monadic semantics and then partially evaluating the resulting semantic expressions, we can achieve many of the same advantages for a compiler as for an interpreter. A number of language constructs and features are compiled: expressions, CBV and CBN evaluation of -expressions, dynamic scoping, and various imperative features. The treatment of recursive procedures is outlined as well. The resulting method allows compilers to be constructed in a mix-and-match fashion just as in a monad-structured interpreter. 1 Introduction and Related Work This paper concerns the construction of modular compilers for high-level programming languages from reusable co...
TinkerType: a language for playing with formal systems
, 2003
"... TinkerType is a pragmatic framework for compact and modular description of formal systems (type systems, operational semantics, logics, etc.). A family of related systems is broken down into a set of clauses – individual inference rules – and a set of features controlling the inclusion of clauses in ..."
Abstract
-
Cited by 15 (0 self)
- Add to MetaCart
TinkerType is a pragmatic framework for compact and modular description of formal systems (type systems, operational semantics, logics, etc.). A family of related systems is broken down into a set of clauses – individual inference rules – and a set of features controlling the inclusion of clauses in particular systems. Simple static checks are used to help maintain consistency of the generated systems. We present TinkerType and its implementation and describe its application to two substantial repositories of typed lambda-calculi. The first repository covers a broad range of typing features, including subtyping, polymorphism, type operators and kinding, computational effects, and dependent types. It describes both declarative and algorithmic aspects of the systems, and can be used with our tool, the TinkerType Assembler,to generate calculi either in the form of typeset collections of inference rules or as executable ML typecheckers. The second repository addresses a smaller collection of systems, and provides modularized proofs of basic safety properties.
Monads as a theoretical foundation for AOP
- In International Workshop on Aspect-Oriented Programming at ECOOP
, 1997
"... this paper is that much can be learned both about aspects and the aspect weaver if we think of the functional code as a monadic style program and we couch the different aspects into monads. The weaver then becomes a lifter to transform programs through different monads ..."
Abstract
-
Cited by 14 (1 self)
- Add to MetaCart
this paper is that much can be learned both about aspects and the aspect weaver if we think of the functional code as a monadic style program and we couch the different aspects into monads. The weaver then becomes a lifter to transform programs through different monads
Reuse by Program Transformation
- Functional Programming Trends 1999. Intellect, 2000. Selected papers from the 1st Scottish Functional Programming Workshop
, 2000
"... Certain adaptations, that are usually performed manually by functional programmers are formalized by program transformations in this paper. We focus on adaptations to obtain a more reusable version of a program or a version needed for a special use case. The paper provides a few examples, namely pro ..."
Abstract
-
Cited by 14 (6 self)
- Add to MetaCart
Certain adaptations, that are usually performed manually by functional programmers are formalized by program transformations in this paper. We focus on adaptations to obtain a more reusable version of a program or a version needed for a special use case. The paper provides a few examples, namely propagation of additional parameters, introduction of monadic style, and symbolic rewriting. The corresponding transformations are specified by inference rules in the style of natural semantics. Preservation properties such as type and semantics preservation are discussed. The overall thesis of this paper is that suitable operator suites for automated adaptations and a corresponding transformational programming style can eventually be combined with other programming styles, such as polymorphic programming, modular programming, or the monadic style, in order to improve reusability of functional programs. ⋆ Partial support received from the Netherlands Organization for Scientific Research (NWO) under the Generation of Program Transformation Systems project
Achieving information flow security through precise control of effects
- In 18th IEEE Computer Security Foundations Workshop
, 2005
"... This paper advocates a novel approach to the construction of secure software: controlling information flow and maintaining integrity via monadic encapsulation of effects. This approach is constructive, relying on properties of monads and monad transformers to build, verify, and extend secure softwar ..."
Abstract
-
Cited by 11 (3 self)
- Add to MetaCart
This paper advocates a novel approach to the construction of secure software: controlling information flow and maintaining integrity via monadic encapsulation of effects. This approach is constructive, relying on properties of monads and monad transformers to build, verify, and extend secure software systems. We illustrate this approach by construction of abstract operating systems called separation kernels. Starting from a mathematical model of shared-state concurrency based on monads of resumptions and state, we outline the development by stepwise refinements of separation kernels supporting Unix-like system calls, interdomain communication, and a formally verified security policy (domain separation). Because monads may be easily and safely represented within any pure, higher-order, typed functional language, the resulting system models may be directly realized within a language such as Haskell. 1.
Monads for Natural Language Semantics
"... Accounts of semantic phenomena often involve extending types of meanings and revising composition rules at the same time. The concept of monads allows many such accounts---for intensionality, variable binding, quantification and focus---to be stated uniformly and compositionally. ..."
Abstract
-
Cited by 10 (0 self)
- Add to MetaCart
Accounts of semantic phenomena often involve extending types of meanings and revising composition rules at the same time. The concept of monads allows many such accounts---for intensionality, variable binding, quantification and focus---to be stated uniformly and compositionally.

