Results 1 - 10
of
54
How to Declare an Imperative
, 1995
"... How canweintegrate interaction into a purely declarative language? This tutorial describes a solution to this problem based on a monad. The solution has been implemented in the functional language Haskell and the declarative language Escher. Comparisons are given to other approaches to interaction b ..."
Abstract
-
Cited by 94 (3 self)
- Add to MetaCart
How canweintegrate interaction into a purely declarative language? This tutorial describes a solution to this problem based on a monad. The solution has been implemented in the functional language Haskell and the declarative language Escher. Comparisons are given to other approaches to interaction based on synchronous streams, continuations, linear logic, and side effects.
The Marriage of Effects and Monads
, 1998
"... this paper is to marry effects to monads, writing T for a computation that yields a value in and may have effects delimited by oe. Now we have that ( is ..."
Abstract
-
Cited by 75 (3 self)
- Add to MetaCart
this paper is to marry effects to monads, writing T for a computation that yields a value in and may have effects delimited by oe. Now we have that ( is
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...
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...
Back to Direct Style
, 1994
"... This paper describes the transformation of lambda-terms from continuation-passing style (CPS) to direct style. This transformation is the left inverse of Plotkin's left-to-right call-by-value CPS encoding for the pure lambda-calculus. Not all -terms are CPS terms, and not all CPS terms encode a left ..."
Abstract
-
Cited by 44 (20 self)
- Add to MetaCart
This paper describes the transformation of lambda-terms from continuation-passing style (CPS) to direct style. This transformation is the left inverse of Plotkin's left-to-right call-by-value CPS encoding for the pure lambda-calculus. Not all -terms are CPS terms, and not all CPS terms encode a left-to-right call-by-value evaluation. These CPS terms are characterized here; they can be mapped back to direct style. In addition, the two transformations -- to continuation-passing style and to direct style -- are factored using a language where all intermediate values are named and their computation is sequentialized. The issue of proper tail-recursion is also addressed.
Building up to Macroprogramming: An Intermediate Language for Sensor Networks
- In Proc. Fourth International Conference on Information Processing in Sensor Networks (IPSN’05
, 2005
"... Abstract — There is widespread agreement that a higher level programming model for sensor networks is needed. A variety of models have been developed, but the community is far from consensus. We propose an intermediate language to speed up the exploration of this design space. Our language, called t ..."
Abstract
-
Cited by 39 (2 self)
- Add to MetaCart
Abstract — There is widespread agreement that a higher level programming model for sensor networks is needed. A variety of models have been developed, but the community is far from consensus. We propose an intermediate language to speed up the exploration of this design space. Our language, called the Token Machine Language (TML) can be targeted by compilers for higher level systems. TML provides a layer of abstraction for a lower-level runtime environment, such as TinyOS. TML is intended to capture coordinated activity in a sensor network. Notable features of TML are its atomic action model of concurrency, and its unification of communication, control, and storage around the concept of a token. Tokens are small objects, typically under a hundred bytes, and can be disseminated across the network. A token causes computation upon its arrival at a site by invoking a token handler. The effect of the computation is to atomically change the token’s own state as well as the state of shared variables at the site. I.
Monads and Effects
- IN INTERNATIONAL SUMMER SCHOOL ON APPLIED SEMANTICS APPSEM’2000
, 2000
"... A tension in language design has been between simple semantics on the one hand, and rich possibilities for side-effects, exception handling and so on on the other. The introduction of monads has made a large step towards reconciling these alternatives. First proposed by Moggi as a way of structu ..."
Abstract
-
Cited by 39 (6 self)
- Add to MetaCart
A tension in language design has been between simple semantics on the one hand, and rich possibilities for side-effects, exception handling and so on on the other. The introduction of monads has made a large step towards reconciling these alternatives. First proposed by Moggi as a way of structuring semantic descriptions, they were adopted by Wadler to structure Haskell programs, and now offer a general technique for delimiting the scope of effects, thus reconciling referential transparency and imperative operations within one programming language. Monads have been used to solve long-standing problems such as adding pointers and assignment, inter-language working, and exception handling to Haskell, without compromising its purely functional semantics. The course will introduce monads, effects and related notions, and exemplify their applications in programming (Haskell) and in compilation (MLj). The course will present typed metalanguages for monads and related categorica...
Reflection in logic, functional and object-oriented programming: a Short Comparative Study
- In IJCAI '95 Workshop on Reflection and Metalevel Architectures and their Applications in AI
, 1995
"... Reflection is a wide-ranging concept that has been studied independently in many different areas of science in general, and computer science in particular. Even in the sub-area of programming languages, it has been applied to different paradigms, especially the logic, functional and objectoriented o ..."
Abstract
-
Cited by 31 (1 self)
- Add to MetaCart
Reflection is a wide-ranging concept that has been studied independently in many different areas of science in general, and computer science in particular. Even in the sub-area of programming languages, it has been applied to different paradigms, especially the logic, functional and objectoriented ones. Partly because of different past influences, but also because researchers in these communities scarcely talk to each others, concepts have evolved separately, sometimes to the point where it is hard for people in one community to recognize similarities in the work of others, not to speak about cross-fertilization among them. In this paper, we propose a synthesis covering mainly the application of computation reflection to programming languages. We compare the different approaches and try to identify similar concepts hidden behind different names or constructs. We also point out the different emphasis that has been given to different concepts in each of them. We do not claim neither comp...
Syntactic Accidents in Program Analysis: On the Impact of the CPS Transformation
- Journal of Functional Programming
, 2000
"... Our results formalize and confirm a folklore theorem about traditional bindingtime analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuati ..."
Abstract
-
Cited by 25 (9 self)
- Add to MetaCart
Our results formalize and confirm a folklore theorem about traditional bindingtime analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuations.
Partial Evaluation for Higher-Order Languages with State
, 1996
"... We have designed and implemented an offline partial evaluator for a higher-order language with first-class references. Its distinguishing feature over other partial evaluators is its ability to perform assignments to local and global references at specialization time for a higher-order language. The ..."
Abstract
-
Cited by 23 (7 self)
- Add to MetaCart
We have designed and implemented an offline partial evaluator for a higher-order language with first-class references. Its distinguishing feature over other partial evaluators is its ability to perform assignments to local and global references at specialization time for a higher-order language. The partial evaluator consists of a region-based monovariant binding-time analysis and a specializer in essentially continuation-passing store-passing style, thus generalizing type-based binding-time analysis and continuation-based partial evaluation. The partial evaluator yields good results for realistic problems such as object-oriented programming, unification, and specializer generation. Keywords: higher-order programming, program transformation, partial evaluation, state Categories: D.1.1 Applicative (Functional) Programming, D.1.2 Automatic Programming, D.3.1 Formal Definitions and Theory, Semantics, D.3.2 Language Classifications, Applicative languages, D.3.4 Processors, I.2.2 Automatic...

