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
Iris
Iris
Commits
9e8004f8
Commit
9e8004f8
authored
Aug 13, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prepare for having fractional arrays in the future
parent
3eb275ad
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
19 deletions
+18
-19
tests/heap_lang.ref
tests/heap_lang.ref
+10
-0
tests/heap_lang.v
tests/heap_lang.v
+4
-1
theories/heap_lang/array.v
theories/heap_lang/array.v
+4
-18
No files found.
tests/heap_lang.ref
View file @
9e8004f8
...
@@ -86,6 +86,16 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
...
@@ -86,6 +86,16 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
--------------------------------------∗
--------------------------------------∗
WP "x" {{ _, True }}
WP "x" {{ _, True }}
The command has indeed failed with message:
In nested Ltac calls to "iIntros (constr)", "iIntros_go",
"iDestructHyp (constr) as (constr)",
"<iris.proofmode.ltac_tactics.iDestructHypFindPat>",
"<iris.proofmode.ltac_tactics.iDestructHypGo>" and
"iAndDestruct (constr) as (constr) (constr)", last call failed.
Tactic failure: iAndDestruct: cannot destruct (l ↦∗ (vs1 ++ vs2))%I.
The command has indeed failed with message:
Ltac call to "iSplitL (constr)" failed.
Tactic failure: iSplitL: (l ↦∗ (vs1 ++ vs2))%I not a separating conjunction.
1 subgoal
1 subgoal
Σ : gFunctors
Σ : gFunctors
...
...
tests/heap_lang.v
View file @
9e8004f8
...
@@ -158,7 +158,10 @@ Section tests.
...
@@ -158,7 +158,10 @@ Section tests.
Lemma
test_array_app
l
vs1
vs2
:
Lemma
test_array_app
l
vs1
vs2
:
l
↦∗
(
vs1
++
vs2
)
-
∗
l
↦∗
(
vs1
++
vs2
).
l
↦∗
(
vs1
++
vs2
)
-
∗
l
↦∗
(
vs1
++
vs2
).
Proof
.
Proof
.
iIntros
"[H1 H2]"
.
iSplitL
"H1"
;
done
.
Fail
iIntros
"[H1 H2]"
.
(* this should, one day, split at the fraction. *)
iIntros
"H"
.
iDestruct
(
array_app
with
"H"
)
as
"[H1 H2]"
.
Fail
iSplitL
"H1"
.
iApply
array_app
.
iSplitL
"H1"
;
done
.
Qed
.
Qed
.
End
tests
.
End
tests
.
...
...
theories/heap_lang/array.v
View file @
9e8004f8
...
@@ -61,24 +61,8 @@ Proof.
...
@@ -61,24 +61,8 @@ Proof.
rewrite
drop_insert
;
last
by
lia
.
done
.
rewrite
drop_insert
;
last
by
lia
.
done
.
Qed
.
Qed
.
(** Proofmode instances *)
(** No [FromSep] or [IntoSep] instances to remain forwards compatible with a
Global
Instance
into_sep_array_cons
l
vs
v
vs'
:
fractional array assertion, that will split the fraction, not the list. *)
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 *)
(** Allocation *)
Lemma
mapsto_seq_array
l
v
n
:
Lemma
mapsto_seq_array
l
v
n
:
...
@@ -240,3 +224,5 @@ Proof.
...
@@ -240,3 +224,5 @@ Proof.
Qed
.
Qed
.
End
lifting
.
End
lifting
.
Typeclasses
Opaque
array
.
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