-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core/(adt|subsume): pattern constraints are optional
Currently, the new evaluator adds pattern constraints as member fields, whereas they are equivalent to optional constraints according to the spec. This results in subsumption being incorrect. Similarly, there are various points where constraints are collected where the resulting Vertex must be marked as optional. We now use a wrapper matchAndInsert in the subsumption package to handle these cases. We could not set ArcOptional unconditionally in MatchAndInsert, as this is not always correct. Another issue was that a pattern constraint of the form ["foo"]: value is equivalent to foo?: value. The code now catches these "bounded" cases of constraints and treats them as optional fields within subsumption. Note that there remains an element of approximation. This is fine. Tests in value_test were added to check the subsumption behavior reguarding pattern constraints. Note that subsumption was much less precise for the old evaluator. For this reason the tests are sometimes disabled for the old evaluator. Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I223d0dfc4b0893c1bbf08b1ef9ad2dc651cf9cc8 Dispatch-Trailer: {"type":"trybot","CL":1196978,"patchset":1,"ref":"refs/changes/78/1196978/1","targetBranch":"master"}
- Loading branch information
Showing
7 changed files
with
147 additions
and
92 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
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.