block
nanofil also basic block, label
A block is a labelled straight line of a function: phis, then instructions, then one jump (goto, branch, ret, rets, ret, unreachable). The first block is the entry and has no phis; its label is the name edges use.
ir.pl:
blockLabel, Phis, Insts, Jump; Syntax.v:blockwithb_label,b_phis,b_insts,b_jump; Semantics.v'sfind_block.A jump target may be
pollL, a poll edge. The control-flow graph iscfg:func_cfg/2(func_cfg).Entering a block costs one unit of fuel (
interp:block_outcome/7,stepatEnter), so the model'sOutOfFuelcomes where the interpreter's does.
The subtlety: labels must be unique (no_dups, checked by valid_func). The successor map keeps the last block of a label while the machine runs the first, so with a duplicate the proofs about dominance would speak of a different graph from the one that runs.
Linked from
- Cfg.v: cfg
- Dominance.v: edge
- ExternalMachine.v: call_site
- ExternalMachine.v: label
- Maps.v: hash_bound
- Semantics.v: find_block
- Semantics.v: outcome
- Semantics.v: point
- Sites.v: block_positions
- Startup.v: main_void_entry
- Syntax.v: block
- Term.v: name
- Term.v: term
- Transport.v: dblock
- Validate.v: labels
- Validate.v: preds_of
- Validate.v: succ_labels
- Validate.v: valid_block
- Walk.v: incoming_in