Exclusion conditions in nested rules break because they are persisted through the Boolean variable

Issue #22 resolved
Sean Kauffman repo owner created an issue

What is honestly unclear to me is whether or not the Boolean variable is even necessary for nested rules. The idea is to replace the value of subexpressions with one calculated in the nested rule, but if the interval exists, it doesn't seem like this should need to be checked. That is, it should always be true, right? What if it was just replaced with true instead?

It seems to only affect rules where the where clause references a map value of the excluded interval that is not also available (or maybe compared?) on the existing interval. Blegh.

This rule exhibits the problem:

D :- A before (B unless after C)
  where B.id = C.id
      & C.foo
      & B.id = A.id

This one does not, though:

D :- A before (B unless after C)
  where B.id = C.id
      & C.id = 2
      & B.id = A.id

Comments (4)

  1. Sean Kauffman reporter

    I have done some preliminary work to combat this. Right now, for subexpressions that are affiliated with exclusion rules, we just pass a map value of true. It might be okay to do this for all rules, but that isn’t clear yet.

  2. Log in to comment