-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Distinguish between invariants and invariant terms.
This change introduces invariant _terms_, which are distinct from invariants. Terms are independent types that are folded to compute the variance of a token. When the fold of terms for a token is complete, the final term is finalized into the invariant. This allows variance computation via an intermediate type. This is not yet exercised in this change, but is necessary for some invariants. In particular, depth is not correctly computed: terminal separators are miscounted. This is difficult to detect in a tree fold, but can be accomplished with additional information in terms. However, this information is only needed for the fold and is superfluous once the sum is computed.
- Loading branch information
1 parent
6280daf
commit 8860fe8
Showing
6 changed files
with
119 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.