You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[_] is used typically to retrieve all the goals suspended for a given predicate.
The use of [_] can lead to goal resolution issue if the _ is accidentally instantiated.
For example, the following code raise a failure:
predpi:int.predtrig.% this extends the previous constraintconstraintptrig {
rule \ trig (pA) <=> (false).
}
main:-% declare_constraint (p 4) [_], not (declare_constraint trig [_]).std.spy-do![declare_constraint (p 4) [_], not (declare_constraint trig [_])].
The premise with the spy-do! fails, whereas the same premise without the spy-do! succeeds
The text was updated successfully, but these errors were encountered:
Thanks for opening the issue.
I think the desired solution is to use some constant, say the-key, instead of _, eg declare_constraint (p X) [X,the-key] to get it resumed when X materializes and combined via CHR rules with all the other constraints about X or about the-key.
[_]
is used typically to retrieve all the goals suspended for a given predicate.The use of
[_]
can lead to goal resolution issue if the_
is accidentally instantiated.For example, the following code raise a failure:
The premise with the
spy-do!
fails, whereas the same premise without thespy-do!
succeedsThe text was updated successfully, but these errors were encountered: