Theory CFG_Def
theory CFG_Def
imports "Voblint_VIMP.VIMP_Proc" "HOL-Library.Countable"
begin
section ‹Procedure-aware control-flow graph›
text ‹
A ‹cfg› is an interprocedural control-flow graph over two disjoint transition
relations, one per phenomenon:
▪ ‹intra› --- ordinary context-preserving flow, labelled by an ‹edge_action› that is
a total within-context store transformer. Executed by ‹edge_step›.
▪ ‹calls› --- context-crossing calls, labelled by a ‹call_action› and carrying the
call-site, the callee entry node, and the continuation node.
Nodes are procedure-aware: ‹FunctionEntry p› and ‹FunctionResult p› are first-class
nodes, not keyed side slots. There is no global exit node and no call/return matching
side relation: a call edge already names its callee entry and its continuation, and a
return is an ordinary intra edge into ‹FunctionResult p›. Calls carry incompatible
typing from intra flow, so ‹edge_step› has no call case and ‹intra› can never carry a
call --- by typing, not by a side condition.
Translation from VIMP to CFG and the collecting/equation layers ride on this structure.
›
subsection ‹Nodes›