Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simuliris
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Iris
simuliris
Commits
0510d217
Commit
0510d217
authored
5 months ago
by
Neven Villani
Browse files
Options
Downloads
Patches
Plain Diff
Draft: trying refinement
parent
24d5fca0
No related branches found
No related tags found
1 merge request
!18
Tree Borrows update
Pipeline
#110747
failed
5 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/tree_borrows/disjoint.v
+28
-0
28 additions, 0 deletions
theories/tree_borrows/disjoint.v
with
28 additions
and
0 deletions
theories/tree_borrows/disjoint.v
+
28
−
0
View file @
0510d217
...
...
@@ -566,6 +566,34 @@ Proof.
+
apply
HEAD1'
.
Qed
.
From
simuliris
.
tree_borrows
Require
Import
lang
examples
.
lib
.
Definition
single_thread_step
(
P
:
prog
)
(
st
st'
:
expr
*
state
)
:=
prim_step
P
st
.
1
st
.
2
st'
.
1
st'
.
2
[]
.
Definition
refines
P
(
e1
e2
:
expr
)
:=
∀
σ
e'
σ'
,
rtc
(
single_thread_step
P
)
(
e1
,
σ
)
(
e'
,
σ'
)
→
(
(* if the target can reach a stuck state, then so can the source *)
irreducible
P
e'
σ'
→
∃
e''
σ''
,
irreducible
P
e''
σ''
∧
rtc
(
single_thread_step
P
)
(
e2
,
σ
)
(
e'
,
σ'
)
)
∧
(
(* if the target can reach a value, then the source can reach the same value in the same state *)
is_Some
(
to_val
e'
)
→
rtc
(
single_thread_step
P
)
(
e2
,
σ
)
(
e'
,
σ'
))
.
Definition
two_reads
v1
x1
v2
x2
rest
:
expr
:=
let
:
v1
:=
Copy
*
{
sizeof_scalar
}
x1
in
let
:
v2
:=
Copy
*
{
sizeof_scalar
}
x2
in
rest
.
Theorem
basic_refinement
{
P
rest
}
:
refines
P
(
two_reads
"v1"
"x1"
"v2"
"x2"
rest
)
(
two_reads
"v2"
"x2"
"v1"
"x1"
rest
)
.
Proof
.
intros
?
?
?
Reach
.
split
.
+
admit
.
+
unfold
two_reads
in
*.
inversion
Reach
;
intros
;
subst
.
{
inversion
H0
.
inversion
H
.
}
destruct
y
;
simpl
in
*
;
subst
.
inversion
H
;
simpl
in
*
;
subst
.
destruct
K
;
simpl
in
*.
*
inversion
H4
.
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