What does HackerNews think of P?

The P programming language.

Language: C#

#4 in Python
px-1">P is a state machine language. Microsoft used it to build their usb driver in windows 7 or 8 or something like that.

px-1">https://github.com/p-org/P

EDIT: It looks like it's also being used in AWS.

I tried to use TLA+ but what annoys me the most is the disconnection between the actual implementation and its code. I think the P language has a much better future just because it can generate code that works: px-1">https://github.com/p-org/P
The universal problem is "generating code from a formal spec" is extremely, maddeningly, pull-your-hair-outingly hard. A slightly easier thing, as you said, generating test cases, which is what the Mongo people have been advancing: https://arxiv.org/abs/2006.00915

(Another interesting approach in this space is P, which is lower-level than TLA+ but also can compile to C#: px-1">https://github.com/p-org/P)

It is tough.

My approach when learning new protocols like Raft or Paxos is to implement them in Pluscal (TLA+'s higher-level language) or P (px-1">https://github.com/p-org/P). I've found that helps separate the protocol-level concerns from the implementation-level concerns (sockets? wire format?) in a way that reduces the difficulty of learning the protocol.

I recently found Microsoft’s P programming language px-1">https://github.com/p-org/P and I’m wondering how it fits into this space. The P README says:

P is a language for asynchronous event-driven programming. 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 systematically tested using Model Checking. P has been used to implement and validate the USB device driver stack that ships with Microsoft Windows 8 and Windows Phone. P is currently being used extensively inside Amazon (AWS) for model checking complex distributed systems.

Exactly, parsers are complicated, generally involve a lot of manipulation of memory buffers, and for performance reasons are usually written in a language without memory safety (though this is starting to change with languages like px-1">https://github.com/p-org/P and rust).
In many ways I'm most interested in the Windows bugs: Windows 8+ has a model-checked USB stack written in P (px-1">https://github.com/p-org/P). Or maybe that's just the USB 3.0 stack? Either way, would be interested in whether they're in the integration code or bugs in the P compiler.
They link to the `P` language, which I did not know about.

px-1">https://github.com/p-org/P

I found the link interesting because I have at times wondered what it would look likes if FSM were first class control flow features, akin to `if` and `while`.

Microsoft does research how to improve security at OS level and sometimes those efforts do end up on Windows.

Latest examples, Windows 10 secure kernel and Device Driver protection.

https://myignite.microsoft.com/sessions/36925

Or the new Windows USB stack, written in the P language.

px-1">https://github.com/p-org/P

UNIXes, not so much beyond patching C exploits.

This is good writeup but very misleading title. Article essentially describes using SPARK to avoid runtime errors in firmware such as overflows. But that is far cry from avoiding drone crashes. You can do lot of these things with sophisticated code analysis (although not all of it). But the thing is that it doesn't solve the primary issues of algorithmic errors or even errors that might occur because of things like timing issues or sensor noise. Of course, it doesn't do anything about obstacle detection and avoidance. I would imagine that very small number of crashes occurs due to runtime errors in firmware.

There have been lot of other work going on for verifiability for realtime firmware code. For example P programming language: px-1">https://github.com/p-org/P. But still it doesn't tackle the issues mentioned above that causes majority of crashes.