p 3.1.0
dotnet tool install --global p --version 3.1.0
dotnet new tool-manifest
dotnet tool install --local p --version 3.1.0
#tool dotnet:?package=p&version=3.1.0
nuke :add-package p --version 3.1.0
<div align="center"> <img src="Icon/icon.png" width="20%"> <h2>Formal Modeling and Analysis of Distributed Systems</h2> </div>
P is a state machine based programming language for formally modeling and specifying complex distributed systems. P allows programmers to model their system design as a collection of communicating state machines and provides automated reasoning backends to check that the system satisfies the desired correctness specifications.
Impact
P enables developers to model system designs as communicating state machines—a natural fit for microservices and service-oriented architectures. Teams across AWS building flagship products—from storage (S3, EBS), to databases (DynamoDB, MemoryDB, Aurora), to compute (EC2, IoT)—use P to reason about the correctness of their designs. P has helped these teams eliminate several critical bugs early in the development process.
<div align="center"> <a href="https://www.youtube.com/watch?v=FdXZXnkMDxs"> <img src="https://img.youtube.com/vi/FdXZXnkMDxs/hqdefault.jpg" style="width:40%;"> </a> <br/> <em><a href="https://youtu.be/FdXZXnkMDxs?si=iFqpl16ONKZuS4C0">(Re:Invent 2023) Gain confidence in system correctness & resilience with Formal Methods</a></em> </div>
📄 Systems Correctness Practices at Amazon Web Services — Marc Brooker and Ankush Desai, Communications of the ACM, 2025.
Why Teams Choose P
| Benefit | Description |
|---|---|
| Thinking Tool | Writing specifications forces rigorous design thinking—many bugs are caught before any code runs. |
| Bug Finder | Model checking uncovers corner-case bugs that stress testing and integration testing miss. |
| Faster Iteration | After initial modeling, changes can be validated quickly before implementation. |
What's New
PeasyAI — AI-Powered Code Generation
Generate P state machines, specifications, and test drivers directly from design documents.
- Integrates with Cursor and Claude Code via MCP
- 27 specialized tools for P development
- Ensemble generation with auto-fix pipeline
- 1,200+ RAG examples for context-aware generation
PObserve — Runtime Monitoring
Validate that production systems conform to their formal P specifications.
- Check service logs against P monitors
- Bridge design-time verification with runtime behavior
- Works in both testing and production environments
Multi-Error Compilation (P 3.0+)
p compile reports ALL type errors in one pass by default, sorted by source
location. Cascade-suppression keeps root causes surfacing 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 string
Use --strict-errors (or -se) to restore the legacy abort-on-first
behavior:
$ p compile --strict-errors
[Error:] [bad.p:6:4] got type: bool, expected: int
The new default is particularly useful with AI fix loops (PeasyAI, Cursor) and large refactors — fix N errors per LLM round-trip instead of N round-trips per N errors.
The P Framework
| Component | Description |
|---|---|
| P Language | Model distributed systems as communicating state machines. Specify safety and liveness properties. |
| P Checker | Systematically explore message interleavings and failures to find deep bugs. Additional backends: PEx, PVerifier. |
| PeasyAI | AI-powered code generation with auto-fix and human-in-the-loop support. |
| PObserve | Validate service logs against P specifications. |
Let the fun begin!
You can find most of the information about the P framework on: https://p-org.github.io/P/
What is P? | Getting Started | PeasyAI | Tutorials | Case Studies | Publications
If you have any questions, please feel free to create an issue, ask on discussions, or email us.
P has always been a collaborative project between industry and academia (since 2013). The P team welcomes contributions and suggestions from all of you! See CONTRIBUTING for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.1.0 | 247 | 6/3/2026 |
| 3.0.4 | 1,258 | 3/13/2026 |
| 3.0.3 | 480 | 2/4/2026 |
| 3.0.2 | 44,140 | 12/12/2025 |
| 3.0.0 | 4,239 | 8/13/2025 |
| 2.4.0 | 1,484,539 | 8/7/2025 |
| 2.3.8 | 981 | 5/16/2025 |
| 2.3.7 | 791,838 | 4/23/2025 |
| 2.3.6 | 6,901 | 3/24/2025 |
| 2.3.5 | 36,495 | 2/18/2025 |
| 2.3.4 | 29,762 | 1/16/2025 |
| 2.3.3 | 322 | 1/8/2025 |
| 2.3.2 | 622 | 11/20/2024 |
| 2.3.1 | 524 | 10/21/2024 |
| 2.3.0 | 427 | 10/15/2024 |
| 2.2.2 | 1,058,887 | 8/12/2024 |
| 2.2.1 | 1,055 | 7/1/2024 |
| 2.2.0 | 13,395 | 5/30/2024 |
| 2.1.5 | 408 | 5/21/2024 |
| 2.1.4 | 313 | 5/20/2024 |