Module Type BACKWARD_DATAFLOW_SOLVER.
Declare Module L: SEMILATTICE.
(** [fixpoint successors transf] is the solver. It returns either an error or a mapping from program points to values of type [L.t] representing the solution.  [successors] is a finite map returning the list of successors of the given program point. [transf] is the transfer function. *)
Parameter fixpoint:
forall {A: Type} (code: PTree.t A) (successors: A -> list positive)
(transf: positive -> L.t -> L.t),
option (PMap.t L.t).
(** The [fixpoint_solution] theorem shows that the returned solution, if any, satisfies the backward dataflow inequations. *)
(** [fixpoint_allnodes] is a variant of [fixpoint], less algorithmically efficient, but correct without any hypothesis on the transfer function. *)
Parameter fixpoint_allnodes:
forall {A: Type} (code: PTree.t A) (successors: A -> list positive)
(transf: positive -> L.t -> L.t),
option (PMap.t L.t).

Axiom fixpoint_allnodes_solution:
forall A (code: PTree.t A) successors transf res n instr s,
fixpoint_allnodes code successors transf = Some res ->
code!n = Some instr -> In s (successors instr) ->
L.ge res!!n (transf s res!!s).