rocq/glibc/GlibcLogic.v
What the proofs of programs linked with user glibc's IR share (docs/glibc-ir.md): a raw load through a read-only capability, Iris adequacy for a program that starts owning pieces of its initial memory, and tactics that take a step whose values are all known by computing it.
glibc's functions are module code here, so their runs are walked with Logic.v's rules like the program's own. When the program's data is fixed, as a literal is, every value of such a run is a numeral: step takes the next instruction by its rule, every premise computed by the virtual machine, and norm_env keeps the frame's environment a list of numerals, so values do not grow into the expressions that made them.
Over a Logic instance
The shared rules and tactics over the runtime R and the Logic instance LG.
Tactics
An equation whose right side may be unknown: the left side computed, the right side made it, and the two checked by the virtual machine, so the kernel checks it the same way.
A pure premise of a step, all of whose values are known: by computation.
Replace the environment e of the goal by e', which the virtual machine shows equal.
Compute the environment of the goal's frame to a list of numerals.
One step of a block by its rule, or fail: a pure let, a flight, a branch, a goto, or entering a block, whose instructions are then unfolded.
The Iris instance of the registry and wi.
The expressions of the language.
wp_raw_load through a read-write or read-only capability: a raw load of a long at offset off from the proven pointer p, which addresses offset o of the live object b, where the cell holds v: d is bound to v modulo 2^64. glibc's strlen reads a string literal's words through its read-only capability.
Proof 20 steps Qed
Iris adequacy where the program starts owning the pieces ps of its initial memory, distinct and agreeing with it: if, for every admissible input, owning ps gives the entry's frame a weakest precondition with no contracts under any invariant and ghost heap instance, the module never panics. heap_never_panics with ps for its empty ghost heap.
Proof 19 steps Qed
The resources the proofs use: invariants and the ghost heap.
glibcΣ has invariants.
Proof 2 steps Qed
glibcΣ has the ghost heap of pieces.