(** The main VeriStar procedures. Entailments are of the form [Pi /\ Sigma ==> Pi' /\ Sigma'].  Here, -[Pi] and [Pi'] are sets of equalities between program variables. -[Sigma] and [Sigma'] are spatial atoms in a limited subset of separation logic. *)
Load loadpath.
veristar.heapresolve.
(* To build the model-based saturation system, replace the following line with  Require Import veristar.superpose_modelsat. *)
(*Require Import veristar.superpose. *)
Require Recdef.
(** The VeriStar interface *)
Inductive veristar_result :=
| Valid : veristar_result
| C_example : model -> veristar_result
| Aborted : list clause -> clause -> veristar_result.
Module Type VERISTAR.
Parameter check_entailment : entailment -> veristar_result.
End VERISTAR.
(** The VeriStar implementation *)
Module VeriStar.
Inductive veristar_result :=
| Valid : veristar_result
| C_example : model -> veristar_result
| Aborted : list clause -> clause -> veristar_result.
Definition pureb c := match c with PureClause _ _ _ _ => true | _ => false end.
Definition pure_clauses := filter pureb.
Definition is_empty_clause (c : clause) :=
match c with PureClause nil nil _ _ => true | _ => false end.
Definition pures := M.filter pureb.

(* Specifications: *)
Lemma Ppred_decrease n :
(n<>1)%positive -> (nat_of_P (Ppred n)<nat_of_P n)%nat.