Makina: A QuickCheck state machine library - Bueso de Barrio, Luis Eduardo; Fredlund, Lars-Åke; Herranz, Ángel; Benac-Earle, Clara; Mariño, Julio (Journal of logical and algebraic methods in programming, 2026)
This article presents Makina, a library written in the Elixir programming language, and a domain specific language for writing property-based testing models for stateful programs. Models written in the domain specific language are translated into standard QuickCheck state machines. Our main goals with Makina are to facilitate the task of developing correct and maintainable models, and to encourage model reuse. To meet these goals, Makina provides a declarative syntax for defining model states and commands. In particular, Makina encourages the typing of specifications, and ensures that such type information can be used by Elixir type checking tools. Moreover, to promote model reuse, the domain specific language provides constructs that allow models to be defined in terms of collections of previously defined ones. To this end a number of operators for combining models have been defined and implemented in our library. A semantics for Makina models is presented in two steps. First, a novel operational semantics for standard QuickCheck state machine models is provided. Then, a translation from a Makina model to a standard QuickCheck state model is given.