Chymyst is a library and a framework for declarative concurrent programming.

It follows the chemical machine paradigm (known in the academic world as “Join Calculus”) and is implemented as an embedded DSL (domain-specific language) in Scala.

The goal of this book is to explain the chemical machine paradigm and to show examples of implementing concurrent programs in Chymyst. To follow the examples, the reader needs a basic familiarity with the Scala programming language.

Source code

The source code repository for Chymyst Core is at

Although this book focuses on using Chymyst in the Scala programming language, one can straightforwardly embed the chemical machine as a library on top of any programming language that has threads and semaphores. The main concepts and techniques of the chemical machine paradigm are independent of the chosen programming language. However, a purely functional language is a better fit for the chemical machine.

Dedication to Robert Boyle (1626-1691)

Robert Boyle's self-flowing flask

This drawing is by Robert Boyle, who was one of the founders of the science of chemistry. In 1661 he published a treatise titled “The Sceptical Chymist”, from which the Chymyst framework derives its name.