End DATAFLOW_SOLVER.
(** Kildall's algorithm manipulates worklists, which are sets of CFG nodes equipped with a ``pick next node to examine'' operation. The algorithm converges faster if the nodes are chosen in an order consistent with a reverse postorder traversal of the CFG. For now, we parameterize the dataflow solver over a module that implements sets of CFG nodes. *)
Module Type NODE_SET.
Parameter t: Type.
Parameter empty: t.
Parameter add: positive -> t -> t.
Parameter pick: t -> option (positive * t).
Parameter all_nodes: forall {A: Type}, PTree.t A -> t.
Parameter In: positive -> t -> Prop.

Axiom pick_some:
forall s n s', pick s = Some(n, s') ->
forall n', In n' s <-> n = n' \/ In n' s'.