Fork me on GitHub
#clara
<
2018-12-10
>
eraserhd20:12:11

AFAICT, I have a situation where a [:not [:or A B]] is being ignored on a rule. Any thoughts about how to troubleshoot this?

mikerod20:12:47

@eraserhd there are certainly some issues that can happen with negated complex conditions.

mikerod20:12:56

Can find some in the github issues

mikerod20:12:35

One thing I’d do is to not combine it all to see that things work

mikerod20:12:31

I believe syntax is [:not [:or [A] [B]]]

mikerod20:12:43

But perhaps you were simplifying

mikerod20:12:55

Or I’m wrong hah

eraserhd20:12:53

I'm definitely simplifying. We're working on making a small reproduction. Maybe it'll go away, or we'll figure out we're doing something boneheaded. :D

mikerod20:12:22

Could do 2 not conditions for that one right

mikerod20:12:49

But in general Clara compiler will try to convert things into disjunctive normal form.

mikerod20:12:08

Sometimes there may be issues with doing this when variable bindings are used across clauses that are moving around.

mikerod20:12:33

It may or may not relate to your issue. I just think there were perhaps still a few edge cases pointed out in some gh issues outstanding

mikerod20:12:27

I often will just advocate for breaking more complex expressions into separate rules that have intermediate facts between them to recreate the logic you are looking for

mikerod21:12:00

Generally will lead to less confusion and more transparency in introspection since you can look at the intermediate facts.

mikerod21:12:13

Often perf is fine or better that way too, but that can depend.