End Predecessor.
(** ** Solving backward dataflow problems *)
(** The interface to a backward dataflow solver is as follows. *)
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. *)

(* Specifications: *)
Axiom fixpoint_solution:
forall A (code: PTree.t A) successors transf res n instr s,
fixpoint code successors transf = Some res ->
code!n = Some instr -> In s (successors instr) ->
(forall n a, code!n = None -> L.eq (transf n a) L.bot) ->
L.ge res!!n (transf s res!!s).