Commit 758ad9f5 authored by Ralf Jung's avatar Ralf Jung

write an interface to world_prop, and make iris_core (assertion logic + world...

write an interface to world_prop, and make iris_core (assertion logic + world satisfaction) work with it
parent 3ecc3dc6
......@@ -14,7 +14,7 @@
#
# This Makefile was generated by the command line :
# coq_makefile lib/ModuRes -R lib/ModuRes ModuRes core_lang.v iris.v lang.v masks.v world_prop.v -o Makefile
# coq_makefile lib/ModuRes -R lib/ModuRes ModuRes core_lang.v iris.v iris_core.v lang.v masks.v world_prop.v world_prop_old.v world_prop_sig.v -o Makefile
#
.DEFAULT_GOAL := all
......@@ -82,9 +82,12 @@ endif
VFILES:=core_lang.v\
iris.v\
# iris_core.v\
lang.v\
masks.v\
world_prop.v
world_prop.v\
world_prop_old.v\
world_prop_sig.v
-include $(addsuffix .d,$(VFILES))
.SECONDARY: $(addsuffix .d,$(VFILES))
......@@ -108,7 +111,7 @@ endif
# #
#######################################
all: ./lib/ModuRes $(VOFILES)
all: $(VOFILES) ./lib/ModuRes
spec: $(VIFILES)
......
......@@ -25,23 +25,8 @@ Module Iris (RL : PCM_T) (C : CORE_LANG).
Instance Props_BI : ComplBI Props | 0 := _.
Instance Props_Later : Later Props | 0 := _.
Set Printing All.
(* Benchmark: How large is thid type? *)
Section Benchmark.
Local Open Scope mask_scope.
Local Open Scope pcm_scope.
Local Open Scope bi_scope.
Local Open Scope lang_scope.
Local Instance _bench_expr_type : Setoid expr := discreteType.
Local Instance _bench_expr_metr : metric expr := discreteMetric.
Local Instance _bench_cmetr : cmetric expr := discreteCMetric.
Set Printing All.
Check (expr -n> (value -n> Props) -n> Props).
Check ((expr -n> (value -n> Props) -n> Props) -n> expr -n> (value -n> Props) -n> Props).
End Benchmark.
(** And now we're ready to build the IRIS-specific connectives! *)
Section Necessitation.
......
This diff is collapsed.
......@@ -3,8 +3,9 @@
Require Import ModuRes.PreoMet ModuRes.MetricRec ModuRes.CBUltInst.
Require Import ModuRes.Finmap ModuRes.Constr.
Require Import ModuRes.PCM ModuRes.UPred ModuRes.BI.
Require Import world_prop_sig.
Module WorldProp (Res : PCM_T).
Module WorldProp (Res : PCM_T) <: WORLD_PROP Res.
(** The construction is parametric in the monoid we choose *)
Import Res.
......@@ -72,6 +73,7 @@ Module WorldProp (Res : PCM_T).
Definition Props := FProp PreProp.
Definition Wld := (nat -f> PreProp).
(* Establish the isomorphism (FIXME: do it only once...) *)
Definition ı : PreProp -t> halve (cmfromType Props) := Unfold.
Definition ı' : halve (cmfromType Props) -t> PreProp := Fold.
......@@ -80,14 +82,10 @@ Module WorldProp (Res : PCM_T).
Lemma isoR T : ı (ı' T) == T.
Proof. apply (UF_id T). Qed.
Set Printing All.
(* PreProp has an equivalence and a complete metric. It also has a preorder that fits to everything else. *)
Instance PProp_ty : Setoid PreProp := _.
Instance PProp_m : metric PreProp := _.
Instance PProp_cm : cmetric PreProp := _.
Instance PProp_preo : preoType PreProp := disc_preo PreProp.
Instance PProp_pcm : pcmType PreProp := disc_pcm PreProp.
Instance PProp_ext : extensible PreProp := disc_ext PreProp.
(* Define an order on PreProp. *)
Instance PProp_preo: preoType PreProp := disc_preo PreProp.
Instance PProp_pcm : pcmType PreProp := disc_pcm PreProp.
Instance PProp_ext : extensible PreProp := disc_ext PreProp.
(* Give names to the things for Props, so the terms can get shorter. *)
Instance Props_ty : Setoid Props := _.
......
(* For some reason, the order matters. We cannot import Constr last. *)
Require Import ModuRes.Finmap ModuRes.Constr ModuRes.PCM ModuRes.UPred ModuRes.BI ModuRes.PreoMet.
Require Import ModuRes.Finmap ModuRes.Constr ModuRes.MetricRec.
Require Import ModuRes.PCM ModuRes.UPred ModuRes.BI ModuRes.PreoMet.
Module Type WorldPropSig (Res : PCM_T).
(** The construction is parametric in the monoid we choose *)
Module Type WORLD_PROP (Res : PCM_T).
Import Res.
(* The functor is fixed *)
Section Definitions.
(** We'll be working with complete metric spaces, so whenever
something needs an additional preorder, we'll just take a
discrete one. *)
Local Instance pt_disc P `{cmetric P} : preoType P | 2000 := disc_preo P.
Local Instance pcm_disc P `{cmetric P} : pcmType P | 2000 := disc_pcm P.
Definition FProp P `{cmP : cmetric P} :=
(nat -f> P) -m> UPred res.
End Definitions.
(* PreProp: The solution to the recursive equation. Equipped with a discrete order *)
Parameter PreProp : cmtyp.
Instance PProp_preo: preoType PreProp := disc_preo PreProp.
Instance PProp_pcm : pcmType PreProp := disc_pcm PreProp.
Instance PProp_ext : extensible PreProp := disc_ext PreProp.
Parameter PreProp : Type.
Parameter PrePropS : Setoid PreProp.
Parameter PrePropM : metric PreProp.
Parameter PrePropCM: cmetric PreProp.
Definition Props := FProp PreProp.
Parameter PropS : Setoid Props.
Parameter PropM : metric Props.
Parameter PropCM : cmetric Props.
Definition Wld := (nat -f> PreProp).
Parameter ı : PreProp -> halve (cmfromType Props).
Parameter ı' : halve (cmfromType Props) -> PreProp.
(* Defines Worlds, Propositions *)
Definition Wld := nat -f> PreProp.
Definition Props := Wld -m> UPred res.
(* Establish the recursion isomorphism *)
Parameter ı : PreProp -t> halve (cmfromType Props).
Parameter ı' : halve (cmfromType Props) -t> PreProp.
Axiom iso : forall P, ı' (ı P) == P.
Axiom isoR : forall T, ı (ı' T) == T.
(*Parameter PProp_preo : preoType PreProp.
Parameter PProp_pcm : pcmType PreProp.
Parameter PProp_ext : extensible PreProp.*)
End WorldPropSig.
(* Define all the things on Props, so they have names - this shortens the terms later *)
Instance Props_ty : Setoid Props := _.
Instance Props_m : metric Props := _.
Instance Props_cm : cmetric Props := _.
Instance Props_preo : preoType Props := _.
Instance Props_pcm : pcmType Props := _.
End WORLD_PROP.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment