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
7e4c7a3e
Commit
7e4c7a3e
authored
2 years ago
by
Lennard Gäher
Committed by
Ralf Jung
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: make tactic work for steps_lb in intuit context
parent
c4e7da60
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
iris_heap_lang/proofmode.v
+13
-9
13 additions, 9 deletions
iris_heap_lang/proofmode.v
tests/heap_lang.ref
+14
-1
14 additions, 1 deletion
tests/heap_lang.ref
tests/heap_lang.v
+10
-2
10 additions, 2 deletions
tests/heap_lang.v
with
37 additions
and
12 deletions
iris_heap_lang/proofmode.v
+
13
−
9
View file @
7e4c7a3e
...
@@ -81,12 +81,12 @@ Local Lemma wp_pure_step_credits_lb' `{!heapGS_gen hlc Σ} ϕ e1 e2 s E n Φ :
...
@@ -81,12 +81,12 @@ Local Lemma wp_pure_step_credits_lb' `{!heapGS_gen hlc Σ} ϕ e1 e2 s E n Φ :
Proof
.
Proof
.
iIntros
(??)
"[>Ha Hb]"
.
by
iApply
(
wp_pure_step_credits_lb
with
"Ha Hb"
)
.
iIntros
(??)
"[>Ha Hb]"
.
by
iApply
(
wp_pure_step_credits_lb
with
"Ha Hb"
)
.
Qed
.
Qed
.
Lemma
tac_wp_pure_credits_lb
`{
!
heapGS_gen
hlc
Σ
}
Δ
Δ'
s
E
i
j
K
e1
e2
ϕ
n
Φ
:
Lemma
tac_wp_pure_credits_lb
`{
!
heapGS_gen
hlc
Σ
}
Δ
Δ'
s
E
i
j
K
e1
e2
ϕ
n
b
Φ
:
PureExec
ϕ
1 e1
e2
→
PureExec
ϕ
1 e1
e2
→
ϕ
→
ϕ
→
MaybeIntoLaterNEnvs
1
Δ
Δ'
→
MaybeIntoLaterNEnvs
1
Δ
Δ'
→
envs_lookup
i
Δ'
=
Some
(
false
,
steps_lb
n
)
%
I
→
envs_lookup
i
Δ'
=
Some
(
b
,
steps_lb
n
)
%
I
→
(
match
envs_simple_replace
i
false
(
Esnoc
Enil
i
(
steps_lb
(
S
n
)))
Δ'
with
(
match
envs_simple_replace
i
b
(
Esnoc
Enil
i
(
steps_lb
(
S
n
)))
Δ'
with
|
Some
Δ''
=>
|
Some
Δ''
=>
match
envs_app
false
(
Esnoc
Enil
j
(
£
(
S
n
)))
Δ''
with
match
envs_app
false
(
Esnoc
Enil
j
(
£
(
S
n
)))
Δ''
with
|
Some
Δ'''
=>
envs_entails
Δ'''
(
WP
fill
K
e2
@
s
;
E
{{
Φ
}})
|
Some
Δ'''
=>
envs_entails
Δ'''
(
WP
fill
K
e2
@
s
;
E
{{
Φ
}})
...
@@ -103,12 +103,16 @@ Proof.
...
@@ -103,12 +103,16 @@ Proof.
destruct
(
envs_simple_replace
_
_
_)
as
[
Δ'''
|]
eqn
:
HΔ'''
;
[
|
contradiction
]
.
destruct
(
envs_simple_replace
_
_
_)
as
[
Δ'''
|]
eqn
:
HΔ'''
;
[
|
contradiction
]
.
destruct
(
envs_app
_
_
_)
as
[
Δ''
|]
eqn
:
HΔ'
;
[
|
contradiction
]
.
destruct
(
envs_app
_
_
_)
as
[
Δ''
|]
eqn
:
HΔ'
;
[
|
contradiction
]
.
rewrite
envs_simple_replace_sound
;
[
|
done
..]
.
simpl
.
rewrite
envs_simple_replace_sound
;
[
|
done
..]
.
simpl
.
rewrite
right_id
!
later_sep
.
rewrite
intuitionistically_if_elim
.
apply
sep_mono
;
first
done
.
destruct
b
.
apply
later_mono
.
apply
wand_intro_r
.
apply
wand_intro_r
.
all
:
rewrite
right_id
!
later_sep
.
rewrite
-
sep_assoc
sep_comm
-
sep_assoc
.
all
:
apply
sep_mono
;
first
done
.
rewrite
wand_elim_r
.
all
:
apply
later_mono
,
wand_intro_r
,
wand_intro_r
.
rewrite
envs_app_sound
//
/=
right_id
wand_elim_r
//.
all
:
rewrite
-
sep_assoc
sep_comm
-
sep_assoc
.
1
:
fold
(
bi_intuitionistically
(
steps_lb
(
S
n
)))
.
1
:
rewrite
-
(
intuitionistically_intro
(
steps_lb
(
S
n
))
(
steps_lb
(
S
n
)));
last
done
.
all
:
rewrite
wand_elim_r
.
all
:
rewrite
envs_app_sound
//
/=
right_id
wand_elim_r
//.
Qed
.
Qed
.
Lemma
tac_wp_value_nofupd
`{
!
heapGS_gen
hlc
Σ
}
Δ
s
E
Φ
v
:
Lemma
tac_wp_value_nofupd
`{
!
heapGS_gen
hlc
Σ
}
Δ
s
E
Φ
v
:
...
...
This diff is collapsed.
Click to expand it.
tests/heap_lang.ref
+
14
−
1
View file @
7e4c7a3e
...
@@ -193,7 +193,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
...
@@ -193,7 +193,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
: string
: string
The command has indeed failed with message:
The command has indeed failed with message:
Tactic failure: wp_pure: "Hcred" is not fresh.
Tactic failure: wp_pure: "Hcred" is not fresh.
"test_wp_pure_credits_lb_succeed"
"test_wp_pure_credits_lb_succeed
_spatial
"
: string
: string
1 goal
1 goal
...
@@ -205,6 +205,19 @@ Tactic failure: wp_pure: "Hcred" is not fresh.
...
@@ -205,6 +205,19 @@ Tactic failure: wp_pure: "Hcred" is not fresh.
"Hcred" : £ (S n)
"Hcred" : £ (S n)
--------------------------------------∗
--------------------------------------∗
|={⊤}=> True
|={⊤}=> True
"test_wp_pure_credits_lb_succeed_intuit"
: string
1 goal
Σ : gFunctors
heapGS0 : heapGS Σ
n : nat
============================
"Hlb" : steps_lb (S n)
--------------------------------------□
"Hcred" : £ (S n)
--------------------------------------∗
|={⊤}=> True
"test_wp_pure_credits_lb_fail1"
"test_wp_pure_credits_lb_fail1"
: string
: string
The command has indeed failed with message:
The command has indeed failed with message:
...
...
This diff is collapsed.
Click to expand it.
tests/heap_lang.v
+
10
−
2
View file @
7e4c7a3e
...
@@ -352,14 +352,22 @@ Section tests.
...
@@ -352,14 +352,22 @@ Section tests.
Fail
wp_pure
as
"Hcred"
.
Fail
wp_pure
as
"Hcred"
.
Abort
.
Abort
.
Check
"test_wp_pure_credits_lb_succeed"
.
Check
"test_wp_pure_credits_lb_succeed
_spatial
"
.
Lemma
test_wp_pure_credits_lb_succeed
n
:
Lemma
test_wp_pure_credits_lb_succeed
_spatial
n
:
⊢
steps_lb
n
-∗
WP
#
42
+
#
420
{{
v
,
True
}}
.
⊢
steps_lb
n
-∗
WP
#
42
+
#
420
{{
v
,
True
}}
.
Proof
.
Proof
.
iIntros
"Hlb"
.
iIntros
"Hlb"
.
wp_pure
with
"Hlb"
as
"Hcred"
.
Show
.
done
.
wp_pure
with
"Hlb"
as
"Hcred"
.
Show
.
done
.
Qed
.
Qed
.
Check
"test_wp_pure_credits_lb_succeed_intuit"
.
Lemma
test_wp_pure_credits_lb_succeed_intuit
n
:
⊢
steps_lb
n
-∗
WP
#
42
+
#
420
{{
v
,
True
}}
.
Proof
.
iIntros
"#Hlb"
.
wp_pure
with
"Hlb"
as
"Hcred"
.
Show
.
done
.
Qed
.
Check
"test_wp_pure_credits_lb_fail1"
.
Check
"test_wp_pure_credits_lb_fail1"
.
Lemma
test_wp_pure_credits_lb_fail1
n
:
Lemma
test_wp_pure_credits_lb_fail1
n
:
⊢
steps_lb
n
-∗
WP
#
42
+
#
420
{{
v
,
True
}}
.
⊢
steps_lb
n
-∗
WP
#
42
+
#
420
{{
v
,
True
}}
.
...
...
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