need
nanofil also needs
In Fil-C the check scheduler, filc-optimize-checks (FilPizlonator.cpp)
A need is the validator's backward fact for check_ahead: need(B) = H at a point says every path from it reaches a raw heap access through a pointer of which B is an exact base, whose bytes reach B + H, and reaches it first: before any instruction that is not ahead-transparent, any poll edge, edge back or end, and before B is redefined.
ir.pl computes needs in one backward sweep over the blocks, last first:
ir:ahead_justified/3withir:ahead_block/6,ir:ahead_edge/5,ir:raise_need/6andir:ahead_meet/2. A block's exit needs are the meet over its edges, keeping the least H; a plain edge to a later block carries that block's entry needs, any other edge none.Ahead.v states them as functions of the point,
block_exitandfacts_from, and proves the sweep computes them (ahead_entry,ahead_accepted). Doomed.v carries them forward along a doomed run (need_at); the access that meets one fails (need_access_fails).
The subtlety: offsets along a guard chain are exact only modulo 2^64, so a need counts only near offsets.
Linked from
- Ahead.v: ahead_accepted
- Ahead.v: ahead_accepts_nil
- Ahead.v: exit_in
- Doomed.v: ahead_holds
- Doomed.v: doomed_ok
- Doomed.v: exit_targets
- Doomed.v: meet_found
- Doomed.v: need_at
- Doomed.v: phis_found
- Doomed.v: raise_found
- Doomed.v: raise_keeps
- Doomed.v: step_found
- Doomed.v: step_keeps
- Syntax.v: ahead_transparent
- Validate.v: ahead_accepts
- Validate.v: ahead_edge
- Validate.v: ahead_fold
- Validate.v: ahead_meet
- Validate.v: facts
- Validate.v: raise_need
- ahead-transparent
- check_ahead
- doomed frame
- exact base
- exit facts
- guard chain
- near offset
- offset interval
- phi