rocq/spikes/ListSum.v
The program both logic spikes prove, shared by them: spikes/listsum.c, which builds a linked list of n nodes on the collected heap (__builtin_alloca, which Fil-C places there), then calls sum, which walks it and adds each node's value. Its checked module is listsum_term (ListSumCode.v, checked current by spikes/code.sh).
sum is gc.ir's list walk in checked form: per node a check of the value's 8 bytes, a lower half check for the next pointer, a raw pointer load through the aux, and a poll on the back edge. listsum adds an allocation per iteration, a pointer store and a direct call. This file holds only what both spikes need: the module, its globals, its two functions and their call frames (docs/logic.md).
The checked module, decoded from the fixture listsum_term.
The fixture decodes to ls_module.
Explore proof 2 tactics
Initial goal
vm_compute
reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The module's globals: its two functions, sum and listsum.
The module's initial memory, which holds no object.
Laying out the module succeeds, with ls_globals and ls_mem.
Explore proof 3 tactics
Initial goal
assert H : option_mapλ_ ⇒ tt initial_memoryls_module = Somett by vm_compute ; reflexivity
unfold ls_globals , ls_mem
destruct initial_memoryls_module as g m | ; inversion H ; reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
The genv of the module with the free x.
The function named n in the module, as find_fn finds it.
sum is a function of the core subset in the module.
Explore proof 3 tactics
Initial goal
intros free
vm_compute
reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
listsum is a function of the core subset in the module.
Explore proof 3 tactics
Initial goal
intros free
vm_compute
reflexivity
No remaining goals.
Qed
✓ Proof checked and closed by Rocq.
Source script
Block l of the function f after its first j instructions.
Any arguments whose first word is x start sum at its entry with x as its parameter v0.
Explore proof 1 tactics
Any arguments whose first word is the integer n start listsum at its entry with n as its parameter v0.