A state machine based programming language and toolchain for formally modeling, specifying, and checking complex distributed systems.
At a Glance
P language and framework (compiler, P Checker, PeasyAI, PObserve) released under the MIT License; free to use and self-install.
Engagement
Available On
Alternatives
Listed Dec 2026
About P
P is an open-source, MIT-licensed state machine based programming language for formally modeling and specifying distributed systems. Developers model a design as communicating state machines and use automated reasoning backends to check it against correctness specifications. The project is maintained by the P developers as a collaboration between industry and academia since 2013, and its latest listed release is PeasyAI v1.0.0.
What It Is
P is a formal modeling language and framework rather than a mathematical notation. Programmers describe system designs as collections of communicating state machines, then write safety and liveness specifications. The toolchain compiles and checks these models to find design bugs before implementation.
The framework has four main components: the P language, the P Checker, PeasyAI, and PObserve.
How Checking and Verification Work
The P Checker systematically explores interleavings of messages and failures to find deep bugs, and it produces reproducible error traces for debugging. Additional backends include PEx for exhaustive checking and PVerifier for formal proofs, with documentation for pure functions, init conditions, specifications, and lemmas. In P 3.0+, p compile reports all type errors in one pass by default, and --strict-errors restores abort-on-first-error behavior.
AI Assistance and Runtime Monitoring
PeasyAI generates P state machines, specifications, and test drivers from design documents. It integrates with Cursor and Claude Code via MCP, and the project lists 27 tools, ensemble generation, an auto-fix pipeline, and 1,200+ RAG examples. PObserve checks service logs against P monitors, so production systems can be validated against their formal specifications, with JUnit and CLI integrations documented.
Setup Path
P can be installed following the installation guide, built from source, or run through an official Docker image that bundles the P CLI, .NET SDK, JDK, Maven, and graphviz for amd64 and arm64. The documentation includes tutorials such as Client Server, Two Phase Commit, and Single Decree Paxos. The project states that teams across AWS have used P to reason about system designs.
Collections
Popular collections
- Team of Agents
Collection by @joemseifi
- Pick Up Where Your Agent Left Off
Collection by @caiovalverde
- Read Your Agent's Code Before You Merge
Collection by @presscheck
- Give Your Agent Design Taste
Collection by @linetwk
Add P to one of your collections.
Community Discussions
Be the first to start a conversation about P
Share your experience with P, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
P language and framework (compiler, P Checker, PeasyAI, PObserve) released under the MIT License; free to use and self-install.
- MIT License
- P language for modeling distributed systems as communicating state machines
- P Checker with PEx and PVerifier backends
- PeasyAI AI-assisted P development via MCP (Cursor, Claude Code)
- PObserve runtime monitoring
Capabilities
Key Features
- State machine based language for modeling distributed systems
- Safety and liveness specifications
- P Checker systematic exploration of message interleavings and failures
- Reproducible error traces
- PEx exhaustive checking backend
- PVerifier formal proofs backend
- PeasyAI AI-assisted generation of machines, specs, and tests
- PObserve runtime monitoring of service logs against P specifications
- Multi-error compilation reporting all type errors in one pass
- Official Docker image
Integrations
Demo Video

