3 ms·
VerifiableC[1] provides Hoare rules for (a large subset[2] of) C that include function calls, pointers and heap allocation, and some amount of concurrency. It
by rssoconnor 6y ago
VerifiableC[1] provides Hoare rules for (a large subset[2] of) C that include function calls, pointers and heap allocation, and some amount of concurrency. It does use an extension to Hoare logic, called separation logic, to achieve some of these features. In particular, separation logic's frame rule is instrumental for the modularization needed for semantics of function calls.
[1]https://vst.cs.princeton.edu/veric/ https://vst.cs.princeton.edu/veric/
[2]excludes setjmp/longjmp, unstructured switch statements, goto and maybe a few other moderately exotic constructions.
- Joker_vD 6y agoNo goto? Funny, but there is actually a Hoare rule for goto (by Hoare himself), and a rather straightforward one: { pre(L) } S; { P } ------------------------ { pre(L) } L: S; { P } { pre(L) } goto L; { false } You just have to use the same precondition pre(L) for every mention of the label L.