next up previous
Next: Definitional trees Up: Incremental Needed Narrowing Previous: Introduction

Preliminaries

 

We assume familiarity with basic notions of term rewriting [DJ90] and functional logic programming [Han94]. We consider a signature tex2html_wrap_inline1811 partitioned into a set tex2html_wrap_inline1759 of constructors and a set tex2html_wrap_inline1765 of (defined) functions or operations. operation The set of terms and constructor terms with variables (e.g., x,y,z) from tex2html_wrap_inline1793 are denoted by tex2html_wrap_inline1821 and tex2html_wrap_inline1823 , respectively. We write tex2html_wrap_inline1825 for the list of objects tex2html_wrap_inline1827 . The set of variables occurring in a term t is denoted by tex2html_wrap_inline1831 . A term is linear if it does not contain multiple occurrences of one variable. root(t) denotes the symbol at the root of the term t. If tex2html_wrap_inline1837 ( tex2html_wrap_inline1839 ), the term t is said operation-rooted (constructor-rooted). A pattern is a linear term of the form tex2html_wrap_inline1843 where tex2html_wrap_inline1845 is n-ary and tex2html_wrap_inline1849 .

A position p in a term t is represented by a sequence of natural numbers ( tex2html_wrap_inline1855 denotes the empty sequence, i.e., the root position). tex2html_wrap_inline1857 denotes the set of positions of t. Positions are ordered by the prefix ordering: tex2html_wrap_inline1861 , if there exists p' such that p.p' =q. tex2html_wrap_inline1867 denotes the subterm of t at position p, and tex2html_wrap_inline1873 denotes the result of replacing tex2html_wrap_inline1867 by the term s (see [DJ90] for details). tex2html_wrap_inline1879 is the set of positions of operation-rooted subterms of t.

We denote by tex2html_wrap_inline1883 the substitution tex2html_wrap_inline1885 with tex2html_wrap_inline1887 for tex2html_wrap_inline1889 (with tex2html_wrap_inline1891 if tex2html_wrap_inline1893 ), and tex2html_wrap_inline1895 for all other variables x. The identity substitution is denoted by id. Substitutions are extended to morphisms on terms by tex2html_wrap_inline1901 for every term tex2html_wrap_inline1903 . Given terms t,s, we write tex2html_wrap_inline1907 if tex2html_wrap_inline1909 and say that t is a prefix of s (said strict if t<s). A unifier of two terms s and t is a substitution tex2html_wrap_inline1885 with tex2html_wrap_inline1923 .

A set of rewrite rules tex2html_wrap_inline1925 such that tex2html_wrap_inline1927 , tex2html_wrap_inline1929 , and tex2html_wrap_inline1931 is called a term rewriting system (TRS). The terms l and r are called the left-hand side (lhs) and the right-hand side (rhs) of the rule, respectively. A TRS tex2html_wrap_inline1937 is left-linear if l is linear for all tex2html_wrap_inline1941 . A TRS is constructor based (CB) if each lhs l is a pattern. Two (possibly renamed) rules tex2html_wrap_inline1925 and tex2html_wrap_inline1947 overlap, if there is a non-variable position tex2html_wrap_inline1949 and a most-general unifier tex2html_wrap_inline1885 such that tex2html_wrap_inline1953 . The pair tex2html_wrap_inline1955 is called a critical pair. A left-linear TRS without critical pairs is called orthogonal. A rewrite step is an application of a rewrite rule to a term, i.e., tex2html_wrap_inline1957 if there exists tex2html_wrap_inline1959 , a rewrite rule tex2html_wrap_inline1961 and a substitution tex2html_wrap_inline1885 with tex2html_wrap_inline1965 and tex2html_wrap_inline1967 . The instantiated lhs tex2html_wrap_inline1969 is called a redex. To evaluate terms containing variables, narrowing non-deterministically instantiates the variables such that a rewrite step is possible. Formally, tex2html_wrap_inline1971 is a narrowing step if p is a non-variable position in t and tex2html_wrap_inline1977 . We denote by tex2html_wrap_inline1979 a sequence of narrowing steps tex2html_wrap_inline1981 with tex2html_wrap_inline1983 .


next up previous
Next: Definitional trees Up: Incremental Needed Narrowing Previous: Introduction

Santiago Escobar
Fri Sep 3 14:51:16 MET DST 1999