Skip to content

What is the "meaning" of leaf answers with residual goals? Is THIS answer "valid"? #2541

Closed Answered by triska
jjtolton asked this question in Q&A
Discussion options

You must be logged in to vote

As long as there are pending constraints, it is generally unclear whether an answer describes any solutions, especially for theories that are not decidable, such as integer arithmetic.

In the example above, we can find out whether there are solutions by searching for integers that satisfy all constraints. For instance, taking the residual goals of the first leaf answer, we find solutions even if all integers are between 0 and 1:

?-  Gs = [clpz:(_A in 0..1), clpz:(_A#>=_B), clpz:(_A#>=_C), clpz:(_B in 0..1), clpz:(_B#>=_D), clpz:(_E#>=_B), clpz:(_B#>=_F), clpz:(_D in 0..1), clpz:(_G#>=_D), clpz:(_G in 0..1), clpz:(_H#>=_G), clpz:(_H in 0..1), clpz:(_E in 0..1), clpz:(_F in 0..1), clpz:(_I#…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jjtolton
Comment options

@triska
Comment options

@jjtolton
Comment options

Answer selected by jjtolton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants