-
Notifications
You must be signed in to change notification settings - Fork 297
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: implement new evaluator
This does not yet implement disjunctions. Much of the specific code from the old evaluator is shared with the new evaluator. It is mostly the top-level control that is reimplemented. The new evaluator is based on the new scheduler and the new closedness implementation. We will describe the function of each new file below, with more details in the file itself. conjuncts.go: This file take adt.Expr and adt.Value and either stores the corresponding value, if present, in a Vertex directly or otherwise schedules a task in the scheduler for later evaluation. tasks.go: This file implements the tasks corresponding to the various adt.Expr expressions needed to evaluate them. These are scheduled by the code in conjuncts.go states.go: This file adds more of the low-level state logic around the various properties a CUE node can achieve. These state map to the low-level scheduler, which is CUE agnostic. unify.go: This file contains the high-level evaluation code that kicks off the evaluation process, including the initialization of a scheduler for each node. The analogous file for the old evaluator is eval.go. Tests: Some of the test results are different between the old and new evaluator. In this case, the txtar files will contain both an out/evalalpha file for the new evaluator, the original out/alpha file for the old evaluator, and a diff file for the diffed results. If the changes were an improvement, this is described in the diff/explanation file. Otherwise, there is a diff/todo/pX, where X is the priority of the fix, with an explanation of what still needs to be done. Issue #2884 Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com> Change-Id: Ia0c5ad71cfdc7777b29f0aafd768da199844b710
- Loading branch information
Showing
91 changed files
with
11,374 additions
and
60 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
Oops, something went wrong.