Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
Pierre Roux
Iris
Commits
333c3dba
Commit
333c3dba
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
heap_lang interpreter: fix build with Coq 8.11, and some style fixes
parent
000ec35e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris_staging/heap_lang/interpreter.v
+17
-14
17 additions, 14 deletions
iris_staging/heap_lang/interpreter.v
with
17 additions
and
14 deletions
iris_staging/heap_lang/interpreter.v
+
17
−
14
View file @
333c3dba
...
@@ -50,6 +50,7 @@ issues before stabilization. *)
...
@@ -50,6 +50,7 @@ issues before stabilization. *)
*)
*)
From
stdpp
Require
Import
gmap
.
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
heap_lang
Require
Import
tactics
pretty
.
From
iris
.
heap_lang
Require
Import
tactics
pretty
.
From
iris
.
prelude
Require
Import
options
.
From
iris
.
prelude
Require
Import
options
.
...
@@ -706,35 +707,36 @@ Section interpret_ok.
...
@@ -706,35 +707,36 @@ Section interpret_ok.
Qed
.
Qed
.
Lemma
state_wf_same_dom
s
f
:
Lemma
state_wf_same_dom
s
f
:
(
dom
(
gmap
.
gset
_
)
(
f
s
.(
lang_state
)).(
heap
)
=
dom
_
s
.(
lang_state
).(
heap
))
→
(
dom
(
gset
loc
)
(
f
s
.(
lang_state
)).(
heap
)
=
dom
_
s
.(
lang_state
).(
heap
))
→
state_wf
s
→
state_wf
s
→
state_wf
(
modify_lang_state
f
s
)
.
state_wf
(
modify_lang_state
f
s
)
.
Proof
.
Proof
.
intros
Hdom_eq
Hwf
.
intros
Hdom_eq
Hwf
.
constructor
;
rewrite
/
modify_lang_state
/=
=>
l
?
.
constructor
;
rewrite
/
modify_lang_state
/=
=>
l
?
.
apply
fin_map_dom
.
not_elem_of_dom
.
apply
(
fin_map_dom
.
not_elem_of_dom
(
D
:=
gset
loc
))
.
rewrite
Hdom_eq
.
rewrite
Hdom_eq
.
apply
fin_map_dom
.
not_elem_of_dom
.
apply
fin_map_dom
.
not_elem_of_dom
.
apply
state_wf_holds
;
auto
.
apply
state_wf_holds
;
auto
.
Qed
.
Qed
.
Lemma
state_wf_upd
s
l
mv0
v'
:
Lemma
state_wf_upd
s
l
mv0
v'
:
state_wf
s
→
state_wf
s
→
heap
(
lang_state
s
)
!!
l
=
Some
mv0
→
heap
(
lang_state
s
)
!!
l
=
Some
mv0
→
state_wf
(
modify_lang_state
(
λ
σ
:
state
,
state_upd_heap
<
[
l
:=
v'
]
>
σ
)
s
)
.
state_wf
(
modify_lang_state
(
λ
σ
:
state
,
state_upd_heap
<
[
l
:=
v'
]
>
σ
)
s
)
.
Proof
.
Proof
.
intros
Hwf
Heq
.
intros
Hwf
Heq
.
apply
state_wf_same_dom
;
auto
.
apply
state_wf_same_dom
;
auto
.
rewrite
fin_map_dom
.
dom_insert_L
.
rewrite
fin_map_dom
.
dom_insert_L
.
apply
fin_map_dom
.
elem_of_dom_2
in
Heq
.
apply
(
fin_map_dom
.
elem_of_dom_2
(
D
:=
gset
loc
))
in
Heq
.
set_solver
.
set_solver
.
Qed
.
Qed
.
Lemma
interpret_wf
fuel
:
∀
(
e
:
expr
)
s
v
s'
,
Lemma
interpret_wf
fuel
(
e
:
expr
)
s
v
s'
:
state_wf
s
→
state_wf
s
→
interpret
fuel
e
s
=
(
inl
v
,
s'
)
→
interpret
fuel
e
s
=
(
inl
v
,
s'
)
→
state_wf
s'
.
state_wf
s'
.
Proof
.
Proof
.
revert
e
s
v
s'
.
induction
fuel
as
[|
fuel
];
simpl
;
intros
e
s
v
s'
**
;
[
errored
|
]
.
induction
fuel
as
[|
fuel
];
simpl
;
intros
e
s
v
s'
**
;
[
errored
|
]
.
destruct
e
;
try
errored
;
success
;
eauto
;
destruct
e
;
try
errored
;
success
;
eauto
;
(
repeat
case_match
;
subst
;
try
errored
;
(
repeat
case_match
;
subst
;
try
errored
;
...
@@ -753,11 +755,12 @@ Section interpret_ok.
...
@@ -753,11 +755,12 @@ Section interpret_ok.
Local
Hint
Resolve
interpret_wf
:
core
.
Local
Hint
Resolve
interpret_wf
:
core
.
Lemma
interpret_sound
fuel
:
∀
e
s
v
s'
,
Lemma
interpret_sound
fuel
e
s
v
s'
:
state_wf
s
→
state_wf
s
→
interpret
fuel
e
s
=
(
inl
v
,
s'
)
→
interpret
fuel
e
s
=
(
inl
v
,
s'
)
→
rtc
erased_step
(
e
::
s
.(
forked_threads
),
s
.(
lang_state
))
(
Val
v
::
s'
.(
forked_threads
),
s'
.(
lang_state
))
.
rtc
erased_step
(
e
::
s
.(
forked_threads
),
s
.(
lang_state
))
(
Val
v
::
s'
.(
forked_threads
),
s'
.(
lang_state
))
.
Proof
.
Proof
.
revert
e
s
v
s'
.
induction
fuel
as
[|
fuel
];
simpl
;
intros
e
s
v
s'
**
;
[
errored
|
]
.
induction
fuel
as
[|
fuel
];
simpl
;
intros
e
s
v
s'
**
;
[
errored
|
]
.
destruct
e
;
try
errored
;
success
;
cbn
[
forked_threads
lang_state
];
destruct
e
;
try
errored
;
success
;
cbn
[
forked_threads
lang_state
];
repeat
match
goal
with
repeat
match
goal
with
...
...
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