词条 | Path ordering (term rewriting) | |||||||||||||||||||||||||||||||||||
释义 |
In theoretical computer science, in particular in term rewriting, a path ordering is a well-founded strict total order (>) on the set of all terms such that f(...) > g(s1,...,sn) if f .> g and f(...) > si for i=1,...,n, where (.>) is a user-given total precedence order on the set of all function symbols. Intuitively, a term f(...) is bigger than any term g(...) built from terms si smaller than f(...) using a lower-precedence root symbol g. In particular, by structural induction, a term f(...) is bigger than any term containing only symbols smaller than f. A path ordering is often used as reduction ordering in term rewriting, in particular in the Knuth–Bendix completion algorithm. As an example, a term rewriting system for "multiplying out" mathematical expressions could contain a rule x*(y+z) → (x*y) + (x*z). In order to prove termination, a reduction ordering (>) must be found with respect to which the term x*(y+z) is greater than the term (x*y)+(x*z). This is not trivial, since the former term contains both fewer function symbols and fewer variables than the latter. However, setting the precedence (*) .> (+), a path ordering can be used, since both x*(y+z) > x*y and x*(y+z) > x*z is easy to achieve. Given two terms s and t, with a root symbol f and g, respectively, to decide their relation their root symbols are compared first.
The latter variations include:
Dershowitz, Okada (1988) list more variants, and relate them to Ackermann's system of ordinals. Formal definitionsThe multiset path ordering (>) can be defined as follows:[8]
where
More generally, an order functional is a function O mapping an ordering to another one, and satisfying the following properties:[10]
The multiset extension, mapping (>) above to (>>) above is one example of an order functional: (>>)=O(>). Another order functional is the lexicographic extension, leading to the lexicographic path ordering. References1. ^{{cite book| author=Nachum Dershowitz, Jean-Pierre Jouannaud| title=Rewrite Systems| year=1990| volume=B| pages=243–320| publisher=Elsevier| editor=Jan van Leeuwen| series=Handbook of Theoretical Computer Science}} Here: sect.5.3, p.275 2. ^{{cite book| author=Gerard Huet| title=Formal Structures for Computation and Deduction| date=May 1986| series=International Summer School on Logic of Programming and Calculi of Discrete Design| url=http://yquem.inria.fr/~huet/PUBLIC/Formal_Structures.ps.gz| deadurl=yes| archiveurl=https://web.archive.org/web/20140714171331/http://yquem.inria.fr/~huet/PUBLIC/Formal_Structures.ps.gz| archivedate=2014-07-14| df=}} Here: chapter 4, p.55-64 3. ^{{cite journal| author=N. Dershowitz| title=Orderings for Term-Rewriting Systems| journal=Theoret. Comput. Sci.| year=1982| volume=17| number=3| pages=279–301| url=http://www.cs.tau.ac.il/~nachum/papers/Orderings4TRS.pdf}} 4. ^{{cite techreport| author=S. Kamin, J.-J. Levy| title=Two Generalizations of the Recursive Path Ordering| year=1980| institution=Univ. of Illinois, Urbana/IL}} 5. ^Kamin, Levy (1980) 6. ^{{cite book| author=N. Dershowitz, M. Okada| chapter=Proof-Theoretic Techniques for Term Rewriting Theory| title=Proc. 3rd IEEE Symp. on Logic in Computer Science| year=1988| pages=104–111| url=http://www.cs.tau.ac.il/~nachum/papers/ProofTheoretic.pdf}} 7. ^{{cite book| author=Mitsuhiro Okada, Adam Steele| chapter=Ordering Structures and the Knuth–Bendix Completion Algorithm| title=Proc. of the Allerton Conf. on Communication, Control, and Computing| year=1988}} 8. ^Huet (1986), sect.4.3, def.1, p.57 9. ^Huet (1986), sect.4.1.3, p.56 10. ^Huet (1986), sect.4.3, p. 58 2 : Rewriting systems|Order theory |
|||||||||||||||||||||||||||||||||||
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。