P: a formal modeling language whose newest releases are all an AI add-on
The P programming language.
At a glance
- What is it?
- P is a state machine language for modelling distributed systems and checking them against safety and liveness specifications, with a C# compiler, JVM checker backends and a diagram renderer in one toolchain image. What is new in the repository is mostly not the language: the last three releases are PeasyAI, a code generator, and the compiler's default error reporting was changed so an LLM can fix many errors per round trip.
- Who is it for?
- P fits teams designing distributed services who want to argue about correctness before writing the service, and who will accept modelling as a separate step rather than an afterthought. Three things to check before planning around it.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly C#, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- p-org/P3,734 ★ · +43
| Repository | 2026-09-24 | 2026-11-14 |
|---|---|---|
| p-org/P | 3.7k | 3.7k |
43 Stars in the last 51 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The three newest releases are all the AI add-on
The release list is worth reading before anything else, because it does not describe the language. All three recent tags are prefixed `peasyai`: version 0.2.0 on 26 February 2026, 0.3.0 on 3 March, and 1.0.0 on 5 March, which is three releases in eight days for a tool that generates P code, and no visible release for the P compiler itself. So a version bump you see on this repository tells you that the generator moved, not that the modelling language or the checker moved. The compiler does have its own version, and it matters: multi-error compilation is described as a P 3.0 feature, so the language version gates behaviour you will notice immediately. The last commit to the default branch is dated 3 September 2026, six months after the newest tag, so the branch is well ahead of anything released.
Building the tool needs a JDK because ANTLR shells out to java
The official Dockerfile explains its own odd dependency in a comment. The first stage starts from the .NET SDK 8.0 image and then installs a headless OpenJDK 17, with the reason stated plainly: the P compiler build runs the ANTLR4 code generator, which shells out to `java`, so a JDK is required even just to run the pack step. That is an unusual constraint for a tool whose compiler is written in C#, and it is the kind of thing that costs an afternoon if you build from source on a machine with only a .NET toolchain. The pack step targets one project file, the command line tool, and then copies the resulting packages out of a drop directory using a glob that matches both a lowercase and an uppercase initial, so it collects `p` and `P` package files in one pass. The tool is then installed as a global dotnet tool.
Two checker backends in two languages, one image
The toolchain is wide because the checking side is not one program. The Dockerfile's own comment assigns the pieces: the .NET SDK 8.0 for the compiler and the main checker, which are implemented in C#, a JDK 17 plus Maven for the additional checker backends that run on the JVM, with the Java sources targeting Java 17 and a Maven project file named in the comment, and graphviz for rendering coverage and state machine diagrams. The framework table names those extra backends as PEx and PVerifier. Running the checker is therefore a choice between backends written in two languages, and the image carries both runtimes rather than picking one. The published image is available for amd64 and arm64, which is the second place the toolchain makes an architectural demand on you.
The compiler now prints every type error to feed an LLM loop
The most interesting change in the repository is a compiler default that exists for machine readers. Under P 3.0 and later, `p compile` reports all type errors in one pass by default, sorted by source location, with cascade suppression so that root causes surface without downstream noise:
$ p compile
[Error:] [bad.p:6:4] got type: bool, expected: int
[Error:] [bad.p:8:13] could not find name 'undeclaredVar'
[Error:] [bad.p:9:16] operator '+' requires both operands to be int or both float; got int and stringThe stated reason is not human convenience. It says the new default is useful with AI fix loops and large refactors, because you fix N errors per model round trip instead of N round trips per N errors. The legacy behaviour of stopping at the first error is still available behind a flag, `--strict-errors` or the short form `-se`, and the example under it shows exactly one error where the default shows three. Any script that parses compiler output has to account for that.
PeasyAI exposes 27 tools over MCP with 1,200 RAG examples
The generator is the part of this repository with an active version number, so its stated capabilities are the ones to read closely. It generates P state machines, specifications and test drivers directly from design documents, which is the point: the input is prose or a design artifact rather than code. It integrates with Cursor and Claude Code through the Model Context Protocol, and the file claims 27 specialised tools for P development, which is a lot of surface for a language whose compiler fits in one dotnet tool. Generation is described as an ensemble with an auto-fix pipeline, and the context it works from is 1,200 or more retrieval examples. That is the same assumption the compiler default now makes: the intended consumer is a model in a loop rather than a person at a terminal.
PObserve closes the loop from a specification to a log
The third new component attacks the obvious objection to formal modelling, that a specification says nothing about what a running service actually did. PObserve validates that production systems conform to their P specifications, by checking service logs against P monitors, and it is described as bridging design-time verification with runtime behaviour. The claim is that it works in testing and production environments rather than only against a model, which puts log parsing in the same trust boundary as the checker. The framework table lists it beside the language, the checker and the generator, which is a sign of how the project now sees its own scope: language, verification, authoring and observation as four parts of one workflow.
Seven AWS services named, and a paper from 2025
The adoption claim is specific rather than generic. The file names storage with S3 and EBS, databases with DynamoDB, MemoryDB and Aurora, compute with EC2, and IoT, and says teams across AWS building those products use P to reason about correctness and that it has helped them eliminate several critical bugs early in development. The framing throughout is that modelling catches what testing misses: the benefits table claims specifications force rigorous thinking before any code runs, that model checking finds corner cases stress and integration testing miss, and that changes can be validated quickly after the initial modelling. The supporting artefacts are a 2023 conference talk and a 2025 Communications of the ACM article on systems correctness practice, which is the citation to read if you want the argument rather than the summary.
A .NET solution with a custom drop directory and uppercase folders
The tree is a large .NET solution rather than a language repository in the usual sense. There is a solution file, a source directory, a test directory, a tutorials directory, docs, an extensions directory, an eval directory, an icon folder, and a build directory that the Dockerfile reads from when it collects packages, plus a shared props file and a ChangeList file at the root. Most directory names are capitalised, which is a Windows convention that has outlived the tool's cross-platform ambitions, given an image published for both amd64 and arm64. The licence file is named LICENSE.txt rather than LICENSE, and the root also carries an agent instruction file, a code of conduct and a contributing guide. Questions go to issues, discussions, or a direct email address, and the project describes itself as collaborative between industry and academia since 2013.
Editorial conclusion
P fits teams designing distributed services who want to argue about correctness before writing the service, and who will accept modelling as a separate step rather than an afterthought. Three things to check before planning around it. The release stream is not the language: the last three tags are all PeasyAI, so pin by build rather than by assuming the newest tag moves the compiler. The toolchain is wide, with the .NET SDK, a JDK, Maven and graphviz all needed, and a JDK required even to build the compiler because the ANTLR code generator shells out to java. And the compiler's default now prints every type error, which is tuned for machine consumers, so if you script against `p compile` you may need the legacy single-error behaviour that the strict flag restores.
Frequently asked questions
What is the P programming language from p-org?
A state machine based language for formally modelling distributed systems: you describe a design as a collection of communicating state machines and specify safety and liveness properties, and a checker explores message interleavings and failures to test them. Additional checker backends are named PEx and PVerifier, and the compiler and main checker are implemented in C#.
What is p-coding, and is that what this repository is?
Not what this repository is about. This project is P, a state machine language for modelling distributed systems before they are built, with a checker that explores message interleavings and failures, a C# compiler, JVM checker backends and a diagram renderer. Nothing in the repository is about p-code or genetic programming.
How do I run the P toolchain without installing it?
Use the official Docker image, which bundles the P CLI, the .NET SDK, a JDK, Maven and graphviz, published for amd64 and arm64. It runs as a one-shot container with your working directory mounted at /workspace: docker run --rm -it -v "$PWD":/workspace ghcr.io/p-org/p:latest
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/p-org-p)Star history chart for your README
[](https://hysenlabs.com/projects/p-org-p)Was this useful?