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 of the Knuth-Morris-Pratt string matching algorithm, and the second example refers to the construction of a parser for a given regular expression. In both examples, the specialized programs are derived starting from naive, non-deterministic initial programs, whereas standard partial deduction can derive similar specialized programs only when complex, deterministic initial programs are provided.

Pettorossi, A., Proietti, M., Renault, S. (1997). Enhancing partial deduction via unfold/fold rules. In LOGIC PROGRAM SYNTHESIS AND TRANSFORMATION (pp.146-168). BERLIN 33 : SPRINGER-VERLAG BERLIN.

Enhancing partial deduction via unfold/fold rules

PETTOROSSI, ALBERTO;
1997-01-01

Abstract

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 of the Knuth-Morris-Pratt string matching algorithm, and the second example refers to the construction of a parser for a given regular expression. In both examples, the specialized programs are derived starting from naive, non-deterministic initial programs, whereas standard partial deduction can derive similar specialized programs only when complex, deterministic initial programs are provided.
6th International Workshop on Logic Program Synthesis and Transformation (LOPSTR 96) / 6th Inductive Logic Programming Workshop (ILP 96)
STOCKHOLM, SWEDEN
AUG 28-30, 1996
Network Computat Log, European Commiss, ESPRIT Compulog Net
Rilevanza internazionale
1997
Settore ING-INF/05 - SISTEMI DI ELABORAZIONE DELLE INFORMAZIONI
English
PROGRAMS; TRANSFORMATION
23
Intervento a convegno
Pettorossi, A., Proietti, M., Renault, S. (1997). Enhancing partial deduction via unfold/fold rules. In LOGIC PROGRAM SYNTHESIS AND TRANSFORMATION (pp.146-168). BERLIN 33 : SPRINGER-VERLAG BERLIN.
Pettorossi, A; Proietti, M; Renault, S
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2108/49578
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact