Maude language
Reflective language and interpreter for rewriting logic, extending OBJ's equational core to concurrent and nondeterministic systems. Programs are rewrite theories; computation, search and LTL model checking are all deduction, which is why it doubles as a language framework.
Overview
Maude is a declarative language and interpreter for rewriting logic: a program is a rewrite theory, and computation is deduction in it. It extends the equational core of OBJ to concurrent and nondeterministic systems while keeping specification, programming and verification in one notation.
Code
fmod SIMPLE-NAT is
sort Nat .
op zero : -> Nat .
op s_ : Nat -> Nat .
op _+_ : Nat Nat -> Nat .
vars N M : Nat .
eq zero + N = N .
eq s N + M = s (N + M) .
endfm
red s s zero + s s s zero . ***> s s s s s zero
fmod LIST-CONS{X :: TRIV} is
sorts NeList{X} List{X} .
subsort NeList{X} < List{X} .
op [] : -> List{X} [ctor] .
op _:_ : X$Elt List{X} -> NeList{X} [ctor] .
op head : NeList{X} -> X$Elt .
var E : X$Elt . var L : List{X} .
eq head(E : L) = E .
endfm
fmod STRING-LIST is
protecting LIST-CONS{String} .
endfm
red head("a" : "b" : []) . ***> "a"
fmod SORTED-LIST-TEST is
protecting SORTABLE-LIST{Nat<} .
endfm
red sort(4 3 2 1) . ***> 1 2 3 4
mod SIMPLE-VENDING-MACHINE is
sorts Coin Item Marking .
subsorts Coin Item < Marking .
op __ : Marking Marking -> Marking [assoc comm id: null] .
op null : -> Marking .
ops $ q : -> Coin .
ops a c : -> Item .
rl [buy-c] : $ => c .
rl [buy-a] : $ => a q .
rl [change] : q q q q => $ .
endm
search $ q q q =>! a c M:Marking .
fmod is an equational theory; mod adds rl rules, which are not equations
— they rewrite the multiset Marking modulo assoc comm, so coins and items
match in any order and search explores a state space rather than one value.Distinctive traits
- Two logics in one language: membership equational logic types the data, rewriting logic on top describes state change.
- Rewriting modulo axioms
(
assoc,comm,id:) gives sets, multisets and lists native matching, with no hand-written normalisation. omodadds classes, inheritance and message syntax, but desugars to system modules — there is one execution engine underneath.- Parameterized programming
by theories and views, inherited from OBJ, with
List{Nat}sorts checked at parse time. - Reflection is
built in: modules are terms of
META-LEVEL, so strategies and tools are ordinary Maude code. - Verification is language-level:
search, an LTL model checker, and unification with narrowing for symbolic reachability.
Status
Actively maintained: Maude 3.5.1 shipped in July 2025 under GPL-2.0, with binaries for Linux and macOS and source at maude-lang/Maude. The Maude Formal Environment adds an inductive theorem prover plus termination and Church-Rosser checkers.
History
Maude grew out of rewriting logic, which Meseguer introduced in 1990 by extending OBJ's order-sorted equational logic with rewrite rules. Development began at SRI International's Computer Science Laboratory in the early 1990s; the first public release came at the end of 1999, followed by Maude 2 in 2003 and the Maude 3 line from 2019.
Sources & references
- Official sitemaude.cs.illinois.edu
- Maude Overview — reflective language for equational and rewriting logicmaude.cs.illinois.edu
- Maude Manual 3.5.1, Chapter 1: Introduction (Clavel, Durán, Eker, Escobar, Lincoln, Martí-Oliet, Meseguer, Rubio, Talcott)maude.cs.illinois.edu
- Maude Manual, Chapter 5: System Modules, Rewriting and Searchmaude.cs.illinois.edu
- Maude Manual, Chapter 7: Module Operations — theories, views, parameterized modulesmaude.cs.illinois.edu
- Maude interpreter source and releases (maude-lang/Maude), GPL-2.0github.com
- Two Decades of Maude (Martí-Oliet, Palomino, Verdejo) — release historyriuma.uma.es