guard chain
nanofil
A pointer's guard chain lists its bases with the offset of its address from each: P itself at i0, 0, then each base B reached through single-definition add, sub and copy flights whose lower donor is their address operand, with an interval for P's address minus B's, modulo 2^64. P has the capability of every base on its chain.
ir:guard_chain/3(at most 64 steps), offsets fromir:offset_interval/8. Readers:ir:guard_covers/5(renew_if), pointer distance (ir:pointer_distance/4,ir:same_pointer/3) through an exact baseiK, K,ir:raise_need/6(need). Validate.v:guard_chain,pointer_distance.Chain.v:
guard_chain_sound(each stable element holds of the pointer) andpointer_distance_sound(two pointers D apart share a capability, their addresses D apart modulo 2^64).
The subtlety: offsets are exact only modulo 2^64, so readers that need a true signed distance accept only near offsets. A practical one: Chain.v rewrites guard_chain by equations and never unfolds it in a hypothesis, or Qed takes minutes.
Linked from
- Chain.v: chain_go_sound
- Chain.v: guard_chain_sound
- Chain.v: offset_rel
- Chain.v: pointer_distance_sound
- Chain.v: step_let_holds
- Doomed.v: chain_dominating
- Doomed.v: raise_found
- Doomed.v: step_found
- Guard.v: span_test_ok
- Renew.v: chain_go_head
- Renew.v: distance_pointer
- Single.v: scope_plain
- Validate.v: ahead_step
- Validate.v: guard_chain
- Validate.v: guard_covers
- Validate.v: mem
- Validate.v: near_offset
- Validate.v: pointer_distance
- exact base
- flight
- lower chain
- near offset
- need
- offset interval
- pointer distance
- renew_if
- span_test