In mathematics and theoretical computer science, a Kleene algebra is a semiring that generalizes the theory of regular expressions: it consists of a set supporting union (addition), concatenation (multiplication), and Kleene star operations subject to certain algebraic laws. The addition is required to be idempotent ( x + x = x {\displaystyle x+x=x} for all x {\displaystyle x} ), and induces a partial order defined by x ≤ y {\displaystyle x\leq y} if x + y = y {\displaystyle x+y=y} . The Kleene star operation, denoted x ∗ {\displaystyle x*} , must satisfy the laws of the closure operator.
Kleene algebras have their origins in the theory of regular expressions and regular languages introduced by Kleene in 1951 and studied by others including V.N. Redko and John Horton Conway. The term was introduced by Dexter Kozen in the 1980s, who fully characterized their algebraic properties and, in 1994, gave a finite axiomatization.
Kleene algebras have a number of extensions that have been studied, including Kleene algebras with tests (KAT) introduced by Kozen in 1997. Kleene algebras and Kleene algebras with tests have applications in formal verification of computer programs. They have also been applied to specify and verify computer networks.