Allows supervision labels to be any expression, not just TRUE/FALSE or variables.
Adds If-then-else expression.
Desugaring function call rules
Sets up an easy way to introduce program rewriters for syntactic sugars.
Rewrites problematic function call rules that produced deepdive.conf rejected by deepdive compile because they will overwrite each other, namely:
Multiple function call rules defining the same head.
A function call rule defining a head relation that has other normal rules.
Desugars such rules to write to their own head (uniquely renamed) and put everything back to the original head as an extra union rule. (See the desugar.expected in a test.)
This was necessary to keep the new example's supervision part simple, which used DDlog as well as UDF for populating a single table for labels.
Supervision syntax extension
TRUE
/FALSE
or variables.Desugaring function call rules
deepdive compile
because they will overwrite each other, namely: