ArticleslgStudy

computer science

Abstract rewriting machine

Abstract rewriting machine 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 machine rather than just read about it. In short: The Abstract Rewriting Machine (ARM) is a virtual machine which implements term rewriting for minimal term rewriting systems. Minimal term rewriting systems are left-linear term rewriting systems in which each rule takes on one of six forms: Each of these six forms is mapped (in ARM) to one or a few processor instructions on most contemporary micro processors.

Key takeaways

  • Abstract rewriting machine 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 machine to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Abstract rewriting machine from memory before moving on to harder problems.

Reference excerpt

The Abstract Rewriting Machine (ARM) is a virtual machine which implements term rewriting for minimal term rewriting systems. Minimal term rewriting systems are left-linear term rewriting systems in which each rule takes on one of six forms:

Each of these six forms is mapped (in ARM) to one or a few processor instructions on most contemporary micro processors. Accordingly, minimal term rewriting is achieved at tens to hundreds of clock cycles per reduction step—millions of reduction steps per second. ARM implements general term rewriting, in that every single-sorted unconditional left-linear term rewriting system can be transformed (compiled) into a minimal term rewriting system that gives rise to the same normal form relation. An overview with references to this compilation process for innermost rewriting, as well as a detailed overview of ARM, can be found in "Within ARM's reach: compilation of left-linear rewrite systems via minimal rewrite systems". A description for lazy (non-innermost) rewriting can be found in "Lazy rewriting on eager machinery". A documented implementation of ARM (with the term rewriting language Epic) is available here. Note that site and software are no longer being actively maintained.

References Giesl, J. R.; Middeldorp, A. (July 2004). "Transformation techniques for context-sensitive rewrite systems" (PDF). Journal of Functional Programming. 14 (4): 379–427. doi:10.1017/S0956796803004945. Lucas, Salvador (2002). "Lazy Rewriting and Context-Sensitive Rewriting" (PDF). Electronic Notes in Theoretical Computer Science. 64: 234–254. doi:10.1016/S1571-0661(04)80353-0. Archived from the original (PDF) on 2006-05-16. Retrieved 2015-08-29. Nguyen, Quang-Huy (2001). "Compact Normalisation Trace via Lazy Rewriting" (PDF). Electronic Notes in Theoretical Computer Science. 57: 87–108. doi:10.1016/S1571-0661(04)00269-5. S2CID 38634432. Schernhammer, F.; Gramlich, B. (April 2008). "Termination of Lazy Rewriting Revisited" (PDF). Electronic Notes in Theoretical Computer Science. 204: 35–51. doi:10.1016/j.entcs.2008.03.052. Kirchner, C.; Kirchner, H. (2014). "Equational Logic and Rewriting" (PDF). Handbook of the History of Logic. 9: 255–282. doi:10.1016/B978-0-444-51624-4.50006-X. ISBN 9780444516244.{{cite journal}}: CS1 maint: periodical has ISBN (link) Antoy, S.; Johannsen, J.; Libby, S. (2015). "Needed Computations Shortcutting Needed Steps". Electronic Proceedings in Theoretical Computer Science. 183: 18–32. arXiv:1505.07162v1. doi:10.4204/EPTCS.183.2.

Worked examples

Example 1 — a first encounter with Abstract rewriting machine

Start with the simplest possible case. Write down what Abstract rewriting machine 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 machine 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 machine 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 machine

In research
Abstract rewriting machine 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 machine 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 machine is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer science stubs, Term-rewriting programming languages, Virtual machines, so understanding it makes those chapters shorter.
In everyday life
Look for Abstract rewriting machine 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 machine” →

How to study Abstract rewriting machine in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Abstract rewriting machine 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 machine out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Abstract rewriting machine in simple terms?

The Abstract Rewriting Machine (ARM) is a virtual machine which implements term rewriting for minimal term rewriting systems. Minimal term rewriting systems are left-linear term rewriting systems in which each rule takes on one of six forms: Each of these six forms is mapped (in ARM) to one or a fe…

Why does Abstract rewriting machine 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 machine?

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 machine.

Tags

  • Computer science stubs
  • Term-rewriting programming languages
  • Virtual machines

Keep exploring