clara

http://www.clara-rules.org/
eraserhd 2018-12-10T20:13:11.016900Z

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

2018-12-10T20:32:47.017800Z

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

2018-12-10T20:32:56.018200Z

Can find some in the github issues

2018-12-10T20:33:35.018900Z

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

2018-12-10T20:35:31.020300Z

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

2018-12-10T20:35:43.020600Z

But perhaps you were simplifying

2018-12-10T20:35:55.020800Z

Or I’m wrong hah

eraserhd 2018-12-10T20:47:53.021500Z

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

2018-12-10T20:57:22.021900Z

Could do 2 not conditions for that one right

2018-12-10T20:57:49.022700Z

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

2018-12-10T20:58:08.023400Z

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

2018-12-10T20:58:33.024300Z

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

2018-12-10T20:59:27.025400Z

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

2018-12-10T21:00:00.026400Z

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

2018-12-10T21:00:13.026900Z

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