A Hierarchy of Semantics for Non-deterministic Term Rewriting Systems

Formalisms involving some degree of nondeterminism are frequent in computer science. In particular, various programming or specification languages are based on term rewriting systems where confluence is not required. In this paper we examine three concrete possible semantics for non-determinism that can be assigned to those programs. Two of them --call-time choice and run-time choice-- are quite well-known, while the third one --plural semantics-- is investigated for the first time in the context of term rewriting based programming languages. We investigate some basic intrinsic properties of the semantics and establish some relationships between them: we show that the three semantics form a hierarchy in the sense of set inclusion, and we prove that call-time choice and plural semantics enjoy a remarkable compositionality property that fails for run-time choice; finally, we show how to express plural semantics within run-time choice by means of a program transformation, for which we prove its adequacy.

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

[2]  Narciso Martí-Oliet,et al.  All About Maude - A High-Performance Logical Framework, How to Specify, Program and Verify Systems in Rewriting Logic , 2007, All About Maude.

[3]  Adrián Riesco,et al.  Introducing the ITP Tool: a Tutorial , 2006, J. Univers. Comput. Sci..

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

[5]  Salvador Lucas,et al.  Needed Reductions with Context-Sensitive Rewriting , 1997, ALP/HOA.

[6]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

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

[8]  Michael Hanus,et al.  Functional Logic Design Patterns , 2002, FLOPS.

[9]  Michael Hanus,et al.  Multi-paradigm Declarative Languages , 2007, ICLP.

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

[11]  Francisco Javier López-Fraguas,et al.  A proof theoretic approach to failure in functional logic programming , 2004, Theory and Practice of Logic Programming.

[12]  John McCarthy,et al.  A BASIS FOR A MATHEMATICAL THEORY OF COMPUTATION 1) , 2018 .

[13]  John McCarthy,et al.  A basis for a mathematical theory of computation, preliminary report , 1899, IRE-AIEE-ACM '61 (Western).

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

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

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

[17]  J. S anchez-Hern andez A Flexible Framework for Programming with Non-deterministic Functions ? , 2008 .

[18]  Juan Rodríguez-Hortalá,et al.  A simple rewrite notion for call-time choice semantics , 2007, PPDP '07.

[19]  Juan Rodríguez-Hortalá,et al.  Rewriting and Call-Time Choice: The HO Case , 2008, FLOPS.

[20]  Razvan Diaconescu,et al.  An overview of CafeOBJ , 1998, WRLA.

[21]  Sergio Antoy Optimal Non-deterministic Functional Logic Computations , 1997, ALP/HOA.

[23]  Salvador Lucas,et al.  Context-sensitive Computations in Functional and Functional Logic Programs , 1998, J. Funct. Log. Program..

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

[25]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[26]  Tobias Nipkow,et al.  Term rewriting and all that , 1998 .