Results 1 - 10
of
17
Type-directed partial evaluation
- Proceedings of the Twenty-Third Annual ACM Symposium on Principles of Programming Languages
, 1996
"... Abstract. Type-directed partial evaluation stems from the residualization of arbitrary static values in dynamic contexts, given their type. Its algorithm coincides with the one for coercing asubtype value into a supertype value, which itself coincides with the one of normalization in the-calculus. T ..."
Abstract
-
Cited by 195 (38 self)
- Add to MetaCart
Abstract. Type-directed partial evaluation stems from the residualization of arbitrary static values in dynamic contexts, given their type. Its algorithm coincides with the one for coercing asubtype value into a supertype value, which itself coincides with the one of normalization in the-calculus. Type-directed partial evaluation is thus used to specialize compiled, closed programs, given their type. Since Similix, let-insertion is a cornerstone of partial evaluators for callby-value procedural programs with computational e ects. It prevents the duplication of residual computations, and more generally maintains the order of dynamic side e ects in residual programs. This article describes the extension of type-directed partial evaluation to insert residual let expressions. This extension requires the userto annotate arrowtypes with e ect information. It is achieved by delimiting and abstracting control, comparably to continuation-based specialization in direct style. It enables type-directed partial evaluation of e ectful programs (e.g.,ade nitional lambda-interpreter for an imperative language) that are in direct style. The residual programs are in A-normal form. 1
On the Expressive Power of Programming Languages
- Science of Computer Programming
, 1990
"... The literature on programming languages contains an abundance of informal claims on the relative expressive power of programming languages, but there is no framework for formalizing such statements nor for deriving interesting consequences. As a first step in this direction, we develop a formal noti ..."
Abstract
-
Cited by 116 (4 self)
- Add to MetaCart
The literature on programming languages contains an abundance of informal claims on the relative expressive power of programming languages, but there is no framework for formalizing such statements nor for deriving interesting consequences. As a first step in this direction, we develop a formal notion of expressiveness and investigate its properties. To validate the theory, we analyze some widely held beliefs about the expressive power of several extensions of functional languages. Based on these results, we believe that our system correctly captures many of the informal ideas on expressiveness, and that it constitutes a foundation for further research in this direction. 1 Comparing Programming Languages The literature on programming languages contains an abundance of informal claims on the expressive power of programming languages. Arguments in these contexts typically assert the expressibility or non-expressibility of programming constructs relative to a language. Unfortunately, pro...
DrScheme: A programming environment for Scheme
- Journal of Functional Programming
, 2002
"... DrScheme is a programming environment for Scheme. It fully integrates a graphicsenriched editor, a parser for multiple variants of Scheme, a functional read-eval-print loop, and an algebraic printer. The environment is especially useful for students, because it has a tower of syntactically restricte ..."
Abstract
-
Cited by 99 (43 self)
- Add to MetaCart
DrScheme is a programming environment for Scheme. It fully integrates a graphicsenriched editor, a parser for multiple variants of Scheme, a functional read-eval-print loop, and an algebraic printer. The environment is especially useful for students, because it has a tower of syntactically restricted variants of Scheme that are designed to catch typical student mistakes and explain them in terms the students understand. The environment is also useful for professional programmers, due to its sophisticated programming tools, such as the static debugger, and its advanced language features, such as units and mixins. Beyond the ordinary programming environment tools, DrScheme provides an algebraic stepper, a context-sensitive syntax checker, and a static debugger. The stepper reduces Scheme programs to values, according to the reduction semantics of Scheme. It is useful for explaining the semantics of linguistic facilities and for studying the behavior of small programs. The syntax checker annotates programs with font and color changes based on the syntactic structure of the program. On demand, it draws arrows that point from bound to binding occurrences of identifiers. It also supports α-renaming. Finally, the static debugger provides a type inference system that explains specific inferences in terms of a value-flow graph, selectively overlaid on the program text.
DDD: A System for Mechanized Digital Design Derivation
, 1997
"... Our research group at Indiana University is investigating a formalization of digital system design that is based on functional algebra. We have developed a transformation system called DDD to facilitate this study. DDD stands for digital design derivation; the system is used interactively to trans ..."
Abstract
-
Cited by 28 (10 self)
- Add to MetaCart
Our research group at Indiana University is investigating a formalization of digital system design that is based on functional algebra. We have developed a transformation system called DDD to facilitate this study. DDD stands for digital design derivation; the system is used interactively to translate higher level speci cations into hierarchical boolean systems, to which logic synthesis tools are then applied. In this paper, we take a detailed look at how the system is used. In two examples, we examine the sequence of intermediate expressions produced as an implementation is derived. We discuss how these expressions are used at strategic levels of thinking. We illustrate how the choice of target technology in uences the tactical course of derivation. Throughout, we try to give a sense of how functional abstractions are
Extending the Scope of Syntactic Abstraction
, 1999
"... ion # Oscar Waddell University of Kansas owaddell@ittc.ukans.edu R. Kent Dybvig Indiana University dyb@cs.indiana.edu Abstract The benefits of module systems and lexically scoped syntactic abstraction (macro) facilities are well-established in the literature. This paper presents a system that s ..."
Abstract
-
Cited by 22 (1 self)
- Add to MetaCart
ion # Oscar Waddell University of Kansas owaddell@ittc.ukans.edu R. Kent Dybvig Indiana University dyb@cs.indiana.edu Abstract The benefits of module systems and lexically scoped syntactic abstraction (macro) facilities are well-established in the literature. This paper presents a system that seamlessly integrates modules and lexically scoped macros. The system is fully static, permits mutually recursive modules, and supports separate compilation. We show that more dynamic module facilities are easily implemented at the source level in the extended language supported by the system. 1 Introduction The benefits of module systems and lexically scoped syntactic abstraction (macro) facilities are well-established [1, 2, 3, 6, 7, 8, 12, 10, 11, 15, 16, 18]. Over the past several years there has been increasing interest in combining lexically scoped macros and modules [2, 16, 17]. Building on this work we present here the first fully implemented system that allows arbitrary composition...
Syntactic Abstraction in Scheme
- Lisp and Symbolic Computation
, 1992
"... Naive program transformations can have surprising effects due to the interaction between introduced identifier references and previously existing identifier bindings, or between introduced bindings and previously existing references. These interactions can result in the inadvertent binding, or captu ..."
Abstract
-
Cited by 20 (2 self)
- Add to MetaCart
Naive program transformations can have surprising effects due to the interaction between introduced identifier references and previously existing identifier bindings, or between introduced bindings and previously existing references. These interactions can result in the inadvertent binding, or capturing, of identifiers. A further complication results from the fact that the transformed program may have little resemblance to the original program, making correlation of source and object code difficult. We address both the capturing problem and the problem of source-object code correlation. Previous approaches to the capturing problem have been both inadequate and overly restrictive, and the problem of source-object code correlation has been largely unaddressed. Our approach is based on a new algorithm for implementing syntactic transformations...
Expansion-Passing Style: A General Macro Mechanism
- Lisp and Symbolic Computation
, 1988
"... The traditional Lisp macro expansion facility inhibits several important forms of expansion control. These include selective expansion of subexpressions, expansion of subexpressions using modified expansion functions, and expansion of application and variable expressions. Furthermore, the expansion ..."
Abstract
-
Cited by 13 (1 self)
- Add to MetaCart
The traditional Lisp macro expansion facility inhibits several important forms of expansion control. These include selective expansion of subexpressions, expansion of subexpressions using modified expansion functions, and expansion of application and variable expressions. Furthermore, the expansion algorithm must treat every special form as a separate case. The result is limited expressive power and poor modularity. We propose an alternative facility that avoids these problems, using a technique called expansion-passing style (EPS). The critical difference between the facility proposed here and the traditional macro mechanism is that expansion functions are passed not only an expression to be expanded but also another expansion function. This function may or may not be used to perform further expansion. The power of this technique is illustrated with several examples. Most Lisp systems may be adapted to employ this technique.
Extensible grammars for language specialization
- In Proceedings of the Fourth International Workshop on Database Programming Languages
, 1993
"... A frequent dilemma in the design of a database programming language is the choice between a language with a rich set of tailored notations for schema definitions, query expressions, etc., and a small, simple core language. We address this dilemma by proposing extensible grammars, a syntax-definition ..."
Abstract
-
Cited by 12 (2 self)
- Add to MetaCart
A frequent dilemma in the design of a database programming language is the choice between a language with a rich set of tailored notations for schema definitions, query expressions, etc., and a small, simple core language. We address this dilemma by proposing extensible grammars, a syntax-definition formalism for incremental language extensions and restrictions based on an initial core language. The translation of programs written in rich object languages into a small core language is defined via syntax-directed patterns. In contrast to macro-expansion and program-rewriting tools, our extensible grammars respect scoping rules. Therefore, we can introduce binding constructs while avoiding problems with unwanted name clashes. We develop extensible grammars and illustrate their use by extend-ing the lambda calculus with let-bindings, conditionals, and SQL-style query expressions. We then give a formal description of the underlying parsing, transformat,ion, and substitution rules. Finally, we sketch how these rules are exploit,ed in the implementation of a generic, extensible parser package. 1
Hierarchical Modularity And Intermodule Optimization
, 1997
"... Separate compilation is an important tool for coping with design complexity in large software projects. When done right it can also be used to create software libraries, thus promoting code reuse. But separate compilation comes in various flavors and has many facets: namespace management, linking, o ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
Separate compilation is an important tool for coping with design complexity in large software projects. When done right it can also be used to create software libraries, thus promoting code reuse. But separate compilation comes in various flavors and has many facets: namespace management, linking, optimization, dependencies. Many programming languages identify modular units with units of compilation, while only a few extend this to permit hierarchies of language-level modules within individual compilation units. When the number of compilation units is large, then it becomes increasingly important that the mechanism of separate compilation itself can be used to control namespaces. The group model implemented in SML/NJ's compilation manager CM provides the necessary facilities to avoid unwanted interferences between unrelated parts of large programs. Compilation units are arranged into groups, and explicit export interfaces can be used to control namespaces. When there are many groups, t...
Writing Hygienic Macros in Scheme with Syntax-Case
- Indiana Computer Science Department
, 1992
"... ion in Scheme" [4], which was mostly written before Bob's death, does attempt to justify the macro system and to place it within the context of other work. The companion report also contains more detail on the algorithms used by our implementation of the macro system. A complete implementation of th ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
ion in Scheme" [4], which was mostly written before Bob's death, does attempt to justify the macro system and to place it within the context of other work. The companion report also contains more detail on the algorithms used by our implementation of the macro system. A complete implementation of the macro system is available, and should run in any Scheme system with the provision of a few implementation-dependent "hooks." It can be obtained via "anonymous ftp" from iuvax.cs.indiana.edu in the directory pub/scheme/syntax-case. If you do not have ftp access, contact me and I will get the implementation to you somehow. The implementation is based on an earlier implementation by Bob and myself of the system described in an appendix to the "Revised 4 Report on the Algorithmic Language Scheme" [2]. The present implementation, however, is more robust and significantly more efficient. I would like to thank Carl Bruggeman for his detailed and thoughtful comments on drafts of this report, and...

