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
Gaëtan Gilbert
Iris
Commits
a030dceb
Verified
Commit
a030dceb
authored
3 years ago
by
Paolo G. Giarrusso
Browse files
Options
Downloads
Patches
Plain Diff
Use new style for `inG` instances in docs as well
parent
9c0037c6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/proof_guide.md
+2
-1
2 additions, 1 deletion
docs/proof_guide.md
docs/resource_algebras.md
+4
-2
4 additions, 2 deletions
docs/resource_algebras.md
with
6 additions
and
3 deletions
docs/proof_guide.md
+
2
−
1
View file @
a030dceb
...
@@ -99,9 +99,10 @@ for further details on `libG` classes). For example, the STS library is
...
@@ -99,9 +99,10 @@ for further details on `libG` classes). For example, the STS library is
parameterized by an STS and assumes that the STS state space is inhabited:
parameterized by an STS and assumes that the STS state space is inhabited:
```
coq
```
coq
Class
stsG
Σ
(
sts
:
stsT
)
:=
{
Class
stsG
Σ
(
sts
:
stsT
)
:=
{
sts_inG
:
>
inG
Σ
(
stsR
sts
);
sts_inG
:
inG
Σ
(
stsR
sts
);
sts_inhabited
:>
Inhabited
(
sts
.
state
sts
);
sts_inhabited
:>
Inhabited
(
sts
.
state
sts
);
}
.
}
.
Local
Existing
Instance
sts_inG
.
```
```
In this case, the
`Instance`
for this
`libG`
class has more than just a
`subG`
In this case, the
`Instance`
for this
`libG`
class has more than just a
`subG`
assumption:
assumption:
...
...
This diff is collapsed.
Click to expand it.
docs/resource_algebras.md
+
4
−
2
View file @
a030dceb
...
@@ -14,7 +14,8 @@ Libraries typically bundle the `inG` they need in a `libG` typeclass, so they do
...
@@ -14,7 +14,8 @@ Libraries typically bundle the `inG` they need in a `libG` typeclass, so they do
not have to expose to clients what exactly their resource algebras are. For
not have to expose to clients what exactly their resource algebras are. For
example, in the
[
one-shot example
](
../tests/one_shot.v
)
, we have:
example, in the
[
one-shot example
](
../tests/one_shot.v
)
, we have:
```
coq
```
coq
Class
one_shotG
Σ
:=
{
one_shot_inG
:>
inG
Σ
one_shotR
}.
Class
one_shotG
Σ
:=
{
one_shot_inG
:
inG
Σ
one_shotR
}
.
Local
Existing
Instance
one_shot_inG
.
```
```
The
`:>`
means that the projection
`one_shot_inG`
is automatically registered as
The
`:>`
means that the projection
`one_shot_inG`
is automatically registered as
an instance for type-class resolution. If you need several resource algebras,
an instance for type-class resolution. If you need several resource algebras,
...
@@ -273,8 +274,9 @@ Putting it all together, the `libG` typeclass and `libΣ` list of functors for
...
@@ -273,8 +274,9 @@ Putting it all together, the `libG` typeclass and `libΣ` list of functors for
your example would look as follows:
your example would look as follows:
```
coq
```
coq
Class
libG
Σ
:=
{
lib_inG
:
>
inG
Σ
(
gmapR
K
(
agreeR
(
prodO
natO
(
laterO
(
iPropO
Σ
)))))
}
.
Class
libG
Σ
:=
{
lib_inG
:
inG
Σ
(
gmapR
K
(
agreeR
(
prodO
natO
(
laterO
(
iPropO
Σ
)))))
}
.
Definition
libΣ
:
gFunctors
:=
#
[
GFunctor
(
gmapRF
K
(
agreeRF
(
natO
*
▶
∙
)))]
.
Definition
libΣ
:
gFunctors
:=
#
[
GFunctor
(
gmapRF
K
(
agreeRF
(
natO
*
▶
∙
)))]
.
Local
Existing
Instance
lib_inG
.
Instance
subG_libΣ
{
Σ
}
:
subG
libΣ
Σ
→
libG
Σ
.
Instance
subG_libΣ
{
Σ
}
:
subG
libΣ
Σ
→
libG
Σ
.
Proof
.
solve_inG
.
Qed
.
Proof
.
solve_inG
.
Qed
.
```
```
...
...
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