Results 1 - 10
of
11
Partial Deduction and Driving are Equivalent
, 1994
"... Partial deduction and driving are two methods used for program specialization in logic and functional languages, respectively. We argue that both techniques achieve essentially the same transformational effect by unification-based information propagation. We show their equivalence by analyzing the ..."
Abstract
-
Cited by 45 (10 self)
- Add to MetaCart
Partial deduction and driving are two methods used for program specialization in logic and functional languages, respectively. We argue that both techniques achieve essentially the same transformational effect by unification-based information propagation. We show their equivalence by analyzing the definition and construction principles underlying partial deduction and driving, and by giving a translation from a functional language to a definite logic language preserving certain properties. We discuss residual program generation, termination issues, and related other techniques developed for program specialization in logic and functional languages.
A Roadmap to Metacomputation by Supercompilation
, 1996
"... This paper gives a gentle introduction to Turchin's supercompilation and its applications in metacomputation with an emphasis on recent developments. First, a complete supercompiler, including positive driving and generalization, is defined for a functional language and illustrated with examples. Th ..."
Abstract
-
Cited by 33 (4 self)
- Add to MetaCart
This paper gives a gentle introduction to Turchin's supercompilation and its applications in metacomputation with an emphasis on recent developments. First, a complete supercompiler, including positive driving and generalization, is defined for a functional language and illustrated with examples. Then a taxonomy of related transformers is given and compared to the supercompiler. Finally, we put supercompilation into the larger perspective of metacomputation and consider three metacomputation tasks: specialization, composition, and inversion.
NREVERSAL of Fortune -- The Thermodynamics of Garbage Collection
- In ACM Sigplan Notices
, 1977
"... The need to reverse a computation arises in many contexts---debugging, editor undoing, optimistic concurrency undoing, speculative computation undoing, trace scheduling, exception handling undoing, database recovery, optimistic discrete event simulations, subjunctive computing, etc. The need to anal ..."
Abstract
-
Cited by 13 (0 self)
- Add to MetaCart
The need to reverse a computation arises in many contexts---debugging, editor undoing, optimistic concurrency undoing, speculative computation undoing, trace scheduling, exception handling undoing, database recovery, optimistic discrete event simulations, subjunctive computing, etc. The need to analyze a reversed computation arises in the context of static analysis---liveness analysis, strictness analysis, type inference, etc. Traditional means for restoring a computation to a previous state involve checkpoints; checkpoints require time to copy, as well as space to store, the copied material. Traditional reverse abstract interpretation produces relatively poor information due to its inability to guess the previous values of assigned-to variables. We propose an abstract computer model and a programming language---Y-Lisp---whose primitive operations are injective and hence reversible, thus allowing arbitrary undoing without the overheads of checkpointing. Such a computer can be built from reversible conservative logic circuits, with the serendipitous advantage of dissipating far less heat than traditional Boolean AND/OR/NOT circuits. Unlike functional languages, which have one "state " for all times, Y-Lisp has at all times one "state", with unique predecessor and successor states. Compiling into a reversible pseudocode can have benefits even when targeting a traditional computer. Certain optimizations, e.g., update-in-place, and compile-time garbage collection may be more easily performed, because the
Partial inversion of constructor term rewriting systems
- In Proc. of the 16th Int’l Conf. on Term Rewriting and Applications (RTA 2005
, 2005
"... Abstract. Partial-inversion compilers generate programs which compute some unknown inputs of given programs from a given output and the rest of inputs whose values are already given. In this paper, we propose a partial-inversion compiler of constructor term rewriting systems. The compiler automatica ..."
Abstract
-
Cited by 11 (3 self)
- Add to MetaCart
Abstract. Partial-inversion compilers generate programs which compute some unknown inputs of given programs from a given output and the rest of inputs whose values are already given. In this paper, we propose a partial-inversion compiler of constructor term rewriting systems. The compiler automatically generates a conditional term rewriting system, and then unravels it to an unconditional system. To improve the efficiency of inverse computation, we show that innermost strategy is usable to obtain all solutions if the generated system is right-linear. 1
From Checking to Inference via Driving and Dag Grammars
- In ACM Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'02
, 2002
"... Abramov and Gluck have recently introduced a technique called URA for inverting first order functional programs. Given some desired output value, URA computes a potentially infinite sequence of substitutions/restrictions corresponding to the relevant input values. In some cases this process does not ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
Abramov and Gluck have recently introduced a technique called URA for inverting first order functional programs. Given some desired output value, URA computes a potentially infinite sequence of substitutions/restrictions corresponding to the relevant input values. In some cases this process does not terminate. In the present paper, we propose a new program analysis for inverting programs. The technique works by computing a finite grammar describing the set of all input that relate to a given output. During the production of the grammar, the original program is implicitly transformed using so-called driving steps. Whereas URA is sound and complete, but sometimes fails to terminate, our technique always terminates and is complete, but not sound. As an example, we demonstrate how to derive type inference from type checking. The idea of approximating functional programs by grammars is not new. For instance, the second author has developed a technique using tree grammars to approximate termination behaviour of deforestation. However, for the present purposes it has been necessary to invent a new type of grammar that extends tree grammars by permitting a notion of sharing in the productions. These dag grammars seem to be of independent interest.
Metacomputation as a Tool for Formal Linguistic Modeling
- Cybernetics and Systems '94
, 1994
"... We consider the principle "a new model is a model of an existing one" as the main scheme for deriving new linguistic models by metacomputation. We derive the basic requirements for metacomputation by a structural analysis of different model definitions, and show that in order to automate the creatio ..."
Abstract
-
Cited by 6 (5 self)
- Add to MetaCart
We consider the principle "a new model is a model of an existing one" as the main scheme for deriving new linguistic models by metacomputation. We derive the basic requirements for metacomputation by a structural analysis of different model definitions, and show that in order to automate the creation of linguistic models the following operations on linguistic models have to be performed by metacomputation effectively and efficiently: composition, inversion, and specialization of algorithms. This may also serve as a unifying paradigm for different program transformation approaches. 1. INTRODUCTION During the last decades we have witnessed tremendous technological breakthroughs in the development and application of computers. The introduction of the computer was an evolutionary step in the control of formal linguistic models, a metasystem transition (MST). As a result the number of linguistic models created and used has significantly increased. The method of modern science is, in its e...
Semantics Modifiers: An Approach To Non-Standard Semantics Of Programming Languages
- Third Fuji International Symposium on Functional and Logic Programming
, 1998
"... this paper, semantics modifiers exist for a wide class of computational problems, including non-standard computation, program analysis and ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
this paper, semantics modifiers exist for a wide class of computational problems, including non-standard computation, program analysis and
Program Transformation with Metasystem Transitions: Experiments with a Supercompiler
- PERSPECTIVES OF SYSTEM INFORMATICS. PROCEEDINGS, LNCS 1181
, 1996
"... Turchin's supercompilation is a program transformation technique for functional languages. A supercompiler is a program which can perform a deep transformation of programs using a principle which is similar to partial evaluation. In the present paper we use a supercompiler, which V.F. Turchin and w ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Turchin's supercompilation is a program transformation technique for functional languages. A supercompiler is a program which can perform a deep transformation of programs using a principle which is similar to partial evaluation. In the present paper we use a supercompiler, which V.F. Turchin and we have described in [22], [23]. The aim of our investigation has been to show, what deep changes ( w.r.t. run time ) in the programs can be achieved by supercompilation. In [21] V.F. Turchin presented a method to improve the transformational power of supercompilation without modifying the transformation system. We use this idea to show both the power of the method and abilities of our supercompiler. Our examples include a generation of both one-step unfolding and instantiations, lazy evaluation, inverse evaluation. Keywords: program transformation, optimization, recursion, supercompilation, metacomputation, metasystem transition, Refal. 1 Introduction Turchin's supercompilation is a progr...
From Standard To Non-Standard Semantics By Semantics Modifiers
, 2001
"... An approach for systematically modifying the semantics of programming languages by semantics modifiers is described. Semantics modifiers are a class of programs that allow the development of general and reusable "semantics components". Language independence is achieved through the interpretive ap ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
An approach for systematically modifying the semantics of programming languages by semantics modifiers is described. Semantics modifiers are a class of programs that allow the development of general and reusable "semantics components". Language independence is achieved through the interpretive approach: an interpreter serves as a mediator between the new language and the language for which the non-standard semantics was implemented. Inverse computation, equivalence transformation and neighborhood analysis are shown to be semantics modifiers. Experiments with these modifiers show the computational feasibility of this approach. Seven modifier projections are given which allow the e#cient implementation of non-standard interpreters and non-standard compilers by program specialization or other powerful program transformation methods.
Specialization of Functional Logic Programs
"... Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. In this article, we prese ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. In this article, we present a partial evaluation scheme for functional logic languages based on an automatic unfolding algorithm which builds narrowing trees. The method is formalized within the theoretical framework established by Lloyd and Shepherdson for the partial deduction of logic programs, which we have generalized for dealing with functional computations. A generic specialization algorithm is proposed which does not depend on the eager or lazy nature of the narrower being used. To the best of our knowledge, this is the first generic algorithm for the specialization of functional logic programs. We study the semantic properties of the transformation and the conditions under which the technique terminates, is...

