Module Type VERISTAR_LOGIC.
(** Locations and values *)
Parameters loc val : Type.
Declare Instance Join_val: Join val.
Declare Instance Perm_val: Perm_alg val.
Declare Instance Sep_val: Sep_alg val.
Declare Instance Canc_val: Canc_alg val.
Parameter val2loc : val -> option loc.
Parameter nil_val : val.
(** The empty value: read "undefined" *)
Parameter empty_val : val.
Definition full (v : val) := forall v2, joins v v2 -> identity v2.
(** Variables, environments *)
Definition var : Type := Ident.t.
Parameter env : Type.
Parameter env_get : env -> var -> val.
Parameter env_set : var -> val -> env -> env.
(** Heaps *)
Parameter heap : Type.
Declare Instance Join_heap: Join heap.
Declare Instance Perm_heap: Perm_alg heap.
Declare Instance Sep_heap: Sep_alg heap.
Declare Instance Canc_heap: Canc_alg heap.
Parameter rawnext: forall (x: loc) (y : val) (s : heap), Prop.
Parameter emp_at : forall (l: loc) (h: heap), Prop.
Definition nil_or_loc (v: val) := v=nil_val \/ exists l, val2loc v = Some l.
Definition rawnext' x y h := exists h0, join_sub h0 h /\ rawnext x y h0.

Axiom emp_at_join: forall {h1 h2 h},
join h1 h2 h -> forall l, (emp_at l h1 /\ emp_at l h2) <-> emp_at l h.