ddlog icon indicating copy to clipboard operation
ddlog copied to clipboard

Compiler ignores constants in head atoms of an inference rule

Open alldefector opened this issue 8 years ago • 2 comments

This rule

@weight(f)
tag(w, "GROOVY") :- features(w, f).

is compiled as if it's

@weight(f)
tag(w, t) :- features(w, f).

alldefector avatar Jul 12 '16 04:07 alldefector

This is pretty nasty.. can the following be a workaround?

@weight(f)
tag(w, t) :- features(w, f), t = "GROOVY".

netj avatar Jul 12 '16 05:07 netj

Yes, that works.

alldefector avatar Jul 12 '16 05:07 alldefector