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.

(* For now, we assume vars are defined locations (i.e., we don't yet model data fields or deal with undefined vars; that is future work). In general, our soundness proof doesn't require the user to exhibit an empty environment anyway. *)
(*Parameter empty_env : env.*)
(*Axiom env_gempty : forall x, env_get empty_env x = empty_val.*)
Axiom env_reset : forall s x, env_set x (env_get s x) s = s.
Axiom env_reset2 : forall s x z, env_set x (env_get s x) (env_set x z s) = s.