Confluence (abstract rewriting)

Confluence (abstract rewriting)

In computer science, confluence is a property of rewriting systems, describing that terms in this system can be rewritten in more than one way, to yield the same result. This article describes the properties in the most abstract setting of an abstract rewriting system.

Contents

Motivating example

Consider the rules of regular arithmetic. We can think of these rules as forming a rewriting system. Suppose we are given the expression

 (11 + 9) \times (2 + 4)

We can rewrite this expression in two ways—either simplifying the first bracket, or the second. Simplifying the first bracket, we have

 20 \times (2 + 4) = 20 \times 6 = 120

Simplifying the second, gives

 (11 + 9) \times 6 = 20 \times 6 = 120

We get the same result from rewriting the term in two different ways. This suggests that the rewriting system formed from regular arithmetic is a confluent rewriting system.

General case and theory

Confluence diagram

A rewriting system can be expressed as a directed graph in which nodes represent expressions and edges represent rewrites. So, for example, if the expression a can be rewritten into b, then we say that b is a reduct of a (alternatively, a reduces to b, or b is an expansion of a). This is represented using arrow notation; a \rightarrow b indicates that a reduces to b. Intuitively, this means that the corresponding graph has a directed edge from a to b.

If there is a path between two graph nodes (let's call them c and d), then the intermediate nodes form a reduction sequence. So, for instance, if c \rightarrow c' \rightarrow c'' \rightarrow \cdots \rightarrow d' \rightarrow d, then we can write c \rightarrow^* d, indicating the existence of a reduction sequence from c to d.

With this established, confluence can be defined as follows. Let a, b, cS, with a →* b and a →* c. a is deemed confluent if there exists a dS with b →* d and c →* d. If every aS is confluent, we say that → is confluent, or has the Church-Rosser property. This property is also sometimes called the diamond property, after the shape of the diagram shown on the right. Caution: other presentations reserve the term diamond property for a variant of the diagram with single reductions everywhere; that is, whenever ab and ac, there must exist a d such that bd and cd. The single-reduction variant is strictly stronger than the multi-reduction one.

Local confluence

An element aS is said to be locally (or weakly) confluent if for all b, cS with ab and ac there exists dS with b →* d and c →* d. If every aS is locally confluent, we say that → is locally (or weakly) confluent, or has the weak Church-Rosser property. This is different from confluence in that b and c must be reduced from a in one step. In analogy with this, confluence is sometimes referred to as global confluence.

We may view →*, which we introduced as a notation for reduction sequences, as a rewriting system in its own right, whose relation is the transitive closure of R. Since a sequence of reduction sequences is again a reduction sequence (or, equivalently, since forming the transitive closure is idempotent), →** = →*. It follows that → is confluent if and only if →* is locally confluent.

A rewriting system may be locally confluent without being globally confluent. However, Newman's lemma states that if a locally confluent rewriting system has no infinite reduction sequences (in which case it is said to be terminating or strongly normalizing), then it is globally confluent.

Semi-confluence

The definition of local confluence differs from that of global confluence in that only elements reached from a given element in a single rewriting step are considered. By considering one element reached in a single step and another element reached by an arbitrary sequence, we arrive at the intermediate concept of semi-confluence: aS is said to be semi-confluent if for all b, cS with ab and a →* c there exists dS with b →* d and c →* d; if every aS is semi-confluent, we say that → is semi-confluent.

A semi-confluent element need not be confluent, but a semi-confluent rewriting system is necessarily confluent.

Strong confluence

Strong confluence is another variation on local confluence that allows us to conclude that a rewriting system is globally confluent. An element aS is said to be strongly confluent if for all b, cS with ab and ac there exists dS with b →* d and either cd or c = d; if every aS is strongly confluent, we say that → is strongly confluent.

A strongly confluent element need not be confluent, but a strongly confluent rewriting system is necessarily confluent.

See also

References

  • Term Rewriting Systems, Terese, Cambridge Tracts in Theoretical Computer Science, 2003.
  • Term Rewriting and All That, Franz Baader and Tobias Nipkow, Cambridge University Press, 1998 (book weblink)

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Abstract rewriting system — In mathematical logic and theoretical computer science, an abstract rewriting system (also (abstract) reduction system or abstract rewrite system; abbreviation ARS) is a formalism that captures the quintessential notion and properties of… …   Wikipedia

  • Confluence (disambiguation) — Confluence, in geography, describes the meeting of two or more bodies of water. Confluence may also refer to: Confluence (abstract rewriting), a property of term rewriting systems Confluence (meteorology), the streamline air flow convergence of a …   Wikipedia

  • Rewriting — In mathematics, computer science and logic, rewriting covers a wide range of potentially non deterministic methods of replacing subterms of a formula with other terms. What is considered are rewrite systems (also rewriting systems, or term… …   Wikipedia

  • Church–Rosser theorem — The Church–Rosser theorem states that if there are two distinct reductions starting from the same lambda calculus term, then there exists a term that is reachable from each reduct via a (possibly empty) sequence of reductions. This is symbolized… …   Wikipedia

  • Knuth-Bendix completion algorithm — The Knuth Bendix completion algorithm is an algorithm for transforming a set of equations (over terms) into a confluent term rewriting system. When the algorithm succeeds, it has effectively solved the word problem for the specified algebra. An… …   Wikipedia

  • Maude system — The Maude system is an implementation of rewriting logic developed at SRI International. It is similar in its general approach to Joseph Goguen s OBJ3 implementation of equational logic, but based on rewriting logic rather than order sorted… …   Wikipedia

  • Turing machine — For the test of artificial intelligence, see Turing test. For the instrumental rock band, see Turing Machine (band). Turing machine(s) Machina Universal Turing machine Alternating Turing machine Quantum Turing machine Read only Turing machine… …   Wikipedia

  • Russia — /rush euh/, n. 1. Also called Russian Empire. Russian, Rossiya. a former empire in E Europe and N and W Asia: overthrown by the Russian Revolution 1917. Cap.: St. Petersburg (1703 1917). 2. See Union of Soviet Socialist Republics. 3. See Russian… …   Universalium

  • Mesopotamia, history of — ▪ historical region, Asia Introduction  history of the region in southwestern Asia where the world s earliest civilization developed. The name comes from a Greek word meaning “between rivers,” referring to the land between the Tigris and… …   Universalium

  • Graph theory — In mathematics and computer science, graph theory is the study of graphs : mathematical structures used to model pairwise relations between objects from a certain collection. A graph in this context refers to a collection of vertices or nodes and …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”