Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Update documentation about arrow types #4521

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/DafnyRef/Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1690,17 +1690,17 @@ Intuitively, the built-in partial arrow type is defined as follows (here shown
for arrows with arity 1):
<!-- %no-check -->
```dafny
type A --> B = f: A ~> B | forall a :: f.reads(a) == {}
type A --> B = f: A ~> B | forall a :: f.requires(a) ==> f.reads(a) == {}
```
(except that what is shown here left of the `=` is not legal Dafny syntax
and that the restriction could not be verified as is).
That is, the partial arrow type is defined as those functions `f`
whose reads frame is empty for all inputs.
whose reads frame is empty for all inputs on which f is defined.
More precisely, taking variance into account, the partial arrow type
is defined as
<!-- %no-check -->
```dafny
type -A --> +B = f: A ~> B | forall a :: f.reads(a) == {}
type -A --> +B = f: A ~> B | forall a :: f.requires(a) ==> f.reads(a) == {}
```

The type `(TT) -> U` is, in turn, a subset type of `(TT) --> U`, adding the
Expand Down Expand Up @@ -2892,8 +2892,8 @@ whose `reads` and `requires` properties are given by the definition:
<!-- %no-check -->
```dafny
function f.reads<T>(x: T): set<object>
reads R(x)
requires P(x)
reads if P(x) then R(x) else *
{
R(x)
}
Expand Down
Loading