741 research outputs found
Specializing Interpreters using Offline Partial Deduction
We present the latest version of the Logen partial evaluation system for logic programs. In particular we present new binding-types, and show how they can be used to effectively specialise a wide variety of interpreters.We show how to achieve Jones-optimality in a systematic way for several interpreters. Finally, we present and specialise a non-trivial interpreter for a small functional programming language. Experimental results are also presented, highlighting that the Logen system can be a good basis for generating compilers for high-level languages
The Ecce and Logen Partial Evaluators and their Web Interfaces
We present Ecce and Logen, two partial evaluators for Prolog using the online and offline approach respectively. We briefly present the foundations of these tools and discuss various applications. We also present new implementations of these tools, carried out in Ciao Prolog. In addition to a command-line interface new user-friendly web interfaces were developed. These enable non-expert users to specialise logic programs using a web browser, without the need for a local installation
Transforming specifications of observable behaviour into programs
A methodology for deriving programs from specifications of observable
behaviour is described. The class of processes to which this methodology
is applicable includes those whose state changes are fully definable by labelled
transition systems, for example communicating processes without
internal state changes. A logic program representation of such labelled
transition systems is proposed, interpreters based on path searching techniques
are defined, and the use of partial evaluation techniques to derive
the executable programs is described
An integration of partial evaluation in a generic abstract interpretation framework
Information generated by abstract interpreters has long been
used to perform program specialization. Additionally, if the
abstract interpreter generates a multivariant analysis, it is also possible to perform múltiple specialization. Information about valúes of variables is propagated by simulating program execution and performing fixpoint computations for recursive calis. In contrast, traditional partial evaluators (mainly) use unfolding for both propagating valúes of variables and transforming the program. It is known that abstract interpretation is a better technique for propagating success valúes than unfolding. However, the program transformations induced by unfolding may lead to important optimizations which are not directly achievable in the existing frameworks for múltiple specialization based on abstract interpretation. The aim of this work is to devise a specialization framework which integrates the better information propagation of abstract interpretation with the powerful program transformations performed by partial evaluation, and which can be implemented via small modifications to existing generic abstract interpreters. With this aim, we will relate top-down abstract interpretation with traditional concepts in partial evaluation and sketch how the sophisticated techniques developed for controlling partial evaluation can be adapted to the proposed specialization framework. We conclude that there can be both practical and conceptual advantages in the proposed integration of partial evaluation
and abstract interpretation
Abstract State Machines 1988-1998: Commented ASM Bibliography
An annotated bibliography of papers which deal with or use Abstract State
Machines (ASMs), as of January 1998.Comment: Also maintained as a BibTeX file at http://www.eecs.umich.edu/gasm
Using Prolog techniques to guide program composition
It is possible to build complex programs by repeated combination of pairs of simpler
programs. However, naive combination often produces programs that are far too inefficient.
We would like to have a system that would produce the optimal combination of two
programs, and also work with minimal supervision by the user. In this thesis we make a
significant step towards such an ideal, with the presentation of an interactive system based
on program transformation complemented with knowledge of the program development.
No single method is known that will combine all programs efficiently and so a variety of
different combination methods must be used. However, to get good results it is necessary
that the methods have access to knowledge about the program structure. To provide this
knowledge we have decided to require that the initial programs be constructed in a spe¬
cialised editor which embodies knowledge of certain standard Prolog practices (techniques)
to aid the program construction, but more importantly can record pertinent parts of the
program development into a structure called the program history. This program history
contains the initial control flow (skeleton) and the techniques that the user applied in the
construction of the program. Hence it carries knowledge about the program that would
otherwise be very difficult to extract from just the program itself.
The first contribution of this thesis is to recognise that knowledge contained in the program
history can be used in program transformation, reducing the need for user interaction. The
interactive composition system presented can automatically take major decisions, such as
the selection of which subgoal should be unfolded or the laws to be applied in order to
get a more efficient combined program. Furthermore, a component of our system called
the selection procedure can decide automatically which is the most suitable combination
method by analysing the characteristics of the initial pair of programs as given by their
program histories. Approaches that do not use the program history suffer from the problem
that it is not always practical to extract the required information about the structure of
the program.
Our second contribution is to provide a range of new methods which exploit the program
history in order to produce more efficient programs, and to deal with a wider range of
combination problems. The new methods not only combine programs with the same control
flow, but can also deal with some cases in which the control flows are different. All of these
methods are completely automatic with the exception of our "mutant" method in which
the combined clause needs to be approved by the user.
The third contribution is to present relevant properties in our composition system. These
properties fall into the following three groups: (i) properties which hold after applying each
combination method, (ii) properties about the type of program which is obtained after
the combination, (iii) properties of the join specification which defines the characteristics
of the combined program
Towards modular extensions for a modular language
Modularity allows the construction of complex designs from simpler, independent units that most of the time can be developed separately. In this paper we are concerned with developing mechanisms for easily implementing modular extensions to modular (logic) languages. By (language) extensions we refer to different groups of syntactic definitions and translation rules that extend a language. Our application of the concept of modularity in this context is twofold. We would like these extensions to be modular, in the above sense, i.e., we should be able to develop different extensions mostly separately. At the same time, the sources and targets for the extensions are modular languages, i.e., such extensions may take as input separate pieces of code and also produce separate pieces of code. Dealing with this double requirement involves interesting challenges to ensure that modularity is not broken: first, combinations of extensions (as if they were a single extension) must be given a precise meaning. Also, the separate translation of multiple sources (as if they were a single source) must be feasible. We present a detailed description of a code expansion-based framework that proposes novel solutions for these problems. We argue that the approach, while implemented for Ciao, can be adapted for other languages and Prolog-based systems
- …