(** The interface of the solver is similar to that of Kildall's forward solver, with a slightly different statement of the invariant preservation property [fixpoint_invariant]. *)
Module Type BBLOCK_SOLVER.
Declare Module L: ORDERED_TYPE_WITH_TOP.
Parameter fixpoint:
forall {A: Type} (code: PTree.t A) (successors: A -> list positive)
(transf: positive -> L.t -> L.t)
(entrypoint: positive),
option (PMap.t L.t).

(* Specifications: *)
Axiom fixpoint_solution:
forall A (code: PTree.t A) successors transf entrypoint res n instr s,
fixpoint code successors transf entrypoint = Some res ->
code!n = Some instr -> In s (successors instr) ->
L.ge res!!s (transf n res!!n).
Axiom fixpoint_entry:
forall A (code: PTree.t A) successors transf entrypoint res,
fixpoint code successors transf entrypoint = Some res ->
res!!entrypoint = L.top.
Axiom fixpoint_invariant:
forall A (code: PTree.t A) successors transf entrypoint
(P: L.t -> Prop),
P L.top ->
(forall pc instr x, code!pc = Some instr -> P x -> P (transf pc x)) ->
forall res pc,
fixpoint code successors transf entrypoint = Some res ->
P res!!pc.