Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tej Chajed
iris
Commits
e1589fea
Commit
e1589fea
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
sts_ownS_op
parent
74dc65a4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
algebra/sts.v
+26
-3
26 additions, 3 deletions
algebra/sts.v
program_logic/sts.v
+8
-0
8 additions, 0 deletions
program_logic/sts.v
with
34 additions
and
3 deletions
algebra/sts.v
+
26
−
3
View file @
e1589fea
...
@@ -26,6 +26,7 @@ Context {sts : stsT}.
...
@@ -26,6 +26,7 @@ Context {sts : stsT}.
(** ** Step relations *)
(** ** Step relations *)
Inductive
step
:
relation
(
state
sts
*
tokens
sts
)
:=
Inductive
step
:
relation
(
state
sts
*
tokens
sts
)
:=
|
Step
s1
s2
T1
T2
:
|
Step
s1
s2
T1
T2
:
(* TODO: This asks for ⊥ on sets: T1 ⊥ T2 := T1 ∩ T2 ⊆ ∅. *)
prim_step
s1
s2
→
tok
s1
∩
T1
≡
∅
→
tok
s2
∩
T2
≡
∅
→
prim_step
s1
s2
→
tok
s1
∩
T1
≡
∅
→
tok
s2
∩
T2
≡
∅
→
tok
s1
∪
T1
≡
tok
s2
∪
T2
→
step
(
s1
,
T1
)
(
s2
,
T2
)
.
tok
s1
∪
T1
≡
tok
s2
∪
T2
→
step
(
s1
,
T1
)
(
s2
,
T2
)
.
Inductive
frame_step
(
T
:
tokens
sts
)
(
s1
s2
:
state
sts
)
:
Prop
:=
Inductive
frame_step
(
T
:
tokens
sts
)
(
s1
s2
:
state
sts
)
:
Prop
:=
...
@@ -51,10 +52,13 @@ Hint Extern 10 (_ ∈ _) => solve_elem_of : sts.
...
@@ -51,10 +52,13 @@ Hint Extern 10 (_ ∈ _) => solve_elem_of : sts.
Hint
Extern
10
(_
⊆
_)
=>
solve_elem_of
:
sts
.
Hint
Extern
10
(_
⊆
_)
=>
solve_elem_of
:
sts
.
(** ** Setoids *)
(** ** Setoids *)
Instance
framestep_proper'
:
Proper
((
≡
)
==>
(
=
)
==>
(
=
)
==>
impl
)
frame_step
.
Instance
framestep_mono
:
Proper
(
flip
(
⊆
)
==>
(
=
)
==>
(
=
)
==>
impl
)
frame_step
.
Proof
.
intros
??
HT
??
<-
??
<-
;
destruct
1
;
econstructor
;
eauto
with
sts
.
Qed
.
Proof
.
intros
??
HT
??
<-
??
<-
;
destruct
1
;
econstructor
;
eauto
with
sts
;
solve_elem_of
.
Qed
.
Global
Instance
framestep_proper
:
Proper
((
≡
)
==>
(
=
)
==>
(
=
)
==>
iff
)
frame_step
.
Global
Instance
framestep_proper
:
Proper
((
≡
)
==>
(
=
)
==>
(
=
)
==>
iff
)
frame_step
.
Proof
.
by
intros
??
[??]
??????;
split
;
apply
framestep_
proper'
.
Qed
.
Proof
.
by
intros
??
[??]
??????;
split
;
apply
framestep_
mono
.
Qed
.
Instance
closed_proper'
:
Proper
((
≡
)
==>
(
≡
)
==>
impl
)
closed
.
Instance
closed_proper'
:
Proper
((
≡
)
==>
(
≡
)
==>
impl
)
closed
.
Proof
.
Proof
.
intros
??
HT
??
HS
;
destruct
1
;
intros
??
HT
??
HS
;
destruct
1
;
...
@@ -328,6 +332,25 @@ Lemma sts_op_auth_frag_up s T :
...
@@ -328,6 +332,25 @@ Lemma sts_op_auth_frag_up s T :
tok
s
∩
T
≡
∅
→
sts_auth
s
∅
⋅
sts_frag_up
s
T
≡
sts_auth
s
T
.
tok
s
∩
T
≡
∅
→
sts_auth
s
∅
⋅
sts_frag_up
s
T
≡
sts_auth
s
T
.
Proof
.
intros
;
apply
sts_op_auth_frag
;
auto
using
elem_of_up
,
closed_up
.
Qed
.
Proof
.
intros
;
apply
sts_op_auth_frag
;
auto
using
elem_of_up
,
closed_up
.
Qed
.
Lemma
sts_op_frag
S1
S2
T1
T2
:
T1
∪
T2
⊆
∅
→
sts
.
closed
S1
T1
→
sts
.
closed
S2
T2
→
sts_frag
(
S1
∩
S2
)
(
T1
∪
T2
)
≡
sts_frag
S1
T1
⋅
sts_frag
S2
T2
.
Proof
.
(* Somehow I feel like a very similar proof muts have happened above, when
proving the DRA axioms. After all, we are just reflecting the operation here. *)
intros
HT
HS1
HS2
;
split
;
[
split
|
constructor
;
solve_elem_of
];
simpl
.
-
intros
;
split_ands
;
try
done
;
[]
.
constructor
;
last
solve_elem_of
.
by
eapply
closed_ne
.
-
intros
(_
&
_
&
H
)
.
inversion_clear
H
.
constructor
;
first
done
.
+
move
=>
s
/
elem_of_intersection
[
/
(
closed_disjoint
_
_
HS1
)
Hs1
/
(
closed_disjoint
_
_
HS2
)
Hs2
]
.
solve_elem_of
+
Hs1
Hs2
.
+
move
=>
s1
s2
/
elem_of_intersection
[
Hs1
Hs2
]
Hstep
.
apply
elem_of_intersection
.
split
;
eapply
closed_step
;
eauto
;
[|];
eapply
framestep_mono
,
Hstep
;
done
||
solve_elem_of
.
Qed
.
(** Frame preserving updates *)
(** Frame preserving updates *)
Lemma
sts_update_auth
s1
s2
T1
T2
:
Lemma
sts_update_auth
s1
s2
T1
T2
:
step
(
s1
,
T1
)
(
s2
,
T2
)
→
sts_auth
s1
T1
~~>
sts_auth
s2
T2
.
step
(
s1
,
T1
)
(
s2
,
T2
)
→
sts_auth
s1
T1
~~>
sts_auth
s2
T2
.
...
...
This diff is collapsed.
Click to expand it.
program_logic/sts.v
+
8
−
0
View file @
e1589fea
...
@@ -63,6 +63,14 @@ Section sts.
...
@@ -63,6 +63,14 @@ Section sts.
sts_own
γ
s
T
⊑
pvs
E
E
(
sts_ownS
γ
S
T
)
.
sts_own
γ
s
T
⊑
pvs
E
E
(
sts_ownS
γ
S
T
)
.
Proof
.
intros
.
by
apply
own_update
,
sts_update_frag_up
.
Qed
.
Proof
.
intros
.
by
apply
own_update
,
sts_update_frag_up
.
Qed
.
Lemma
sts_ownS_op
γ
S1
S2
T1
T2
:
T1
∪
T2
⊆
∅
→
sts
.
closed
S1
T1
→
sts
.
closed
S2
T2
→
sts_ownS
γ
(
S1
∩
S2
)
(
T1
∪
T2
)
≡
(
sts_ownS
γ
S1
T1
★
sts_ownS
γ
S2
T2
)
%
I
.
Proof
.
intros
HT
HS1
HS2
.
rewrite
/
sts_ownS
-
own_op
.
by
apply
own_proper
,
sts_op_frag
.
Qed
.
Lemma
sts_alloc
E
N
s
:
Lemma
sts_alloc
E
N
s
:
nclose
N
⊆
E
→
nclose
N
⊆
E
→
▷
φ
s
⊑
pvs
E
E
(
∃
γ
,
sts_ctx
γ
N
φ
∧
sts_own
γ
s
(
⊤
∖
sts
.
tok
s
))
.
▷
φ
s
⊑
pvs
E
E
(
∃
γ
,
sts_ctx
γ
N
φ
∧
sts_own
γ
s
(
⊤
∖
sts
.
tok
s
))
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment