Results 1 - 10
of
14
Automatic, Template-Based Run-Time Specialization: Implementation and Experimental Study
- In International Conference on Computer Languages
, 1998
"... Specializing programs with respect to run-time values has been shown to drastically improve code performance on realistic programs ranging from operating systems to graphics. Recently, various approaches to specializing code at run-time have been proposed. However, these approaches still suffer from ..."
Abstract
-
Cited by 47 (12 self)
- Add to MetaCart
Specializing programs with respect to run-time values has been shown to drastically improve code performance on realistic programs ranging from operating systems to graphics. Recently, various approaches to specializing code at run-time have been proposed. However, these approaches still suffer from shortcomings that limit their applicability: they are manual, too expensive, or require programs to be written in a dedicated language. We solve these problems by introducing new techniques to implement run-time specialization. The key to our approach is the use of code templates. Templates are automatically generated from ordinary programs and are optimized before run time, allowing high-quality code to be quickly generated at run time. Experimental results obtained on scientific and graphics code indicate that our approach is highly effective. Little run-time overhead is introduced, since code generation primarily consists of copying instructions. Run-time specialized programs run up to 1...
Strong Normalization by Type-Directed Partial Evaluation and Run-Time Code Generation
- Proceedings of the Second International Workshop on Types in Compilation, number 1473 in Lecture Notes in Computer Science
, 1997
"... We investigate the synergy between type-directed partial evaluation and run-time code generation for the Caml dialect of ML. Typedirected partial evaluation maps simply typed, closed Caml values to a representation of their long fij-normal form. Caml uses a virtual machine and has the capability ..."
Abstract
-
Cited by 16 (7 self)
- Add to MetaCart
We investigate the synergy between type-directed partial evaluation and run-time code generation for the Caml dialect of ML. Typedirected partial evaluation maps simply typed, closed Caml values to a representation of their long fij-normal form. Caml uses a virtual machine and has the capability to load byte code at run time. Representing the long fij-normal forms as byte code gives us the ability to strongly normalize higher-order values (i.e., weak head normal forms in ML), to compile the resulting strong normal forms into byte code, and to load this byte code all in one go, at run time.
Finally Tagless, Partially Evaluated ⋆ Tagless Staged Interpreters for Simpler Typed Languages
"... Abstract. We have built the first family of tagless interpretations for a higher-order typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically type-preserving interpretations ..."
Abstract
-
Cited by 13 (6 self)
- Add to MetaCart
Abstract. We have built the first family of tagless interpretations for a higher-order typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically type-preserving interpretations include an evaluator, a compiler (or staged evaluator), a partial evaluator, and call-by-name and call-by-value CPS transformers. Our main idea is to encode HOAS using cogen functions rather than data constructors. In other words, we represent object terms not in an initial algebra but using the coalgebraic structure of the λ-calculus. Our representation also simulates inductive maps from types to types, which are required for typed partial evaluation and CPS transformations. Our encoding of an object term abstracts over the various ways to interpret it, yet statically assures that the interpreters never get stuck. To achieve self-interpretation and show Jones-optimality, we relate this exemplar of higher-rank and higher-kind polymorphism to plugging a term into a context of let-polymorphic bindings. It should also be possible to define languages with a highly refined syntactic type structure. Ideally, such a treatment should be metacircular, in the sense that the type structure used in the defined language should be adequate for the defining language. John Reynolds [28] 1
Binding-Time Analysis for Both Static and Dynamic Expressions
- In Static Analysis Symposium
, 1999
"... This paper presents a specializer and a binding-time analyzer for a functional language where expressions are allowed to be used as both static and dynamic. With both static and dynamic expressions, data structures can be statically accessed while they are residualized at the same time. Previous ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
This paper presents a specializer and a binding-time analyzer for a functional language where expressions are allowed to be used as both static and dynamic. With both static and dynamic expressions, data structures can be statically accessed while they are residualized at the same time. Previously, such data structures were treated as completely dynamic, which prevented their components from being accessed statically. The technique presented in this paper effectively allows data structures to be lifted which was prohibited in the conventional partial evaluators. The binding-time analysis is formalized as a type system and the solution is obtained by solving constraints generated by the type system.
Enforcing Safety Properties Using Type Specialization
- Proc. 10th European Symposium on Programming, Lecture Notes in Computer Science
, 2000
"... Type specialization can serve as a powerful tool in enforcing safety properties on foreign code. Using the specification of a monitoring interpreter, polyvariant type specialization can produce compiled code that is guaranteed to obey a specified safety policy. It propagates a security state at comp ..."
Abstract
-
Cited by 10 (3 self)
- Add to MetaCart
Type specialization can serve as a powerful tool in enforcing safety properties on foreign code. Using the specification of a monitoring interpreter, polyvariant type specialization can produce compiled code that is guaranteed to obey a specified safety policy. It propagates a security state at compile-time and generates code for each different security state. The resulting code contains virtually no run-time operations on the security state, at the price of some code duplication. A novel extension of type specialization by intersection types limits the amount of code duplication considerably, thus making the approach practical. A few years back, mobile code was merely an exciting research subject. Meanwhile, the situation has changed dramatically and mobile code is about to invade our everyday lives. Many applications load parts of their code - or even thirdparty extension modules - from the network and run it on the local computer. Web browsers are the most prominent of these a...
Towards automatic construction of staged compilers
- 2002, proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages (POPL’02
, 2002
"... ..."
Distributed Partial Evaluation
- Parallel Symbolic Computation: PASCO ’97
, 1997
"... Partial evaluation is an automatic program transformation that optimizes programs by specialization. We speed up the specialization process by utilizing the natural coarse-grained parallelism inherent in the partial evaluation process. We have supplemented an existing partial evaluation system for t ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Partial evaluation is an automatic program transformation that optimizes programs by specialization. We speed up the specialization process by utilizing the natural coarse-grained parallelism inherent in the partial evaluation process. We have supplemented an existing partial evaluation system for the Scheme programming language by a farm-of-workers model for parallel partial evaluation in a network of loosely coupled workstations. Our implementation speeds up specialization by a factor of 2--3 on 6 processors. Keywords functional programming, automatic program transformation, partial evaluation 1 Introduction Partial evaluation is a powerful program-specialization technique based on constant propagation. Given the static (known) parameters of a source program, partial evaluation constructs a residual program---an optimized, specialized version of the program, which on application to the remaining dynamic parameters produces the same result as the original program applied to all pa...
Strategic programming by model interpretation and partial evaluation
, 2009
"... The dominant approach to model-driven development and domain-specific language engineering is to write a translator, or compiler, that defines a strategy for executing the high-level language. In this paper we introduce a new approach to strategic programming by writing interpreters of high-level mo ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
The dominant approach to model-driven development and domain-specific language engineering is to write a translator, or compiler, that defines a strategy for executing the high-level language. In this paper we introduce a new approach to strategic programming by writing interpreters of high-level modeling languages, rather than compilers. This technique is demonstrated by interpreting data models and user interface models. The interpreters are compiled by partial evaluation and deforestation. Although partial evaluation is traditionally applied to functions, we show that it can also be applied to implement data abstractions as objects. Generic functions, for equality and reading, can also be defined as interpreters and partially evaluated. The user interface interpreter illustrates a solution to integrating two modeling languages. The system described here is bootstrapped from Scheme, although the goal is to build a complete software development environment based on model interpretation.
Higher-Order Code Splicing
- Proceedings of the Eighth European Symposium on Programming, number 1576 in Lecture
, 1999
"... . Run-time code generation (RTCG) and just-in-time compilation (JIT) are features of modern programming systems to strike the balance between generality and efficiency. Since RTCG and JIT techniques are not portable and notoriously hard to implement, we propose code splicing as an alternative fo ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
. Run-time code generation (RTCG) and just-in-time compilation (JIT) are features of modern programming systems to strike the balance between generality and efficiency. Since RTCG and JIT techniques are not portable and notoriously hard to implement, we propose code splicing as an alternative for dynamically-typed higher-order programming languages. Code splicing combines precompiled pieces of code using higher-order functions. While this approach cannot achieve the performance of compiled code, it can support some intriguing features: -- very fast "compilation" times; -- satisfactory run times, compared with interpretation; -- simple interfacing with compiled code; -- portability. Starting from implementation models for functional languages we develop and evaluate several approaches to code splicing. This leads to some new insights into compilation techniques for functional programming languages, among them a compositional compilation schema to SKI-combinators. The pro...
Generic Operations and Partial Evaluation using Models
"... Model-driven software development is a promising new application area for partial evaluation. In this papers, we develop an approach to generic programming using models instead of types. The work is done in the context of Pummel, a first-order subset of Scheme with objects and monoid comprehensions. ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Model-driven software development is a promising new application area for partial evaluation. In this papers, we develop an approach to generic programming using models instead of types. The work is done in the context of Pummel, a first-order subset of Scheme with objects and monoid comprehensions. We define generic operations for validation, reading, and equality of values described by models. These generic operations are specialized to particular models by an online partial evaluator. The specializer can choose to residualize or execute imperative operations on objects, through a conditional binding time attribute. A future construct allows dynamic values to be manipulated statically, if the dynamic values are functionally dependent on static state. 1.

