aggregates (count/setof) are not quite right with reified items
Brought to you by:
kifer
a [ b -> ${d(c)} ].
a [ b -> ${d(?x)} ] :- ?x = c.
@!{SetQuery(?s)} !- ?s = setof{?_x | a [ b -> ?_x ] }.
the setof query returns two identical reified formulas:
?s = [${d(c)@main}, ${d(c)@main}]
This has to do with the hidden arguments in reified formulas. Need to figure out how to gracefully ignore them in sorting or counting.
Anonymous