Results 1 - 10
of
18
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 ...
A brief history of just-in-time
- ACM Computing Surveys
, 2003
"... Software systems have been using “just-in-time ” compilation (JIT) techniques since the 1960s. Broadly, JIT compilation includes any translation performed dynamically, after a program has started execution. We examine the motivation behind JIT compilation and constraints imposed on JIT compilation s ..."
Abstract
-
Cited by 42 (1 self)
- Add to MetaCart
Software systems have been using “just-in-time ” compilation (JIT) techniques since the 1960s. Broadly, JIT compilation includes any translation performed dynamically, after a program has started execution. We examine the motivation behind JIT compilation and constraints imposed on JIT compilation systems, and present a classification scheme for
Certifying Compilation and Run-time Code Generation
- IN ACM WORKSHOP ON PARTIAL EVALUATION AND SEMANTICS-BASED PROGRAM MANIPULATION
, 1999
"... A certifying compiler takes a source language program and produces object code, as well as a "certificate" that can be used to verify that the object code satisfies desirable properties, such as type safety and memory safety. Certifying compilation helps to increase both compiler robustness and prog ..."
Abstract
-
Cited by 31 (0 self)
- Add to MetaCart
A certifying compiler takes a source language program and produces object code, as well as a "certificate" that can be used to verify that the object code satisfies desirable properties, such as type safety and memory safety. Certifying compilation helps to increase both compiler robustness and program safety. Compiler robustness is improved since some compiler errors can be caught by checking the object code against the certificate immediately after compilation. Program safety is improved because the object code and certificate alone are sufficient to establish safety: even if the object code and certificate are produced on an unknown machine by an unknown compiler and sent over an untrusted network, safe execution is guaranteed as long as the code and certificate pass the verifier. Existing work in certifying compilation has addressed statically generated code. In this paper, we extend this to code generated at run time. Our goal is to combine certifying compilation with run-time code generation to produce programs that are both verifiably safe and extremely fast. To achieve this goal, we present two new languages with explicit run-time code generation constructs: Cyclone, a type safe dialect of C, and TAL/T, a type safe assembly language. We have designed and implemented a system that translates a safe C program into Cyclone, which is then compiled to TAL/T, and finally assembled into executable object code. This paper focuses on our overall approach and the front end of our system; details about TAL/T will appear in a subsequent paper.
An Idealized MetaML: Simpler, and More Expressive
, 1999
"... MetaML is a multi-stage functional programming language featuring three constructs that can be viewed as statically-typed refinements of the back-quote, comma, and eval of Scheme. Thus it provides special support for writing code generators and serves as a semantically sound basis for systems involv ..."
Abstract
-
Cited by 29 (13 self)
- Add to MetaCart
MetaML is a multi-stage functional programming language featuring three constructs that can be viewed as statically-typed refinements of the back-quote, comma, and eval of Scheme. Thus it provides special support for writing code generators and serves as a semantically sound basis for systems involving multiple interdependent computational stages. In previous work, we reported on an implementation of MetaML, and on a small-step semantics and type-system for MetaML. In this paper, we present An Idealized MetaML (AIM) that is the result of our study of a categorical model for MetaML. An important outstanding problem is finding a type system that provides the user with a means for manipulating both open and closed code. This problem has eluded efforts by us and other researchers for over three years. AIM solves the issue by providing two type constructors, one classifies closed code and the other open code, and describing how they interact.
Closed Types for a Safe Imperative MetaML
, 2001
"... This paper addresses the issue of safely combining computational eects and multi-stage programming. We propose a type system, which exploits a notion of closed type, to check statically that an imperative multi-stage program does not cause run-time errors. Our approach is demonstrated formally for a ..."
Abstract
-
Cited by 28 (11 self)
- Add to MetaCart
This paper addresses the issue of safely combining computational eects and multi-stage programming. We propose a type system, which exploits a notion of closed type, to check statically that an imperative multi-stage program does not cause run-time errors. Our approach is demonstrated formally for a core language called MiniML ref . This core language safely combines multi-stage constructs and ML-style references, and is a conservative extension of MiniML ref , a simple imperative subset of SML. In previous work, we introduced a closed type constructor , which was enough to ensure the safe execution of dynamically generated code in the pure fragment of MiniML ref .
Certified Run-time Code Generation
- JOURNAL OF FUNCTIONAL PROGRAMMING
, 2002
"... Run-time code generation (RTCG) has been shown to be an effective optimiza-tion. Systems such as DyC, ’C, Tempo, and Fabius have demonstrated order of magnitude improvements on benchmark programs. In addition, by using binding time analyses, the benefits of RTCG can be obtained with minimal programm ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
Run-time code generation (RTCG) has been shown to be an effective optimiza-tion. Systems such as DyC, ’C, Tempo, and Fabius have demonstrated order of magnitude improvements on benchmark programs. In addition, by using binding time analyses, the benefits of RTCG can be obtained with minimal programmer effort. Languages like MetaML and PML have explored type systems for RTCG that can ensure programs using RTCG do not crash. In earlier work we presented Cyclone – a type-safe language based on C with support for RTCG. The safety guarantee provided by a type-safe source language may fail to hold of the compiler’s output. Rather than trusting that the compiler is correctly im-plemented, we can use a certifying compiler to check that the output is type safe. A certifying compiler produces a certificate, along with the object code, which together can be used to verify that the object code is safe. Here we develop a certifying and optimizing compiler for Cyclone supporting run-time code generation. The output of our compiler is TAL/T – x86 object code augmented with typing annotations. Part of our system is a verifier for TAL/T capable of mechanically checking that TAL/T programs are type safe – they cannot crash. This guarantee provides increased confidence in the compiler-generated code. The contributions of this thesis include: 1) a framework for compiling and opti-mizing programs supporting RTCG, 2) a formal proof that well-typed TAL/T pro-grams cannot crash, and 3) an evaluation of our compiler using micro-benchmarks, a raytracer, and an instruction set simulator.
Functional Programming with Names and Necessity
, 2004
"... No. CCR-9988281 and by a generous donation from the Siebel Scholars Program. The views and ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
No. CCR-9988281 and by a generous donation from the Siebel Scholars Program. The views and
Dynjava: Type safe dynamic code generation in java
- In JSSST Workshop on Programming and Programming Languages, PPL2001, March 2001
, 2001
"... Dynamic code generation is a technique that generates and executes fragments of executable code during the run-time of an program to reduce the execution time of programs. However, most of currently available dynamic code generation systems have weakness on high-level language support for describing ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
Dynamic code generation is a technique that generates and executes fragments of executable code during the run-time of an program to reduce the execution time of programs. However, most of currently available dynamic code generation systems have weakness on high-level language support for describing dynamic code fragment. Especially, safety of dynamic composition of code fragments is not sufficiently supported. To solve this, we present a Java-based strongly-typed language for dynamic code generation. This language gives precise types to dynamic code fragments, to guarantee the type-safety of dynamically-composed codes. 1
A Modal Calculus for Effect Handling
, 2003
"... In their purest formulation, monads are used in functional programming for two purposes: (1) to hygienically propagate effects, and (2) to globalize the effect scope -- once an effect occurs, the purity of the surrounding computation cannot be restored. As a consequence, monadic typing does not prov ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
In their purest formulation, monads are used in functional programming for two purposes: (1) to hygienically propagate effects, and (2) to globalize the effect scope -- once an effect occurs, the purity of the surrounding computation cannot be restored. As a consequence, monadic typing does not provide very naturally for the practically important ability to handle effects, and there is a number of previous works directed toward remedying this deficiency. It is mostly based on extending the monadic framework with further extra-logical constructs to support handling. In this paper we adopt...
Run-time Bytecode Specialization: A Portable Approach To Generating Optimized Specialized Code
- in Proceedings of Programs as Data Objects, Second Symposium, PADO
, 2001
"... This paper proposes a run-time bytecode specialization (BCS) technique that analyzes programs and generates specialized programs at run-time in an intermediate language. By using an intermediate language for code generation, a back-end system can optimize the specialized programs after specializ ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
This paper proposes a run-time bytecode specialization (BCS) technique that analyzes programs and generates specialized programs at run-time in an intermediate language. By using an intermediate language for code generation, a back-end system can optimize the specialized programs after specialization. As the intermediate language, the system uses Java virtual machine language (JVML), which allows the system to easily achieve practical portability and to use sophisticated just-in-time compilers as its back-end. The binding-time analysis algorithm, which is based on a type system, covers a non-object-oriented subset of JVML. A specializer, which generates programs on a per-instruction basis, can perform method inlining at run-time. The performance measurement showed that a non-trivial application program specialized at run-time by BCS runs approximately 3--4 times faster than the unspecialized one. Despite the large amount of overheads at JIT compilation of specialized code, we observed that the overall performance of the application can be improved.

