Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
116
Issues
116
List
Boards
Labels
Service Desk
Milestones
Merge Requests
22
Merge Requests
22
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
b94d1262
Commit
b94d1262
authored
Feb 23, 2016
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sts, auth: use cancel
parent
ccc7a5df
Pipeline
#86
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
program_logic/auth.v
program_logic/auth.v
+5
-6
program_logic/sts.v
program_logic/sts.v
+5
-4
No files found.
program_logic/auth.v
View file @
b94d1262
From
algebra
Require
Export
auth
.
From
algebra
Require
Export
auth
upred_tactics
.
From
program_logic
Require
Export
invariants
global_functor
.
Import
uPred
.
...
...
@@ -56,8 +56,7 @@ Section auth.
rewrite
sep_exist_l
.
apply
exist_elim
=>
γ
.
rewrite
-(
exist_intro
γ
).
trans
(
▷
auth_inv
γ
φ
★
auth_own
γ
a
)%
I
.
{
rewrite
/
auth_inv
-(
exist_intro
a
)
later_sep
.
rewrite
const_equiv
//
left_id
.
rewrite
[(
_
★
▷
φ
_
)%
I
]
comm
-
assoc
.
apply
sep_mono
;
first
done
.
rewrite
const_equiv
//
left_id
.
cancel
(
▷
φ
a
)%
I
.
rewrite
-
later_intro
/
auth_own
-
own_op
auth_both_op
.
done
.
}
rewrite
(
inv_alloc
N
)
/
auth_ctx
pvs_frame_r
.
apply
pvs_mono
.
by
rewrite
always_and_sep_l
.
...
...
@@ -81,8 +80,7 @@ Section auth.
{
by
move
=>
n
?
?
/
timeless_iff
->.
}
{
by
eauto
with
I
.
}
rewrite
const_equiv
//
left_id
comm
.
apply
sep_mono
;
first
done
.
by
rewrite
sep_elim_l
.
apply
sep_mono_r
.
by
rewrite
sep_elim_l
.
Qed
.
Lemma
auth_closing
`
{!
LocalUpdate
Lv
L
}
E
γ
a
a'
:
...
...
@@ -91,6 +89,7 @@ Section auth.
⊑
(|={
E
}=>
▷
auth_inv
γ
φ
★
auth_own
γ
(
L
a
)).
Proof
.
intros
HL
Hv
.
rewrite
/
auth_inv
/
auth_own
-(
exist_intro
(
L
a
⋅
a'
)).
(* TODO it would be really nice to use cancel here *)
rewrite
later_sep
[(
_
★
▷φ
_
)%
I
]
comm
-
assoc
.
rewrite
-
pvs_frame_l
.
apply
sep_mono
;
first
done
.
rewrite
const_equiv
//
left_id
-
later_intro
-
own_op
.
...
...
@@ -146,7 +145,7 @@ Section auth.
P
⊑
fsa
E
Ψ
.
Proof
.
intros
???
HP
.
eapply
auth_fsa
with
N
γ
a
;
eauto
.
rewrite
HP
;
apply
sep_mono
;
first
done
;
apply
forall_mono
=>
a'
.
rewrite
HP
;
apply
sep_mono
_r
,
forall_mono
=>
a'
.
apply
wand_mono
;
first
done
.
apply
(
fsa_mono
fsa
)=>
b
.
rewrite
-(
exist_intro
L
).
by
repeat
erewrite
<-
exist_intro
by
apply
_
.
Qed
.
...
...
program_logic/sts.v
View file @
b94d1262
From
algebra
Require
Export
sts
.
From
algebra
Require
Export
sts
upred_tactics
.
From
program_logic
Require
Export
invariants
global_functor
.
Import
uPred
.
...
...
@@ -85,7 +85,7 @@ Section sts.
rewrite
sep_exist_l
.
apply
exist_elim
=>
γ
.
rewrite
-(
exist_intro
γ
).
trans
(
▷
sts_inv
γ
φ
★
sts_own
γ
s
(
⊤
∖
sts
.
tok
s
))%
I
.
{
rewrite
/
sts_inv
-(
exist_intro
s
)
later_sep
.
rewrite
[(
_
★
▷
φ
_
)%
I
]
comm
-
assoc
.
apply
sep_mono_r
.
cancel
(
▷
φ
s
)%
I
.
by
rewrite
-
later_intro
-
own_op
sts_op_auth_frag_up
;
last
set_solver
.
}
rewrite
(
inv_alloc
N
)
/
sts_ctx
pvs_frame_r
.
by
rewrite
always_and_sep_l
.
...
...
@@ -112,8 +112,9 @@ Section sts.
sts
.
steps
(
s
,
T
)
(
s'
,
T'
)
→
(
▷
φ
s'
★
own
γ
(
sts_auth
s
T
))
⊑
(|={
E
}=>
▷
sts_inv
γ
φ
★
sts_own
γ
s'
T'
).
Proof
.
intros
Hstep
.
rewrite
/
sts_inv
/
sts_own
-(
exist_intro
s'
).
rewrite
later_sep
[(
_
★
▷φ
_
)%
I
]
comm
-
assoc
.
intros
Hstep
.
rewrite
/
sts_inv
/
sts_own
-(
exist_intro
s'
)
later_sep
.
(* TODO it would be really nice to use cancel here *)
rewrite
[(
_
★
▷φ
_
)%
I
]
comm
-
assoc
.
rewrite
-
pvs_frame_l
.
apply
sep_mono_r
.
rewrite
-
later_intro
.
rewrite
own_valid_l
discrete_validI
.
apply
const_elim_sep_l
=>
Hval
.
trans
(|={
E
}=>
own
γ
(
sts_auth
s'
T'
))%
I
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment