forked from open-policy-agent/opa
-
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.
1. Refs to rules that produce set or object docs were not being handled correctly when the key value was a variable that had an existing binding. The term evaluation code must check the bindings for variables it encounters while processing references. 2. Refs to vars were not being handled correctly when the ref contained variables that had existing bindings. This issue was similar to (1). 3. Refs to vars bound to arrays or objects with invalid indices/keys (e.g., out of range) were causing evaluation to panic. Invalid indices/keys are now treated as undefined. 4. Header field composition wasn't taking objects and arrays into account. 5. An equality expr with vars on both sides will eval to true and the vars will be unified. However, if this was the last expression in the body, the vars are still non-ground and so the proof should not be considered successful. 6. Move traceSuccess call into evalExpr. This way it will be applied for all built-ins automatically. 7. Address comments from PR #27: - Rename isDefined to isTrue in evalContextNegated - Add comment about substituting variables in partial set/object evaluation - Add test cases involving multiple virtual docs and subsitution
- Loading branch information
Showing
6 changed files
with
149 additions
and
47 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.