Towards a Theory of Bugs: The Ruliology of the Unexpected

An essay asking whether a general theory of bugs can rest on computational irreducibility.

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

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.