Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer Arithmetic - "left as an exercise" that is too difficult #41

Open
prologbyexample opened this issue Oct 25, 2022 · 0 comments
Open

Comments

@prologbyexample
Copy link

prologbyexample commented Oct 25, 2022

The section on integer arithmetic and constraint programming at https://www.metalevel.at/prolog/clpz explains that the list_length/2 predicate does not terminate when asked to find a list that has a specified length.

?- list_length(Ls, 3), false.
nontermination

"It takes only a single additional goal to make this query terminate. This is left as an exercise."

I have struggled to find what this single additional goal is. I have tried days of reading popular texts on prolog, googling and even asking on stackexchange.

I would love an answer or a link to an answer.

Repository owner locked and limited conversation to collaborators Oct 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant