-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
compiler:effectseffect analysiseffect analysisdocsThis change adds or pertains to documentationThis change adds or pertains to documentation
Milestone
Description
The description of consistency currently has the following note:
│ Note
│
│ The :consistent-cy assertion is made world-age wise. More formally, write fᵢ for the evaluation of f in
│ world-age i, then we require:
│
│ ∀ i, x, y: x ≡ y → fᵢ(x) ≡ fᵢ(y)
│
│ However, for two world ages i, j s.t. i ≠ j, we may have fᵢ(x) ≢ fⱼ(y).
│
│ A further implication is that :consistent functions may not make their return value dependent on the state of
│ the heap or any other global state that is not constant for a given world age.
This is a true description of that the :consistent
effect means, but it assumes that inferences was able to determine all backedges for the called function. Having an inference-determined :consistent
effect implies this, but it need not be true for a :consistent
override annotation. I think our options are:
- Always truncate the world range for
:consistent
overrides to just the evaluated world range. - Add a separate annotation
:globally_consistent
(or something) that removes the world-age specific language from the specification. - Add a separate (non-overridable) effect that determines if inference has total backedge information to compute accurate world-age bounds.
- Ignore all of this and just drop this language from the annotation doc and put it into the doc for the effect itself.
Metadata
Metadata
Assignees
Labels
compiler:effectseffect analysiseffect analysisdocsThis change adds or pertains to documentationThis change adds or pertains to documentation