P
The P programming language.
Install / Use
/learn @p-org/PREADME
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
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.
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
