dyna
dyna copied to clipboard
implicit :- aggregator (stating facts)
Right now
foo.
appears to translate as
foo |= true.
I think the aggregator should be :- rather than |= since this is part of the Prolog fragment.
Also, I'd like to be able to write
foo(I) for in_range(I).
to mean
foo(I) :- true for in_range(I).
I'll fix the default aggregator.
The enhancement to implicit :- true with side conditions is lower priority... unless @nwf can add them with little trouble.
I think we should get rid of |= (for now), its currently just a synonym for :-. Thoughts?
I think we should get rid of |= (for now), its currently just a synonym for :-. Thoughts?
Nope, it's not the same thing. |= like &= is three-valued logic (the result and the aggregands can be true, false, or null) while :- is two-valued logic (the result and the aggregands can only be true or null -- anything else is a type error). So :- is actually a subset of |= with stronger type requirements and guarantees.
The enhancement to implicit :- true with side conditions is lower priority... unless @nwf can add them with little trouble.
Yes, of course that is a parser issue. But I'll leave it open on the ticket.