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
05f77071
Commit
05f77071
authored
3 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add some guidance on how to handle mask mismatches
parent
7a260d80
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
docs/proof_guide.md
+31
-0
31 additions, 0 deletions
docs/proof_guide.md
with
31 additions
and
0 deletions
docs/proof_guide.md
+
31
−
0
View file @
05f77071
...
...
@@ -23,6 +23,37 @@ recommend importing in the following order:
-
iris.program_logic
-
iris.heap_lang
## Resolving mask mismatches
Sometimes,
`fupd`
masks are not exactly what they need to be to make progress.
There are two situations to distinguish here.
#### Eliminating a [fupd] with a mask smaller than the current one
When our goal us
`|={E,_}=> _`
and you want to do [iMod] on an
`|={E',_}=> _`
, Coq will complain even if
`E' ⊆ E`
.
To resolve this, you first need to explicitly weaken your mask from
`E`
to
`E'`
by doing:
```
iMod (fupd_mask_subseteq E') as "Hclose".
{ (* Resolve subset sidecondition. *) }
```
Later, you can
`iMod "Hclose" as "_"`
to restore the mask back from
`E'`
to
`E`
.
Notice that this will make the invariants in
`E' ∖ E`
unavailable until you use
`Hclose`
.
Usually this is not a problem, but there are theoretical situations where using
`fupd_mask_subseteq`
like this can prevent you from proving a goal.
In that case, you will have to experiment with rules like
`fupd_mask_frame`
, but those are not very convenient to use.
#### Introducing a [fupd] when the masks are not yet the same
When your goal is
`|={E,E'}=> _`
and you want to do
`iModIntro`
, Coq will complain even if
`E' ⊆ E`
.
This arises, for example, in clients of TaDA-style logically atomic specifications.
To resolve this, do:
```
iApply fupd_mask_intro.
{ (* Resolve subset sidecondition. *) }
iIntros "Hclose".
```
Later, you can
`iMod "Hclose" as "_"`
to restore the mask back from
`E'`
to
`E`
.
## Canonical structures and type classes
In Iris, we use both canonical structures and type classes, and some careful
...
...
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