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
4b77644c
Commit
4b77644c
authored
5 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add related work to linear paradox variant 2
parent
0bc19271
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/bi/lib/counterexamples.v
+19
-8
19 additions, 8 deletions
theories/bi/lib/counterexamples.v
with
19 additions
and
8 deletions
theories/bi/lib/counterexamples.v
+
19
−
8
View file @
4b77644c
...
@@ -218,8 +218,8 @@ End inv. End inv.
...
@@ -218,8 +218,8 @@ End inv. End inv.
(** This proves that if we have linear impredicative invariants, we can still
(** This proves that if we have linear impredicative invariants, we can still
drop arbitrary resources (i.e., we can "defeat" linearity).
drop arbitrary resources (i.e., we can "defeat" linearity).
Variant 1: a strong invariant creation lemma that lets us create
invariants
Variant 1:
we assume
a strong invariant creation lemma that lets us create
in the "open" state. *)
invariants
in the "open" state. *)
Module
linear1
.
Section
linear1
.
Module
linear1
.
Section
linear1
.
Context
{
PROP
:
sbi
}
.
Context
{
PROP
:
sbi
}
.
Implicit
Types
P
:
PROP
.
Implicit
Types
P
:
PROP
.
...
@@ -271,9 +271,23 @@ End linear1. End linear1.
...
@@ -271,9 +271,23 @@ End linear1. End linear1.
(** This proves that if we have linear impredicative invariants, we can still
(** This proves that if we have linear impredicative invariants, we can still
drop arbitrary resources (i.e., we can "defeat" linearity).
drop arbitrary resources (i.e., we can "defeat" linearity).
Variant 2: the invariant can depend on the chosen [γ], and we also have
Variant 2: maybe the strong invariant creation lemma (variant 1 above) is a bit
an accessor that gives back the invariant token immediately,
too obvious, so here we just assume that the invariant can depend on the chosen
not just after the invariant got closed again. *)
[γ]. Moreover, we also have an accessor that gives back the invariant token
immediately, not just after the invariant got closed again.
The assumptions here match the proof rules in Iron, save for the side-condition
that the invariant must be "uniform". In particular, [cinv_alloc] delays
handing out the [cinv_own] token until after the invariant has been created so
that this can match Iron by picking [cinv_own γ := fcinv_own γ 1 ∗
fcinv_cancel_own γ 1]. This means [cinv_own] is not "uniform" in Iron terms,
which is why Iron does not suffer from this contradiction.
This also loosely matches VST's locks with stored resource invariants.
There, the stronger variant of the "unlock" rule (see Aquinas Hobor's PhD thesis
"Oracle Semantics", §4.7, p. 88) also permits putting the token of a lock
entirely into that lock.
*)
Module
linear2
.
Section
linear2
.
Module
linear2
.
Section
linear2
.
Context
{
PROP
:
sbi
}
.
Context
{
PROP
:
sbi
}
.
Implicit
Types
P
:
PROP
.
Implicit
Types
P
:
PROP
.
...
@@ -292,9 +306,6 @@ Module linear2. Section linear2.
...
@@ -292,9 +306,6 @@ Module linear2. Section linear2.
[cinv_own] but we do not need that. They would also have a name matching
[cinv_own] but we do not need that. They would also have a name matching
the [mask] type, but we do not need that either.) *)
the [mask] type, but we do not need that either.) *)
Context
(
gname
:
Type
)
(
cinv
:
gname
→
PROP
→
PROP
)
(
cinv_own
:
gname
→
PROP
)
.
Context
(
gname
:
Type
)
(
cinv
:
gname
→
PROP
→
PROP
)
(
cinv_own
:
gname
→
PROP
)
.
(** [cinv_alloc] delays handing out the [cinv_own] token until after the
invariant has been created so that this can match Iron by picking
[cinv_own γ := fcinv_own γ 1 ∗ fcinv_cancel_own γ 1]. *)
Hypothesis
cinv_alloc
:
∀
E
,
Hypothesis
cinv_alloc
:
∀
E
,
fupd
E
E
(
∃
γ
,
∀
P
,
▷
P
-∗
fupd
E
E
(
cinv
γ
P
∗
cinv_own
γ
))
%
I
.
fupd
E
E
(
∃
γ
,
∀
P
,
▷
P
-∗
fupd
E
E
(
cinv
γ
P
∗
cinv_own
γ
))
%
I
.
Hypothesis
cinv_access
:
∀
P
γ
,
Hypothesis
cinv_access
:
∀
P
γ
,
...
...
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