Pavlov for the Web

One of the aims of pavlov is to give developers and LLMs a model-check-driven development workflow that is superior to both traditional TDD and REPL-driven development. When using pavlov, you should be able to use a model to guarantee that your application does nothing you do not want it to do, and everything you do want it to do. This is straightforward to do with an application that runs on a single system. Model checking comes for free with the behavioral programming paradigm. ...

2026-04-17 · 4 min · 698 words · Thomas Cothran

Bthreads: A Simple and Easy Paradigm for Clojure

Asynchronous programs are hard to reason about. But is this intrinsic to asynchrony? Or might we be using the wrong paradigms? Behavioral programming is a programming paradigm that aims to make asynchronous, event-driven systems both simple and easy by using a system centered on behavioral threads (bthreads). In my previous article, I introduced the idea of behavioral programming in Clojure. In this article, we dive deeper. I hope to convince you that, compared to the alternatives: ...

2024-10-30 · 9 min · 1723 words · Thomas Cothran

Behavioral Programming in Clojure

Behavioral Programming is a relatively new programming paradigm that excels at isolating and composing behaviors in event driven system. It is unrelated to behavior driven development. Behavioral programming was invented by David Harel, who also invented statecharts in 1987. It uses independent units of behavior, called bthreads, which are coordinated in a pub-sub protocol. How does it work? A behavioral program will first collect the bids from all of its bthreads. A bid can do three things: ...

2024-09-24 · 5 min · 913 words · Thomas Cothran