Body-representing atoms, i.e., RuleAtom-s, currently use strings to represent the substitution with which the non-ground rule was grounded with. The String-representation has always been ugly and in addition leads to a bug when the original Substitution is reconstructed and if the substitution contained function terms. The following test causes the bug on the master branch.
Although the buggy code is in Substitutions.fromString(..) and could be fixed using a better parser, an even better solution seems to be getting rid of the String-representation itself and using instead of the String, a ConstantTerm<..> that directly refers to the Substitution object.
Body-representing atoms, i.e.,
RuleAtom
-s, currently use strings to represent the substitution with which the non-ground rule was grounded with. TheString
-representation has always been ugly and in addition leads to a bug when the originalSubstitution
is reconstructed and if the substitution contained function terms. The following test causes the bug on the master branch.Although the buggy code is in
Substitutions.fromString(..)
and could be fixed using a better parser, an even better solution seems to be getting rid of theString
-representation itself and using instead of theString
, aConstantTerm<..>
that directly refers to theSubstitution
object.