microsoft / regorus

Regorus - A fast, lightweight Rego (OPA policy language) interpreter written in Rust.
MIT License
106 stars 27 forks source link

Complete top-down evaluation implementation #178

Open anakrish opened 4 months ago

anakrish commented 4 months ago

The following does not pass with top-down evaluation:

package test
import future.keywords

p[q].r contains s {  # Rule with prefix and general ref
   x := ["a", "b", "c"]
   q := x[_]
   s := x[_]
   q != s
}
p.b.r contains "foo" # Rule with prefix overlapping with above rule

Query: data.test.p.b