Microsoft is actively maintaining its domain-specific P language to let developers write safe asynchronous event-driven programs for Linux, Windows and Mac OS. Originally launched in 2015, the open source P language is known for modeling component communication of asynchronous systems.
P language creates programs in the form of finite state machines, and each state machine has an input queue, states, machine-local store and ability to send asynchronous messages to others. The basic operation in P can update a local store or even create some new machines.
Model checking methods help verify programs written in P. Further, the language ensures that an event cannot be potentially deferred.
Microsoft has additionally developed a P compiler that outputs a Zing model to enable systematic testing. The compiler also generates C code that can be used in a C compiler for execution.
Microsoft has extensively used P language in Windows 8 USB device driver stack. The team at Microsoft has leveraged the language to implement and verify the core. Moreover, the open source language has helped the software giant in serialising uncoordinated events in hardware, operating system, drivers and other components.
You can access the code of Microsoft’s P by visiting its official GitHub repository. The language comes under the MIT License.