Refining weakly outermost-needed rewriting and narrowing

  • Authors:
  • Santiago Escobar

  • Affiliations:
  • Technical University of Valencia, Valencia, Spain

  • Venue:
  • Proceedings of the 5th ACM SIGPLAN international conference on Principles and practice of declaritive programming
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Outermost-needed rewriting/narrowing is a sound and complete optimal demand-driven strategy for the class of inductively sequential constructor systems. Its parallel extension (known as weakly) deals with non-inductively sequential constructor systems. In this paper, we present natural rewriting, a suitable extension of (weakly) outermost-needed rewriting which is based on a refinement of the demandness notion associated to the latter, and we extend it to narrowing. Intuitively, natural rewriting (narrowing) always reduces (narrows) the most often demanded position in a term. We formalize the strategy for left-linear constructor systems though, for the class of inductively sequential constructor systems, natural rewriting (narrowing) behaves even better than outermost-needed rewriting (narrowing) in the avoidance of failing computations. With regard to inductively sequential constructor systems, we introduce a larger class of systems called inductively sequential preserving where natural rewriting and narrowing preserve optimality for sequential parts of the program. We also provide a prototype interpreter of natural rewriting and narrowing.