topdown: evaluate "every"
This includes simple evaluation and partial eval. For PE, we're deliberately unsophisticated for the first iteration: if anything is unknown, we'll save the expression. Due to some technicality, the saved expression's body will be less clean than usual: copy-propagation is not yet applied. Besides fixing that, future improvements could unroll the every expression when the domain is known; or do more work to PE the expression body when. Known TODOs: tracing is not yet in the desired state. There are added test cases in the YAML test case files, and in topdown_test.go: the tests defined in topdown/topdown_test.go allow for finer-grained assertions, using `print()` to capture the evaluation. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
S
Stephan Renatus committed
a36f58198729cf0c390244cccca3c07846b62c10
Parent: a96e177
Committed by Stephan Renatus <stephan@styra.com>
on 2/11/2022, 10:22:19 AM