Results 1 - 10
of
12
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-...
Multi-Stage Programming: Its Theory and Applications
, 1999
"... MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construct ..."
Abstract
-
Cited by 79 (18 self)
- Add to MetaCart
MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construction, combination, and execution of object-programs. Our thesis is that MetaML's three staging annotations provide a useful, theoretically sound basis for building program generators. This dissertation reports on our study of MetaML's staging constructs, their use, their implementation, and their formal semantics. Our results include an extended example of where MetaML allows us to produce efficient programs, an explanation of why implementing these constructs in traditional ways can be challenging, two formulations of MetaML's semantics, a type system for MetaML, and a proposal for extending ...
Tagless Staged Interpreters for Typed Languages
- In the International Conference on Functional Programming (ICFP ’02
, 2002
"... Multi-stage programming languages provide a convenient notation for explicitly staging programs. Staging a definitional interpreter for a domain specific language is one way of deriving an implementation that is both readable and efficient. In an untyped setting, staging an interpreter "removes a co ..."
Abstract
-
Cited by 43 (11 self)
- Add to MetaCart
Multi-stage programming languages provide a convenient notation for explicitly staging programs. Staging a definitional interpreter for a domain specific language is one way of deriving an implementation that is both readable and efficient. In an untyped setting, staging an interpreter "removes a complete layer of interpretive overhead", just like partial evaluation. In a typed setting however, Hindley-Milner type systems do not allow us to exploit typing information in the language being interpreted. In practice, this can have a slowdown cost factor of three or more times.
Specialization tools and techniques for systematic optimization of system software
- ACM Transactions on Computer Systems
, 2001
"... Specialization has been recognized as a powerful technique for optimizing operating systems. However, specialization has not been broadly applied beyond the research community because current techniques, based on manual specialization, are time-consuming and error-prone. The goal of the work describ ..."
Abstract
-
Cited by 38 (13 self)
- Add to MetaCart
Specialization has been recognized as a powerful technique for optimizing operating systems. However, specialization has not been broadly applied beyond the research community because current techniques, based on manual specialization, are time-consuming and error-prone. The goal of the work described in this paper is to help operating system tuners perform specialization more easily. We have built a specialization toolkit that assists the major tasks of specializing operating systems. We demonstrate the effectiveness of the toolkit by applying it to three diverse operating system components. We show that using tools to assist specialization enables significant performance optimizations without errorprone manual modifications. Our experience with the toolkit suggests new ways of designing systems that combine high performance and clean structure. 1
ML-like Inference for Classifiers
- In European Symposium on Programming, ESOP’04, D. Schmidt, Ed. Springer-Verlag LNCS 2986
, 2004
"... Environment classifiers were proposed as a new approach to typing multi-stage languages. Safety was established in the simply-typed and let-polymorphic settings. While the motivation for classifiers was the feasibility of inference, this was in fact not established. This paper starts with the ob ..."
Abstract
-
Cited by 22 (7 self)
- Add to MetaCart
Environment classifiers were proposed as a new approach to typing multi-stage languages. Safety was established in the simply-typed and let-polymorphic settings. While the motivation for classifiers was the feasibility of inference, this was in fact not established. This paper starts with the observation that inference for the full classifier-based system fails. We then identify a subset of the original system for which inference is possible. This subset, which uses implicit classifiers, retains significant expressivity (e.g. it can embed the calculi of Davies and Pfenning) and eliminates the need for classifier names in terms. Implicit classifiers were implemented in MetaOCaml, and no changes were needed to make an existing test suite acceptable by the new type checker.
Higher-Order Types and Meta-Programming for Global Computing
- Mathematical Structures in Computer Science
, 2001
"... MetaKlaim is a case study in modeling the spatial, temporal and security aspects necessary for global computing. MetaKlaim integrates MetaML (an extension of SML for multi-stage programming) and Klaim (a Kernel Language for Agents Interaction and Mobility), in order to allow interleaving of meta-pro ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
MetaKlaim is a case study in modeling the spatial, temporal and security aspects necessary for global computing. MetaKlaim integrates MetaML (an extension of SML for multi-stage programming) and Klaim (a Kernel Language for Agents Interaction and Mobility), in order to allow interleaving of meta-programming activities (like assembly and linking of code fragments), security checks (like typechecking at administrative boundaries) and normal computational activities. The staging annotations of MetaML provide a ne-grain control of the temporal aspects, Klaim's primitives support location awareness, while the type system supports security through the use of global types (in combination with dynamic typechecking) and generic mobile code through the use of polymorphism (a la system F ). The paper describes syntax, type system and operational semantics of MetaKlaim, states two type safety results, and exemplies its use for describing mobile code applications. 1
The FISh language definition
, 1998
"... FISh is a array-based programming language that combines imperative and functional programming styles. It supports a generous class of polymorphic, higher-order, array operations, such as mapping and folding (reduction) of arbitrary array functions, which are implemented using efficient array access ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
FISh is a array-based programming language that combines imperative and functional programming styles. It supports a generous class of polymorphic, higher-order, array operations, such as mapping and folding (reduction) of arbitrary array functions, which are implemented using efficient array access. This report gives a formal definition of the types, terms and evaluation rules of the language, plus some additional guidance on implementation issues. 1 Introduction This report provides a formal definition of the FISh language; its types, terms and evaluation rules. Although self-contained, it does not supply motivation or examples, which can be found elsewhere [JS98, Jay98, FISh]. Nor does it address denotational semantics, though the language was motivated by some denotational insights [Jay94, Jay95]. This report is intended for those who are interested in implementation issues, theoretical properties, or simply want to obtain a deeper understanding of the underlying principles of the...
unknown title
"... Abstract. Environment classifiers were proposed as a new approach to typing multi-stage languages. Safety was established in the simply-typed and let-polymorphic settings. While the motivation for classifiers was the feasibility of inference, this was in fact not established. This paper starts with ..."
Abstract
- Add to MetaCart
Abstract. Environment classifiers were proposed as a new approach to typing multi-stage languages. Safety was established in the simply-typed and let-polymorphic settings. While the motivation for classifiers was the feasibility of inference, this was in fact not established. This paper starts with the observation that inference for the full classifier-based system fails. We then identify a subset of the original system for which inference is possible. This subset, which uses implicit classifiers, retains significant expressivity (e.g. it can embed the calculi of Davies and Pfenning) and eliminates the need for classifier names in terms. Implicit classifiers were implemented in MetaOCaml, and no changes were needed to make an existing test suite acceptable by the new type checker.
Meta-Programming With Intensional Analysis
"... syntax as an MetaMLdatatype declare x = 10 in -- x := x - 1; print x Sample program in concrete Syntax val S1 = Declare("x",Constant 10, Seq(Assign("x",Minus(Variable "x", Constant 1)), Print(Variable "y"))); Datatype encoding of sample program. !Do %mswo -- %push 10 ; a !- %read 1 ; b ..."
Abstract
- Add to MetaCart
syntax as an MetaMLdatatype declare x = 10 in -- x := x - 1; print x Sample program in concrete Syntax val S1 = Declare("x",Constant 10, Seq(Assign("x",Minus(Variable "x", Constant 1)), Print(Variable "y"))); Datatype encoding of sample program. !Do %mswo -- %push 10 ; a !- %read 1 ; b !- Return %mswo a %- 1 ; c !- %write 1 b ; d !- %read 1 ; e !- %output d ; Return %mswo () ; %pop ? Residual result of staging example program. (* interpret2 : Com -? index -? !unit M? *) fun interpret2 stmt index = case stmt of Assign(name,e) =? let val loc = position name index in !Do mswo -- n !- ~(eval2 e index) ; write ~(lift loc) n ? end --- Seq(s1,s2) =? !Do mswo -- x !- ~(interpret2 s1 index) ; y !- ~(interpret2 s2 index) ; Return mswo () ? --- Cond(e,s1,s2) =? !Do mswo -- x !- ~(eval2 e index) ; if x=1 then ~(interpret2 s1 index) else ~(interpret2 s2 index)? --- While(e,b) =? !let fun loop () = Do mswo -- v !- ~(eval2 e index) ; if v=0 then Return mswo...
Evolving Domain Specific Languages
"... cted from embedded implementations in a semi automated way, further blending the distinction between the two approaches. This bodes well for lessening the cost of deploying a DSL since its suggests several strategies for evolving an embedded implementation to a stand-alone one in a cost e#ective way ..."
Abstract
- Add to MetaCart
cted from embedded implementations in a semi automated way, further blending the distinction between the two approaches. This bodes well for lessening the cost of deploying a DSL since its suggests several strategies for evolving an embedded implementation to a stand-alone one in a cost e#ective way. The proposed research would investigate applying meta-programming tools to DSL evolution, in several di#erent dimensions: . Extending the capabilities of host languages for embedded implementations. . Exploring automated techniques for converting embedded implementations to stand-alone implementations. . Automating the generation of stand-alone implementations. Broader Impact: The opportunity costs of being unable to utilize computers e#ectively has a large cost: projects that are never attempted, or whose scope is significantly reduced, because the cost of developing software is too high to contemplate, or too complex to write. DSLs can play a large role in mitigating these costs,

