- Author
- Stephen Wolfram
- Published
- 21 July 2026
- Kind
- Long essay with computational experiments
- Original
- writings.stephenwolfram.com/2026/07/towards-a-theory-of-bugs-the-ruliology-of-the-unexpected/
- Subject
- Software design
What it is
Stephen Wolfram wrote this essay on the Stephen Wolfram Writings site. It treats a bug as a gap between a simple specification and a program's behavior. The essay uses the author's ideas of ruliology and computational irreducibility.
What it says
- Wolfram argues there are foundational ways to think about bugs, using computational irreducibility.
- Simple Turing machines show bugs, such as an add-one machine that fails at input 7.
- Some bugs appear only after many correct runs, as at n = 63.
- If a program is fully predictable, Wolfram asks, why run it at all?
- Proofs can show a simple machine is bug free, but they lengthen for irreducible systems.
- Sampling inputs can miss bugs, since bugs can be as rare as one can imagine.
- Wolfram favors well-designed languages and seeing inside a running program, such as by visualization.
What evidence it gives
The author enumerates small Turing machines and cellular automata and lists where they first misbehave. One combinator expression halts only after 137,356,329 steps. Formal proofs are shown for a few small machines. One cellular automaton is argued bug free. Number theory cases include a prime count that flips sign at the 23338590792nd prime.
Interests and limits
The author sells Wolfram Language and says it helps avoid bugs. Most examples are toy systems, and the link to everyday software is asserted. The many images of machines and cellular automata were not viewed, only the text. Claims about AI-written code are brief and untested.