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.

Axiom mk_heap_rawnext : forall h x0 x y, val2loc (x0) = Some x ->
nil_or_loc y -> exists h', rawnext x y h' /\ comparable h h'.