Skip to content

Commit 25a8a46

Browse files
committed
Update doc pages
1 parent 6b056d7 commit 25a8a46

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

docs/_docs/reference/experimental/capture-checking/classifiers.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,28 @@ sealed trait Capability
4545
trait SharedCapability extends Capability Classifier
4646
trait Control extends SharedCapability, Classifier
4747

48-
trait ExclusiveCapability extends Capability, Classifier
49-
trait Mutable extends ExclusiveCapability, Classifier
48+
trait ExclusiveCapability extends Capability
49+
trait Read extends ExclusiveCapability, Classifier
5050
```
51-
Here is a graph showing the hierarchy of predefined classifier traits:
51+
Here is a graph showing the hierarchy of predefined capability traits. Classifier traits are underlined.
5252
```
5353
Capability
5454
/ \
5555
/ \
5656
/ \
5757
/ \
5858
SharedCapability ExclusiveCapability
59+
----------------
5960
| |
6061
| |
6162
| |
6263
| |
63-
Control Mutable
64+
Control Read
65+
------- ----
6466
```
65-
At the top of the hierarchy, we distinguish between _shared_ and _exclusive_ capabilities in two classifier traits `SharedCapability` and `ExclusiveCapability`. All capability classes we have seen so far are shared.
66-
`ExclusiveCapability` is a base trait for capabilities that allow only un-aliased access to the data they represent, with the rules governed by [separation checking](separation-checking.md). Separation checking is currently an optional extension of capture checking, enabled by a different language import. Since `Capability` is a sealed trait, all capability classes are either shared or exclusive.
67+
At the top of the hierarchy, we distinguish between _shared_ and _exclusive_ capabilities in two traits `SharedCapability` and `ExclusiveCapability`. All capability classes we have seen so far are shared.
68+
`ExclusiveCapability` is a base trait for capabilities that
69+
are checked for anti-aliasing restrictions with the rules governed by [separation checking](separation-checking.md). Separation checking is currently an optional extension of capture checking, enabled by a different language import. Since `Capability` is a sealed trait, all capability classes are either shared or exclusive.
6770

6871
`Control` capabilities are shared. This means they cannot directly or indirectly capture exclusive capabilities such as capabilities that control access to mutable state. Typical `Control` capabilities are:
6972

docs/_docs/reference/experimental/capture-checking/mutability.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ A capability is called
3131

3232
We introduce a new trait
3333
```scala
34-
trait Mutable extends ExclusiveCapability, Classifier
34+
trait Mutable
3535
```
36-
It is used as a [classifier](classifiers.md) trait for types that define mutable variables and/or _update methods_.
36+
It is used as a marker trait for types that define mutable variables and/or _update methods_.
3737

3838
## Update Methods
3939

@@ -134,10 +134,9 @@ a method that accesses exclusive capabilities.
134134

135135
If `x` is an exclusive capability of a type extending `Mutable`, `x.rd` is its associated _read-only_ capability. It counts as a shared capability. A read-only capability does not permit access to the mutable fields of a matrix.
136136

137-
A read-only capability can be seen as a classified capability
138-
using a classifier trait `Read` that extends `Mutable`. I.e.
139-
`x.rd` can be seen as being essentially the same as `x.only[Read]`.
140-
(Currently, this precise equivalence is still waiting to be implemented.)
137+
A read-only capability can be seen as a [classified](classifiers.md) capability
138+
using a classifier trait `Read`. I.e.
139+
`x.rd` is a shorthand for `x.only[Read]`.
141140

142141
**Implicitly added capture sets**
143142

0 commit comments

Comments
 (0)