Results 11 - 20
of
25
To Parse or Not To Parse
- Logic Program Synthesis and Transformation. Proceedings of LOPSTR’97, LNCS 1463
, 1997
"... . In this paper, we reconsider the problem of specialising the vanilla meta interpreter through fully automatic and completely general partial deduction techniques. In particular, we study how the homeomorphic embedding relation guides specialisation of the interpreter. We focus on the so-called ..."
Abstract
-
Cited by 17 (6 self)
- Add to MetaCart
. In this paper, we reconsider the problem of specialising the vanilla meta interpreter through fully automatic and completely general partial deduction techniques. In particular, we study how the homeomorphic embedding relation guides specialisation of the interpreter. We focus on the so-called parsing problem, i.e. removing all parsing overhead from the program, and demonstrate that further refinements in the control of general partial deduction are necessary to properly deal with it. In particular, we modify local control on the basis of information imported from the global level. The resulting control strategy, while remaining fully general, leads to excellent specialisation of vanilla like meta programs. Parsing is always specialised, but -- appropriately, as we will show -- not always completely removed. As a concrete application, we subject an extended vanilla meta interpreter capable of dealing with compositions of programs to our techniques, showing we equal or surpass results obtained through a more ad hoc approach. 1
Specialization of Functional Logic Programs Based on Needed Narrowing
- Proc. of ICFP'99
, 1999
"... Functional logic languages 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. Needed narrowing is an optimal narrowing strategy and th ..."
Abstract
-
Cited by 14 (9 self)
- Add to MetaCart
Functional logic languages 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. Needed narrowing is an optimal narrowing strategy and the basis of several recent functional logic languages. In this paper, we define a partial evaluator for functional logic programs based on needed narrowing. We prove strong correctness of this partial evaluator and show that the nice properties of needed narrowing carry over to the specialization process and the specialized programs. In particular, the structure of the specialized programs provides for the application of optimal evaluation strategies. This is in contrast to other partial evaluation methods for functional logic programs which can change the original program structure in a negative way. Finally, we present some experiments which highlight the practical advantages of our approach.
Towards Integrating Partial Evaluation in a Specialization Framework based on Generic Abstract Interpretation (Extended Abstract)
- Proceedings of the ILPS’97 Workshop on Specialisation of Declarative Programs and its Application, K.U. Leuven, Tech. Rep. CW 255
, 1997
"... Interpretation Germ'an Puebla John Gallagher y Manuel Hermenegildo (Extended Abstract) 1 Introduction Partial evaluation [JGS93, DGT96] specializes programs for known values of the input. Partial evaluation of logic programs has received considerable attention [Neu90, LS91, Sah93, Gal93, Le ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
Interpretation Germ'an Puebla John Gallagher y Manuel Hermenegildo (Extended Abstract) 1 Introduction Partial evaluation [JGS93, DGT96] specializes programs for known values of the input. Partial evaluation of logic programs has received considerable attention [Neu90, LS91, Sah93, Gal93, Leu97] and several algorithms parameterized by different control strategies have been proposed which produce useful partial evaluations of programs. Regarding the correctness of such transformations, two conditions, defined on the set of atoms to be partially evaluated, have been identified which which ensure correctness of the transformation: "closedness" and "independence" [LS91]. From a practical point of view, effectiveness, that is, finding suitable control strategies which provide an appropriate level of specialization while ensuring termination, is a crucial problem which has also received considerable attention. Much work has been devoted to the study of such control strategies in the ...
A Constraint-based Partial Evaluator for Functional Logic Programs and its Application
, 1998
"... The aim of this work is the development and application of a partial evaluation procedure for rewriting-based functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewriting-based computational model extends traditional functional ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
The aim of this work is the development and application of a partial evaluation procedure for rewriting-based functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewriting-based computational model extends traditional functional programming languages by incorporating logical features, including logical variables and built-in search, into its framework. This work is the first to address the automatic specialisation of these functional logic programs. In particular, a theoretical framework for the partial evaluation of rewriting-based functional logic programs is defined and its correctness is established. Then, an algorithm is formalised which incorporates the theoretical framework for the procedure in a fully automatic technique. Constraint solving is used to represent additional information about the terms encountered during the transformation in order to improve the efficiency and size of the residual programs. ...
Safe Folding/Unfolding with Conditional Narrowing
- PROC. OF THE INTERNATIONAL CONFERENCE ON ALGEBRAIC AND LOGIC PROGRAMMING, ALP'97, SOUTHAMPTON (ENGLAND
, 1997
"... Functional logic languages with a complete operational semantics are based on narrowing, a generalization of term rewriting where unification replaces matching. In this paper, we study the semantic properties of a general transformation technique called unfolding in the context of functional logic l ..."
Abstract
-
Cited by 10 (9 self)
- Add to MetaCart
Functional logic languages with a complete operational semantics are based on narrowing, a generalization of term rewriting where unification replaces matching. In this paper, we study the semantic properties of a general transformation technique called unfolding in the context of functional logic languages. Unfolding a program is defined as the application of narrowing steps to the calls in the program rules in some appropriate form. We show that, unlike the case of pure logic or pure functional programs, where unfolding is correct w.r.t. practically all available semantics, unrestricted unfolding using narrowing does not preserve program meaning, even when we consider the weakest notion of semantics the program can be given. We single out the conditions which guarantee that an equivalent program w.r.t. the semantics of computed answers is produced. Then, we study the combination of this technique with a folding transformation rule in the case of innermost conditional narrowing, and prove that the resulting transformation still preserves the computed answer semantics of the initial program, under the usual conditions for the completeness of innermost conditional narrowing. We also discuss a relationship between unfold/fold transformations and partial evaluation of functional logic programs.
A Partial Evaluation Framework for Curry Programs
, 1999
"... In this work, we develop a partial evaluation technique for residuating functional logic programs, which generalize the concurrent computation models for logic programs with delays to functional logic programs. We show how to lift the nondeterministic choices from run time to specialization time. We ..."
Abstract
-
Cited by 8 (5 self)
- Add to MetaCart
In this work, we develop a partial evaluation technique for residuating functional logic programs, which generalize the concurrent computation models for logic programs with delays to functional logic programs. We show how to lift the nondeterministic choices from run time to specialization time. We ascertain the conditions under which the original and the transformed program have the same answer expressions for the considered class of queries as well as the same floundering behavior. All these results are relevant for program optimization in Curry, a functional logic language which is intended to become a standard in this area. Preliminary empirical evaluation of the specialized Curry programs demonstrates that our technique also works well in practice and leads to substantial performance improvements. To our knowledge, this work is the first attempt to formally define and prove correct a general scheme for the partial evaluation of functional logic programs with delays.
Bottom Up Information Propagation for Partial Deduction (Extended Abstract)
- Proceedings of the International Workshop on Specialization of Declarative Programs and its Applications
, 1997
"... ) Wim Vanhoof Departement Computerwetenschappen Katholieke Universiteit Leuven Celestijnenlaan 200A, B-3001 Heverlee, Belgium e-mail: wimvh@cs.kuleuven.ac.be Tel: +32 16 327638, Fax: +32 16 327996 Abstract Traditional top down specialisation techniques are not optimal to specialise programs cont ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
) Wim Vanhoof Departement Computerwetenschappen Katholieke Universiteit Leuven Celestijnenlaan 200A, B-3001 Heverlee, Belgium e-mail: wimvh@cs.kuleuven.ac.be Tel: +32 16 327638, Fax: +32 16 327996 Abstract Traditional top down specialisation techniques are not optimal to specialise programs containing a lot of internal structure handling, such as programs containing abstract data types or meta programs. In this abstract, we discuss the difficulties top down specialisers have when specialising these kinds of programs. The difficulties arise from the fact that unfolding works in a top down way, whereas some information flows in a bottom up way. Therefore, top down techniques must be able to unfold deeply enough to reach the necessary information, and subsequently be able to keep it during specialisation. We therefore propose a program transformation phase, targeted to be interleaved with a completely general and fully automatic top down partial deduction scheme, which consists of pro...
Enhancing Partial Deduction via Unfold/Fold Rules
- Proc. LoPSTr '96
, 1996
"... We show that sometimes partial deduction produces poor program specializations because of its limited ability in (i) dealing with conjunctions of recursively defined predicates, (ii) combining partial evaluations of alternative computations, and (iii) taking into account unification failures. We pro ..."
Abstract
-
Cited by 7 (4 self)
- Add to MetaCart
We show that sometimes partial deduction produces poor program specializations because of its limited ability in (i) dealing with conjunctions of recursively defined predicates, (ii) combining partial evaluations of alternative computations, and (iii) taking into account unification failures. We propose to extend the standard partial deduction technique by using versions of the definition rule and the folding rule which allow us to specialize predicates defined by disjunctions of conjunctions of goals. We also consider a case split rule to take into account unification failures. Moreover, in order to perform program specialization via partial deduction in an automatic way, we propose a transformation strategy which takes as parameters suitable substrategies for directing the application of every transformation rule. Finally, we show through two examples that our partial deduction technique is superior to standard partial deduction. The first example refers to the automatic derivation...
Sonic partial deduction
- In Proceedings of the Third International Ershov Conference on Perspectives of System Informatics, LNCS
, 1998
"... The current state of the art for ensuring finite unfolding of logic programs consists of a number of online techniques where unfolding decisions are made at specialisation time. Introduction of a static termination analysis phase into a partial deduction algorithm permits unfolding decisions to be ..."
Abstract
-
Cited by 6 (4 self)
- Add to MetaCart
The current state of the art for ensuring finite unfolding of logic programs consists of a number of online techniques where unfolding decisions are made at specialisation time. Introduction of a static termination analysis phase into a partial deduction algorithm permits unfolding decisions to be made offline, before the actual specialisation phase itself. This separation improves specialisation time and facilitates the automatic construction of compilers and compiler generators. The main contribution of this paper is

