Results 1 -
5 of
5
MetaML and Multi-Stage Programming with Explicit Annotations
- Theoretical Computer Science
, 1999
"... . We introduce MetaML, a practically-motivated, staticallytyped multi-stage programming language. MetaML is a "real" language. We have built an implementation and used it to solve multi-stage problems. MetaML allows the programmer to construct, combine, and execute code fragments in a type-safe ..."
Abstract
-
Cited by 201 (30 self)
- Add to MetaCart
. We introduce MetaML, a practically-motivated, staticallytyped multi-stage programming language. MetaML is a "real" language. We have built an implementation and used it to solve multi-stage problems. MetaML allows the programmer to construct, combine, and execute code fragments in a type-safe manner. Code fragments can contain free variables, but they obey the static-scoping principle. MetaML performs typechecking for all stages once and for all before the execution of the first stage. Certain anomalies with our first MetaML implementation led us to formalize an illustrative subset of the MetaML implementation. We present both a big-step semantics and type system for this subset, and prove the type system's soundness with respect to a big-step semantics. From a software engineering point of view, this means that generators written in the MetaML subset never generate unsafe programs. A type system and semantics for full MetaML is still ongoing work. We argue that multi-...
Towards a Theory of Bulk Types
, 1991
"... A database programming language can model application domains most naturally if it supports several bulk types, e.g., lists, sets, and relations. Indeed some persistent programming languages permit the programmer to define new bulk types that are appropriate to the application domain. Such a richly ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
A database programming language can model application domains most naturally if it supports several bulk types, e.g., lists, sets, and relations. Indeed some persistent programming languages permit the programmer to define new bulk types that are appropriate to the application domain. Such a richly typed language tends to be complex, since constructs must be provided to declare, construct, inspect, and update instances of every bulk type. The collection theory presented here controls the complexity of such richly typed languages by exploiting operations and properties common to a variety of bulk types. The theory is based on four operations -- three constructor operations and one iterator -- that obey certain algebraic laws. In addition, a rich set of additional operations can be defined in terms of the basic operations. Sets, bags, lists, certain trees, relations, and finite mappings are all encompassed by the collection theory. Conversely, types that we would not intuitively classify...
Using Reflection to Support Type-Safe Evolution in Persistent Systems
, 1996
"... Reflection has been used to address many different problem areas, and the term reflection has itself been used to describe several distinct processes. This paper identifies three simple operations, generation, raising and dynamic rebinding, which may be composed to yield several varieties of reflect ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Reflection has been used to address many different problem areas, and the term reflection has itself been used to describe several distinct processes. This paper identifies three simple operations, generation, raising and dynamic rebinding, which may be composed to yield several varieties of reflection. These can be used to allow a self-contained programming system to evolve, through the incorporation of new behaviour into either the application programs or the interpreter which controls their execution. Reflection is a powerful mechanism and potentially dangerous. Used in the context of persistent programming systems, safety is an important consideration: the integrity of large amounts of data may be at stake. This has led to the use of type checking in conjunction with reflection in such systems to provide some guarantees of safety. The paper describes the nature of reflection in persistent systems and identifies some example applications. 1
Macros that Reach Out and Touch Somewhere
"... By providing a macro facility, languages such as Scheme and Common Lisp allow users to define new special forms as local, syntactic program transformations. This allows users to abstract away what would otherwise be repetitive or cumbersome syntax. One limitation to the power of macro facilities is ..."
Abstract
- Add to MetaCart
By providing a macro facility, languages such as Scheme and Common Lisp allow users to define new special forms as local, syntactic program transformations. This allows users to abstract away what would otherwise be repetitive or cumbersome syntax. One limitation to the power of macro facilities is that only textual local transformations can be defined -- the user cannot, for example, define a delay macro which automatically inserts calls to force at all required points in the program. In this paper, we present a new kind of macro, called a data path macro, in which transformations can take place at any point along the dataflow path that includes the macro invocation. The heart of the data path macro facility is a dataflow analysis mechanism that allows the user to easily request powerful data flow analyses.

