Refining weakly outermost-needed rewriting and narrowing

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.

[1]  Aart Middeldorp Call by need computations to root-stable form , 1997, POPL '97.

[2]  Aart Middeldorp,et al.  Decidable call-by-need computations in term rewriting , 2005, Inf. Comput..

[3]  Salvador Lucas,et al.  Termination of on-demand rewriting and termination of OBJ programs , 2001, PPDP '01.

[4]  Wan Fokkink,et al.  Lazy rewriting on eager machinery , 2000, TOPL.

[5]  Aart Middeldorp,et al.  Decidable Call by Need Computations in term Rewriting (Extended Abstract) , 1997, CADE.

[6]  Michael Hanus,et al.  Curry: an integrated functional logic language (version 0 , 2003 .

[7]  Salvador Lucas,et al.  UPV-CURRY: An Incremental CURRY Interpreter , 1999, SOFSEM.

[8]  Jean-Marie Hullot,et al.  Canonical Forms and Unification , 1980, CADE.

[9]  Salvador Lucas,et al.  Strongly Sequential and Inductively Sequential Term Rewriting Systems , 1998, Inf. Process. Lett..

[10]  María Alpuente,et al.  Specialization of lazy functional logic programs , 1997, PEPM.

[11]  Aart Middeldorp,et al.  A Sequential Reduction Strategy , 1994, ALP.

[12]  Sergio Antoy Definitional Trees , 1992, ALP.

[13]  M. Hanus,et al.  Curry: A Truly Functional Logic Language , 1995 .

[14]  Salvador Lucas,et al.  Improving On-Demand Strategy Annotations , 2002, LPAR.

[15]  Sergio Antoy Constructor-based conditional narrowing , 2001, PPDP '01.

[16]  Michael Hanus,et al.  The Integration of Functions into Logic Programming: From Theory to Practice , 1994, J. Log. Program..

[17]  Rachid Echahed,et al.  A needed narrowing strategy , 2000, JACM.

[18]  Terese Term rewriting systems , 2003, Cambridge tracts in theoretical computer science.

[19]  Salvador Lucas,et al.  Demandness in Rewriting and Narrowing , 2002, WFLP.

[20]  Juan José Moreno-Navarro,et al.  Logic Programming with Functions and Predicates: The Language BABEL , 1992, J. Log. Program..

[21]  M. Hanus,et al.  Curry: An Integrated Functional Logic Language , 2003 .

[22]  Jürgen Giesl,et al.  Termination of term rewriting using dependency pairs , 2000, Theor. Comput. Sci..

[23]  James R. Slagle,et al.  Automated Theorem-Proving for Theories with Simplifiers Commutativity, and Associativity , 1974, JACM.

[24]  LanguagesSERGIO Parallel Evaluation Strategies for Functional Logic Languages , 1997 .

[25]  Salvador Lucas Context-sensitive rewriting strategies , 2002 .

[26]  Uday S. Reddy,et al.  Narrowing as the Operational Semantics of Functional Languages , 1985, SLP.