A simple rewrite notion for call-time choice semantics

Non-confluent and non-terminating rewrite systems are interesting from the point of view of programming. In particular, existing functional logic languages use such kind of rewrite systems to define possibly non-strict non-deterministic functions. The semantics adopted for non-determinism is call-time choice, whose combination with non-strictness is not a trivial issue that has been addressed from a semantic point of view in the Constructor-based Rewriting Logic (CRWL) framework. We investigate here how to express call-time choice and non-strict semantics from a point of view closer to classical rewriting. The proposed notion of rewriting uses an explicit representation for sharing with let-constructions and is proved to be equivalent to the CRWL approach. Moreover, we relate this let-rewriting relation (and hence CRWL) with ordinary rewriting, providing in particular soundness and completeness of let-rewriting with respect to rewriting for a class of programs which are confluent in a certain semantic sense.

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

[2]  Francisco Javier López-Fraguas,et al.  Relating two semantic descriptions of functional logic programs , 2006 .

[3]  Francisco Javier López-Fraguas,et al.  Functional Logic Programming with Failure: A Set-Oriented View , 2001, LPAR.

[4]  Jaime Sánchez Hernández Una aproximación al fallo en programación declarativa multiparadigma , 2004 .

[5]  Martin Odersky,et al.  The call-by-need lambda calculus , 1998, Journal of Functional Programming.

[6]  Sergio Antoy,et al.  Lazy Context Cloning for Non-Deterministic Graph Rewriting , 2007, TERMGRAPH@ETAPS.

[7]  John Launchbury,et al.  A natural semantics for lazy evaluation , 1993, POPL '93.

[8]  Mario Rodríguez-Artalejo,et al.  A Higher Order Rewriting Logic for Functional Logic Programming , 1997, ICLP.

[9]  Michael Hanus,et al.  Overlapping Rules and Logic Variables in Functional Logic Programs , 2006, ICLP.

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

[11]  Mario Rodr,et al.  5 Functional and Constraint Logic Programming , 2002 .

[12]  J. C. Gonz Alez-Moreno,et al.  An Approach to Declarative Programming Based on a Rewriting Logic , 2022 .

[13]  Lee Naish A Higher Order Rewriting Logic for Functional Logic Programming , 1997 .

[14]  Detlef Plump,et al.  Essentials of Term Graph Rewriting , 2002, GETGRATS Closing Workshop.

[15]  R Echahed,et al.  On Constructor-based Graph Rewriting Systems on Constructor-based Graph Rewriting Systems , 1997 .

[16]  Mario Rodríguez-Artalejo,et al.  A Rewriting Logic for Declarative Programming , 1996, ESOP.

[17]  Francisco Javier López-Fraguas,et al.  TOY: A Multiparadigm Declarative System , 1999, RTA.

[18]  Germán Vidal,et al.  Operational semantics for declarative multi-paradigm languages , 2005, J. Symb. Comput..

[19]  Sergio Antoy Evaluation strategies for functional logic programming , 2005, J. Symb. Comput..

[20]  Aart Middeldorp,et al.  New completeness results for lazy conditional narrowing , 2004, PPDP '04.

[21]  Jean-Christophe Janodet,et al.  Admissible Graph Rewriting and Narrowing , 1998, IJCSLP.

[22]  Peter Sestoft,et al.  Non-Determinism in Functional Languages , 1992, Comput. J..

[23]  Rafael del Vado Vírseda A demand-driven narrowing calculus with overlapping definitional trees , 2003, PPDP '03.

[24]  Heinrich Hussmann,et al.  Nondeterminism in Algebraic Specifications and Algebraic Programs , 1993 .