The need for a formally verifiable mainstream programming language (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
Replies (3)
The original comment was about industrial automation and in that environment a lot of those issues are not that relevant. Unless we're talking really big systems, a lot of it is very well specified controllers which run without shell/VM/container/runtime. They just talk to some fancy general GUI on a different chip/board to load the data/config. But the state space of a lot of actual practical hardware doing the work is not that complex. Bare metal, careful io timing, state transitions and some control loops gets you very very far.
To be clear, there are bigger, complicated systems, but simpler devices with a clock, PID loop and I2C outnumber them by likely a few orders of magnitude - we can start there.
Replies (1)
Verification is not about "happy path logic" but all computation paths (happy, error, cross-layer etc.) over the entire state space of a "system".
The system can include everything from hardware circuits all the way to distributed applications if needed. Across layers/components it works by composition of contracts where a higher-layer guarantees based on its lower layer's contract guarantees. The book i listed gives examples.
See also my comment here - https://news.ycombinator.com/item?id=50664740
Replies (1)
Replies (1)
Basically, you have to keep your module internals "pure", distinguish between domain exceptions (i.e. checked) vs. environmental runtime exceptions (i.e. unchecked) and push all "impure" operations to the boundary of the module.
Also see the following paper which shows how to formally model hardware faults;
Faulty Logic: Reasoning about Fault Tolerant Programs - http://www.cs.princeton.edu/~dpw/papers/faultylogic_esop2010...
WTH is "happy path logic"? Formal verification's main feature and selling point is the guarantied safety of absolutely all paths, the happy path stuff is what testing does, you're confusing these quite hard.
> Programming is layers of abstraction on top several more - unless all of them are formally verified - program can be never be truly verified.
Yes, all of them are formally verified, the bots doing the verification get neither bored nor tired.
> Think of different hardware, software, time, timezone, os/drivers/shell/vm/container/language runtime versions etc.
I don't have to think about these, the bots handle them one by one, mainly by porting re-wrting in a manner that allows formal verification. There is a formally verified OS - even verified by hand long time ago - nowadays it's a lot easier.