P: Modular and Safe Asynchronous Programming

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10548)


We describe the design and implementation of P, an asynchronous event-driven programming language. P allows the programmer to specify the system as a collection of interacting state machines, which communicate with each other using events. P unifies modeling and programming into one activity for the programmer. Not only can a P program be compiled into executable code, but it can also be validated using systematic testing. P was first used to implement and validate the USB device driver stack that ships with Microsoft Windows 8 and Windows Phone. P is now also being used for the design and implementation of robotics and distributed systems inside Microsoft and in academia.


  1. 1.
    Desai, A., Gupta, V., Jackson, E., Qadeer, S., Rajamani, S., Zufferey, D.: P: safe asynchronous event-driven programming. In: Programming Language Design and Implementation (PLDI), pp. 321–332 (2013)Google Scholar
  2. 2.
    Desai, A., Qadeer, S., Seshia, S.A.: Systematic testing of asynchronous reactive systems. In: Foundations of Software Engineering (FSE), pp. 73–83 (2015)Google Scholar
  3. 3.
    Lamport, L.: Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley Longman Publishing Co., Inc, Boston (2002)Google Scholar
  4. 4.
    Holzmann, G.: Spin Model Checker, The: Primer and Reference Manual, 1st edn. Addison-Wesley Professional, Boston (2003)Google Scholar
  5. 5.
    Deligiannis, P., Donaldson, A.F., Ketema, J., Lal, A., Thomson, P.: Asynchronous programming, analysis and testing with state machines. ACM SIGPLAN Not. 50, 154–164 (2015). ACMCrossRefGoogle Scholar
  6. 6.
    Desai, A., Saha, I., Yang, J., Qadeer, S., Seshia, S.A.: DRONA: a framework for safe distributed mobile robotics. In: Proceedings of the 8th International Conference on Cyber-Physical Systems, ICCPS 2017, New York, NY, USA, pp. 239–248. ACM (2017)Google Scholar
  7. 7.
    Desai, A., Dreossi, T., Seshia, S.: Combining model checking and runtime verification for safe robotics. In: International Conference on Runtime Verification (RV) (2017)Google Scholar
  8. 8.
    Gray, J., Lamport, L.: Consensus on transaction commit. ACM Trans. Database Syst. 31, 133–160 (2006)CrossRefGoogle Scholar
  9. 9.
    Lamport, L.: Paxos made simple. ACM SIGACT News 32 (2001)Google Scholar
  10. 10.
    van Renesse, R., Schneider, F.B.: Chain replication for supporting high throughput and availability. In: Proceedings of the 6th Conference on Symposium on Opearting Systems Design & Implementation, OSDI 2004, vol. 6, p. 7. USENIX Association, San Francisco (2004).

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.University of CaliforniaBerkeleyUSA
  2. 2.Microsoft ResearchRedmondUSA

Personalised recommendations