Default-only rules (e.g., `default deny := true` with no conditional body)
returned Undefined in the RVM instead of the default value.
Compiler:
- compute_rule_type: return Complete when rule exists only in default_rules map
- compile_worklist_rule: emit register slots and data-tree entries for
default-only rules (else branch)
VM:
- execute_call_rule_common + execute_call_rule_suspendable: check
default_literal_index before returning Undefined when definitions is empty
Tests:
- 3 new RVM cases (default_rules.yaml): bool, object, entry-point
- 3 new interpreter cases (default/basic.yaml): matching coverage
Co-authored-by: Mark Birger <markbirger@microsoft.com>
Support "var = value", "value = var", and "var = var"
Fall back the '=' to comparsion when both operators are defined
Correctly support variable shadowing with "var := value"
Also, remove the unused Variable struct
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
Only scalars, composites and comprehensions containing scalars are supported.
This will be changed as OPA fixes bug with default values
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>