ArticleslgStudy

computer science

Abstract rewriting system

Abstract rewriting system is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Abstract rewriting system rather than just read about it. In short: In mathematical logic and theoretical computer science, an abstract rewriting system (also (abstract) reduction system or abstract rewrite system; abbreviated ARS) is a formalism that captures the quintessential notion and properties of rewriting systems. In its simplest form, an ARS is simply a set (of "objects") together with a binary relation, traditionally denoted with →; this definition can be further refined i…

Abstract rewriting system — main illustration
Abstract rewriting system — illustration

Key takeaways

  • Abstract rewriting system belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Abstract rewriting system to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Abstract rewriting system from memory before moving on to harder problems.

Reference excerpt

In mathematical logic and theoretical computer science, an abstract rewriting system (also (abstract) reduction system or abstract rewrite system; abbreviated ARS) is a formalism that captures the quintessential notion and properties of rewriting systems. In its simplest form, an ARS is simply a set (of "objects") together with a binary relation, traditionally denoted with →; this definition can be further refined if we index (label) subsets of the binary relation. Despite its simplicity, an ARS is sufficient to describe important properties of rewriting systems like normal forms, termination, and various notions of confluence. Historically, there have been several formalizations of rewriting in an abstract setting, each with its idiosyncrasies. This is due in part to the fact that some notions are equivalent, see below in this article. The formalization that is most commonly encountered in monographs and textbooks, and which is generally followed here, is due to Gérard Huet (1980).

Definition An abstract reduction system (ARS) is the most general (unidimensional) notion about specifying a set of objects and rules that can be applied to transform them. More recently, authors use the term abstract rewriting system as well. (The preference for the word "reduction" here instead of "rewriting" constitutes a departure from the uniform use of "rewriting" in the names of systems that are particularizations of ARS. Because the word "reduction" does not appear in the names of more specialized systems, in older texts reduction system is a synonym for ARS.) An ARS is a set A, whose elements are usually called objects, together with a binary relation on A, traditionally denoted by →, and called the reduction relation, rewrite relation or just reduction. This (entrenched) terminology using "reduction" is a little misleading, because the relation is not necessarily reducing some measure of the objects. In some contexts it may be beneficial to distinguish between some subsets of the rules, i.e. some subsets of the reduction relation →, e.g. the entire reduction relation may consist of associativity and commutativity rules. Consequently, some authors define the reduction relation → as the indexed union of some relations; for instance if →1∪→2=→, the notation used is (A, →1, →2). As a mathematical object, an ARS is exactly the same as an unlabeled state transition system, and if the relation is considered as an indexed union, then an ARS is the same as a labeled state transition system with the indices being the labels. The focus of the study, and the terminology are different however. In a state transition system one is interested in interpreting the labels as actions, whereas in an ARS the focus is on how objects may be transformed (rewritten) into others.

Example 1 Suppose the set of objects is T = {a, b, c} and the binary relation is given by the rules a → b, b → a, a → c, and b → c. Observe that these rules can be applied to both a and b to get c. Furthermore, nothing can be applied to c to transform it any further. Such a property is clearly an important one.

Basic notions First define some basic notions and notations.

→+ is the transitive closure of →. →∗ is the reflexive transitive closure of →, i.e. the transitive closure of (→)∪(=), where = is the identity relation. Equivalently, →∗ is the smallest preorder containing →. Similarly, ←+, and ←∗ are closures of ←, the converse relation of →. ↔ is the symmetric closure of →, that is, the union of → with ←. ↔∗ is the reflexive transitive symmetric closure of →, i.e. the transitive closure of (↔)∪(=). Equivalently, ↔∗ is the smallest equivalence relation containing →.

Normal forms

An object x in A is called reducible if there exist some other y in A and x→y; otherwise it is called irreducible or a normal form. An object y is called a normal form of x if x→∗y and y is irreducible. If x has a unique normal form, then this is usually denoted with x↓. In example 1 above, c is a normal form, and c=a↓=b↓. If every object has at least one normal form, the ARS is called normalizing.

Joinability A related, but weaker notion than the existence of normal forms is that of two objects being joinable: x and y are said to be joinable if there exists some z with the property that x→∗z←∗y. From this definition, it's apparent one may define the joinability relation as →∗∘←∗, where ∘ is the composition of relations. Joinability is usually denoted, somewhat confusingly, also with ↓, but in this notation the down arrow is a binary relation, i.e. we write x↓y if x and y are joinable.

The Church–Rosser property and notions of confluence

An ARS is said to possess the Church–Rosser property if and only if x↔∗y implies x↓y for all objects x, y. Equivalently, the Church–Rosser property means that the reflexive transitive symmetric closure is contained in the joinability relation. Alonzo Church and J. Barkley Rosser proved in 1936 that lambda calculus has this property; hence the name of the property. In an ARS with the Church–Rosser property the word problem may be reduced to the search for a common successor. In a Church–Rosser system, an object has at most one normal form; that is, the normal form of an object is unique if it exists, but it may well not exist. Various properties, simpler than Church–Rosser, are equivalent to it. The existence of these equivalent properties allows one to prove that a system is Church–Rosser with less work. Furthermore, the notions of confluence can be defined as properties of a particular object, something that's not possible for Church–Rosser. An ARS (A,→) is said to be,

confluent if and only if for all w, x, and y in A, x←∗w→∗y implies x↓y. Roughly speaking, confluence says that no matter how two paths diverge from a common ancestor (w), the paths are joining at some common successor. This notion may be refined as property of a particular object w, and the system called confluent if all its elements are confluent. semi-confluent if and only if for all w, x, and y in A, x←w→∗y implies x↓y. This differs from confluence by the single step reduction from w to x. locally confluent if and only if for all w, x, and y in A, x←w→y implies x↓y. This property is sometimes called weak confluence.

Theorem. For an ARS the following three conditions are equivalent: (i) it has the Church–Rosser property, (ii) it is confluent, (iii) it is semi-confluent. Corollary. In a confluent ARS if x↔∗y then

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Abstract rewriting system

Start with the simplest possible case. Write down what Abstract rewriting system claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Abstract rewriting system before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Abstract rewriting system ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Abstract rewriting system

In research
Abstract rewriting system appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Abstract rewriting system in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Abstract rewriting system is common in secondary-school and first-year university syllabi. It links to neighbouring topics Formal languages, Logic in computer science, Rewriting systems, so understanding it makes those chapters shorter.
In everyday life
Look for Abstract rewriting system outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Abstract rewriting system” →

How to study Abstract rewriting system in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Abstract rewriting system means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Abstract rewriting system out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Abstract rewriting system in simple terms?

In mathematical logic and theoretical computer science, an abstract rewriting system (also (abstract) reduction system or abstract rewrite system; abbreviated ARS) is a formalism that captures the quintessential notion and properties of rewriting systems. In its simplest form, an ARS is simply a se…

Why does Abstract rewriting system matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Abstract rewriting system?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Abstract rewriting system.

Tags

  • Formal languages
  • Logic in computer science
  • Rewriting systems

Keep exploring