scholarly journals Non-leftmost Unfolding in Partial Evaluation of Logic Programs with Impure Predicates

Author(s):  
Elvira Albert ◽  
Germán Puebla ◽  
John P. Gallagher
2014 ◽  
Vol 235 ◽  
pp. 70-97 ◽  
Author(s):  
Michael Leuschel ◽  
Germán Vidal

2012 ◽  
Vol 12 (4-5) ◽  
pp. 583-600 ◽  
Author(s):  
GERMAN VIDAL

AbstractTraditional approaches to automatic AND-parallelization of logic programs rely on some static analysis to identify independent goals that can be safely and efficiently run in parallel in any possible execution. In this paper, we present a novel technique for generating annotations for independent AND-parallelism that is based on partial evaluation. Basically, we augment a simple partial evaluation procedure with (run-time) groundness and variable sharing information so that parallel conjunctions are added to the residual clauses when the conditions for independence are met. In contrast to previous approaches, our partial evaluator is able to transform the source program in order to expose more opportunities for parallelism. To the best of our knowledge, we present the first approach to a parallelizing partial evaluator.


2005 ◽  
Vol 5 (3) ◽  
pp. 273-303 ◽  
Author(s):  
MARÍA ALPUENTE ◽  
SALVADOR LUCAS ◽  
GERMÁN VIDAL ◽  
MICHAEL HANUS

Many functional logic languages are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction mechanism of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal evaluation strategy which constitutes the basis of modern (narrowing-based) lazy functional logic languages. In this work, we present the fundamentals of partial evaluation in such languages. We provide correctness results for partial evaluation based on needed narrowing and show that the nice properties of this strategy are essential for the specialization process. In particular, the structure of the original program is preserved by partial evaluation and, thus, the same evaluation strategy can be applied for the execution of specialized programs. This is in contrast to other partial evaluation schemes for lazy functional logic programs which may change the program structure in a negative way. Recent proposals for the partial evaluation of declarative multi-paradigm programs use (some form of) needed narrowing to perform computations at partial evaluation time. Therefore, our results constitute the basis for the correctness of such partial evaluators.


2007 ◽  
Vol 7 (1-2) ◽  
pp. 215-247 ◽  
Author(s):  
JOSEP SILVA ◽  
GERMÁN VIDAL

AbstractProgram slicing has been mainly studied in the context of imperative languages, where it has been applied to a wide variety of software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This work introduces the first forward slicing technique for declarative multi-paradigm programs which integrate features from functional and logic programming. Basically, given a program and aslicing criterion(a function call in our setting), the computed forward slice contains those parts of the original program which arereachablefrom the slicing criterion. Our approach to program slicing is based on an extension of (online) partial evaluation. Therefore, it provides a simple way to develop program slicing tools from existing partial evaluators and helps to clarify the relation between both methodologies. A slicing tool for the multi-paradigm language Curry, which demonstrates the usefulness of our approach, has been implemented in Curry itself.


1998 ◽  
Vol 20 (4) ◽  
pp. 768-844 ◽  
Author(s):  
María Alpuente ◽  
Moreno Falaschi ◽  
Germán Vidal

Sign in / Sign up

Export Citation Format

Share Document