Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jonas Kastberg
iris
Commits
3eb275ad
Commit
3eb275ad
authored
Aug 07, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add proof mode instances for array splitting
parent
fd74b574
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
tests/heap_lang.v
tests/heap_lang.v
+6
-0
theories/heap_lang/array.v
theories/heap_lang/array.v
+19
-0
No files found.
tests/heap_lang.v
View file @
3eb275ad
...
...
@@ -155,6 +155,12 @@ Section tests.
by
iApply
"HΦ"
.
Qed
.
Lemma
test_array_app
l
vs1
vs2
:
l
↦∗
(
vs1
++
vs2
)
-
∗
l
↦∗
(
vs1
++
vs2
).
Proof
.
iIntros
"[H1 H2]"
.
iSplitL
"H1"
;
done
.
Qed
.
End
tests
.
Section
printing_tests
.
...
...
theories/heap_lang/array.v
View file @
3eb275ad
...
...
@@ -61,6 +61,25 @@ Proof.
rewrite
drop_insert
;
last
by
lia
.
done
.
Qed
.
(** Proofmode instances *)
Global
Instance
into_sep_array_cons
l
vs
v
vs'
:
IsCons
vs
v
vs'
→
IntoSep
(
l
↦∗
vs
)
(
l
↦
v
)
((
l
+
ₗ
1
)
↦∗
vs'
).
Proof
.
rewrite
/
IsCons
=>->.
by
rewrite
/
IntoSep
array_cons
.
Qed
.
Global
Instance
into_sep_array_app
l
vs
vs1
vs2
:
IsApp
vs
vs1
vs2
→
IntoSep
(
l
↦∗
vs
)
(
l
↦∗
vs1
)
((
l
+
ₗ
length
vs1
)
↦∗
vs2
).
Proof
.
rewrite
/
IsApp
=>->.
by
rewrite
/
IntoSep
array_app
.
Qed
.
Global
Instance
from_sep_array_cons
l
vs
v
vs'
:
IsCons
vs
v
vs'
→
FromSep
(
l
↦∗
vs
)
(
l
↦
v
)
((
l
+
ₗ
1
)
↦∗
vs'
).
Proof
.
rewrite
/
IsCons
=>
->.
by
rewrite
/
FromSep
array_cons
.
Qed
.
Global
Instance
from_sep_array_app
l
vs
vs1
vs2
:
IsApp
vs
vs1
vs2
→
FromSep
(
l
↦∗
vs
)
(
l
↦∗
vs1
)
((
l
+
ₗ
length
vs1
)
↦∗
vs2
).
Proof
.
rewrite
/
IsApp
=>
->.
by
rewrite
/
FromSep
array_app
.
Qed
.
(** Allocation *)
Lemma
mapsto_seq_array
l
v
n
:
([
∗
list
]
i
∈
seq
0
n
,
(
l
+
ₗ
(
i
:
nat
))
↦
v
)
-
∗
...
...
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