分布式(事件驱动)系统的形式化建模与分析
P: Formal Modeling and Analysis of Distributed (Event-Driven) Systems

原始链接: https://github.com/p-org/P

## P:一种用于分布式系统的形式化方法语言 分布式系统复杂且容易出现微妙的正确性错误,通常在部署*之后*才被发现。**P** 是一种基于状态机的编程语言,旨在通过形式化建模和验证来应对这一挑战。它允许开发者将系统表示为通信状态机,并利用自动化推理(模型检查、符号执行)来严格检查是否符合期望的规范。 目前,P 在亚马逊(AWS)内部得到广泛使用,已帮助验证了 S3 的强一致性协议等关键系统。除了 AWS 之外,它还应用于学术界(机器人学),并曾被用于验证 Windows 8/Phone 中的 USB 驱动程序堆栈。 经验表明,P 是一种强大的**思考工具**,能够阐明系统设计并在规范阶段提前消除错误。它还充当一个**错误查找器**,发现传统测试遗漏的边缘情况,并最终**提高开发速度**,实现自信且经过验证的更新。 更多信息、教程和案例研究请访问 [http://p-org.github.io/P/](http://p-org.github.io/P/)。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 P: 分布式(事件驱动)系统的形式化建模与分析 (github.com/p-org) 3 分,Davidbrcz 发表于 1 小时前 | 隐藏 | 过去的 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

NuGet GitHub license GitHub Action (CI on Windows) GitHub Action (CI on Ubuntu) GitHub Action (CI on MacOS) Tutorials

Challenge: Distributed systems are notoriously hard to get right. Programming these systems is challenging because of the need to reason about correctness in the presence of myriad possible interleaving of messages and failures. Unsurprisingly, it is common for service teams to uncover correctness bugs after deployment. Formal methods can play an important role in addressing this challenge!

P Overview: 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. P supports several backend analysis engines (based on automated reasoning techniques like model checking and symbolic execution) to check that the distributed system modeled in P satisfy the desired correctness specifications.

If you are wondering "why do formal methods at all?" or "how is AWS using P to gain confidence in correctness of their services?", the following re:Invent 2023 talk answers this question, provides an overview of P, and its impact inside AWS: (Re:Invent 2023 Talk) Gain confidence in system correctness & resilience with Formal Methods (Finding Critical Bugs Early!!)

Impact: P is currently being used extensively inside Amazon (AWS) for analysis of complex distributed systems. For example, Amazon S3 used P to formally reason about the core distributed protocols involved in its strong consistency launch. Teams across AWS are now using P for thinking and reasoning about their systems formally. P is also being used for programming safe robotics systems in Academia. P was first used to implement and validate the USB device driver stack that ships with Microsoft Windows 8 and Windows Phone.

Experience and lessons learned: In our experience of using P inside AWS, Academia, and Microsoft. We have observed that P has helped developers in three critical ways: (1) P as a thinking tool: Writing formal specifications in P forces developers to think about their system design rigorously, and in turn helped in bridging gaps in their understanding of the system. A large fraction of the bugs can be eliminated in the process of writing specifications itself! (2) P as a bug finder: Model checking helped find corner case bugs in system design that were missed by stress and integration testing. (3) P helped boost developer velocity: After the initial overhead of creating the formal models, future updates and feature additions could be rolled out faster as these non-trivial changes are rigorously validated before implementation.

Programming concurrent, distributed systems is fun but challenging, however, a pinch of programming language design with a dash of automated reasoning can go a long way in addressing the challenge and amplify the fun!.

You can find most of the information about the P framework on: http://p-org.github.io/P/.

What is P?, Getting Started, Tutorials, Case Studies and related Research Publications. If you have any further 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.

联系我们 contact @ memedata.com