Results 1 - 10
of
27
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 ...
Towards Automatic Specialization of Java Programs
- In Proceedings of the European Conference on Object-oriented Programming (ECOOP'99
, 1999
"... Automatic program specialization can derive e#cient implementations from generic components, thus reconciling the often opposing goals of genericity and e#ciency. This technique has proved useful within the domains of imperative, functional, and logical languages, but so far has not been explore ..."
Abstract
-
Cited by 39 (12 self)
- Add to MetaCart
Automatic program specialization can derive e#cient implementations from generic components, thus reconciling the often opposing goals of genericity and e#ciency. This technique has proved useful within the domains of imperative, functional, and logical languages, but so far has not been explored within the domain of object-oriented languages.
Growing Languages with Metamorphic Syntax Macros
- In Proceedings of Workshop on Partial Evaluation and Semantics-Based Program Manipulation, PEPM 2002. ACM
, 2000
"... From now on, a main goal in designing a language should be to plan for growth." Guy Steele: Growing a Language, OOPSLA'98 invited talk. We present our experiences with a syntax macro language which we claim forms a general abstraction mechanism for growing (domain-specific) extensions of programmin ..."
Abstract
-
Cited by 37 (4 self)
- Add to MetaCart
From now on, a main goal in designing a language should be to plan for growth." Guy Steele: Growing a Language, OOPSLA'98 invited talk. We present our experiences with a syntax macro language which we claim forms a general abstraction mechanism for growing (domain-specific) extensions of programming languages. Our syntax macro language is designed to guarantee type safety and termination. A concept of metamorphisms allows the arguments of a macro to be inductively defined in a meta level grammar and morphed into the host language. We also show how the metamorphisms can be made to operate simultaneously on multiple parse trees at once. The result is a highly flexible mechanism for growing new language constructs without resorting to compile-time programming. In fact, whole new languages can be defined at surprisingly low cost. This work is fully implemented as part of the <bigwig> system for defining interactive Web services, but could find use in many other languages. 1.
Compiling Embedded Languages
- Proc. Semantics, Applications, and Implementation of Program Generation (SAIG 2000), LNCS
, 2000
"... . Functional languages are particularly well-suited to the implementation of interpreters for domain-specific embedded languages (DSELs). We describe an implemented technique for producing optimizing compilers for DSELs, based on Kamin's idea of DSELs for program generation. The technique uses ..."
Abstract
-
Cited by 31 (1 self)
- Add to MetaCart
. Functional languages are particularly well-suited to the implementation of interpreters for domain-specific embedded languages (DSELs). We describe an implemented technique for producing optimizing compilers for DSELs, based on Kamin's idea of DSELs for program generation. The technique uses a data type of syntax for basic types, a set of smart constructors that perform rewriting over those types, some code motion transformations, and a back-end code generator. Domain-specific optimization results from chains of rewrites on basic types. New DSELs are defined directly in terms of the basic syntactic types, plus host language functions and tuples. This definition style makes compilers easy to write and, in fact, almost identical to the simplest embedded interpreters. We illustrate this technique with a language Pan for the computationally intensive domain of image synthesis and manipulation. 1 1 Introduction The "embedded" approach has proved an excellent technique for ...
Automatic Program Specialization for Java
- ACM Transactions on Programming Languages and Systems
, 2000
"... The object-oriented style of programming facilitates program adaptation and enhances program genericness, but at the expense of efficiency. We demonstrate experimentally that state-of-the-art Java compilation technology fails to compensate for the use of object-oriented abstractions to implement ..."
Abstract
-
Cited by 31 (3 self)
- Add to MetaCart
The object-oriented style of programming facilitates program adaptation and enhances program genericness, but at the expense of efficiency. We demonstrate experimentally that state-of-the-art Java compilation technology fails to compensate for the use of object-oriented abstractions to implement generic programs, and that program specialization can be used to eliminate these overheads. We present an automatic program specializer for Java, and demonstrate experimentally that significant speedups in program execution time can be obtained through automatic specialization. Although automatic program specialization could be seen as overlapping with existing optimizing compiler technology, we show that specialization and compiler optimization are in fact complementary. 1 Introduction Object-oriented languages encourage a style of programming that facilitates program adaptation. Encapsulation enhances code resilience to program modifications and increases the possibilities for di...
Specialization Patterns
- In Proceedings of the 15 th IEEE International Conference on Automated Software Engineering (ASE 2000
, 2000
"... Design patterns offer many advantages for software development, but can introduce inefficiency into the final program. Program specialization can eliminate such overheads, but is most effective when targeted by the user to specific bottlenecks. Consequently, we propose that these concepts are comple ..."
Abstract
-
Cited by 19 (3 self)
- Add to MetaCart
Design patterns offer many advantages for software development, but can introduce inefficiency into the final program. Program specialization can eliminate such overheads, but is most effective when targeted by the user to specific bottlenecks. Consequently, we propose that these concepts are complementary. Program specialization can optimize programs written using design patterns, and design patterns provide information about the program structure that can guide specialization. Concretely, we propose specialization patterns, which describe how to apply program specialization to optimize uses of design patterns.
Run-time code generation in c++ as a foundation for domain-specific optimisation
- In Proceedings of the 2003 Dagstuhl Workshop on Domain-Specific Program Generation
, 2003
"... www.doc.ic.ac.uk/{~ob3,~phjk} Abstract. The TaskGraph Library is a C++ library for dynamic code generation, which combines specialisation with dependence analysis and loop restructuring. A TaskGraph represents a fragment of code which is constructed and manipulated at runtime, then compiled, dynamic ..."
Abstract
-
Cited by 16 (4 self)
- Add to MetaCart
www.doc.ic.ac.uk/{~ob3,~phjk} Abstract. The TaskGraph Library is a C++ library for dynamic code generation, which combines specialisation with dependence analysis and loop restructuring. A TaskGraph represents a fragment of code which is constructed and manipulated at runtime, then compiled, dynamically linked and executed. TaskGraphs are initialised using macros and overloading, which forms a simplified, C-like sub-language with first-class arrays and no pointers. Once a TaskGraph has been constructed, we can analyse its dependence structure and perform optimisations. In this Chapter, we present the design of the TaskGraph library, and two sample applications to demonstrate its use for runtime code specialisation and restructuring optimisation. 1
Impact of economics on compiler optimization
- In Proc. of the Joint ACM Java Grande/ISCOPE 2001 Conf
, 2001
"... Compile-time program optimizations are similar to poetry: more are written than are actually published in commercial compilers. Hard economic reality is that many interesting optimizations have too narrow an audience to justify their cost in a general-purpose compiler, and custom compilers are too e ..."
Abstract
-
Cited by 13 (0 self)
- Add to MetaCart
Compile-time program optimizations are similar to poetry: more are written than are actually published in commercial compilers. Hard economic reality is that many interesting optimizations have too narrow an audience to justify their cost in a general-purpose compiler, and custom compilers are too expensive to write. An alternative is to allow programmers to define their own compiletime optimizations. This has already happened accidentally for C++, albeit imperfectly, in the form of template metaprogramming. This paper surveys the problems, the accidental success, and what directions future research might take to circumvent current economic limitations of monolithic compilers.
Delayed Evaluation, Self-Optimising Software Components As Programming
- In Euro-Par
, 2002
"... We argue that delayed-evaluation, self-optimising scientific software components, which dynamically change their behaviour according to their calling context at runtime offer a possible way of bridging the apparent conflict between the quality of scientific software and its performance. Rather th ..."
Abstract
-
Cited by 10 (6 self)
- Add to MetaCart
We argue that delayed-evaluation, self-optimising scientific software components, which dynamically change their behaviour according to their calling context at runtime offer a possible way of bridging the apparent conflict between the quality of scientific software and its performance. Rather than equipping scientific software components with a performance interface which allows the caller to supply the context information that is lost when building abstract software components, we propose to recapture this lost context information at runtime.
Improving the Static Analysis of Embedded Languages via Partial Evaluation
, 2004
"... detected or enforced by their host language. We show how to use macros to easily implement partial evaluation of embedded interpreters in order to capture invariants encoded in embedded programs and render them explicit in the terms of their host language. We demonstrate the effectiveness of this te ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
detected or enforced by their host language. We show how to use macros to easily implement partial evaluation of embedded interpreters in order to capture invariants encoded in embedded programs and render them explicit in the terms of their host language. We demonstrate the effectiveness of this technique in improving the results of a value flow analysis.

