Module init

Module init 

Source
Expand description

SMT lowering for the Init safety property.

This first version proves only a local one-element write pattern:

ptr.write(value)
require Init(ptr, T, 1)

Forward visit records ptr.write as a KnownInit fact. The common SMT backend then checks whether the Init target has the same address as a known initialized pointer. Range initialization across loops still needs a loop summary and is intentionally left as Unknown.

Functionsยง

array_elem_size ๐Ÿ”’
array_len_term ๐Ÿ”’
check ๐Ÿ”’
Check Init by lowering it to a common initialized-memory obligation.
check_for_checkpoint ๐Ÿ”’
Check Init at a return checkpoint for struct invariant verification.
compute_elem_size ๐Ÿ”’