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

Program with equality in the body does not terminate #95

Open
wanko opened this issue Oct 25, 2022 · 1 comment
Open

Program with equality in the body does not terminate #95

wanko opened this issue Oct 25, 2022 · 1 comment
Labels

Comments

@wanko
Copy link
Member

wanko commented Oct 25, 2022

The program

a :- &sum{ x; y } = 4.

does not terminate.

The program

a :- &sum{ x; y } <= 4,&sum{ x;y } >= 4.

terminates instantly.

Comandlines:
echo "a :- &sum{ x; y } = 4." | clingcon -
a :- &sum{ x; y } <= 4,&sum{ x;y } >= 4." | clingcon -

@rkaminsk
Copy link
Member

rkaminsk commented Oct 25, 2022

There are some situations in which clingcon unrolls the whole domain of an integer variable during constraint progation. Whether clingcon runs into such a situation on this example depends on how the solver's heuristic selects Boolean variables when branching. I think this is an inherent problem of clingcon's solving algorithm. In practice, it is better to limit the size of domains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants