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

Wrapping #(⋅) #49

Open
jasonhemann opened this issue Dec 11, 2024 · 1 comment
Open

Wrapping #(⋅) #49

jasonhemann opened this issue Dec 11, 2024 · 1 comment

Comments

@jasonhemann
Copy link

In e.g. queens.pl, there are several variables that need the # on them in order for the program to support monotonic CLP(ℤ). Would you accept a PR adding that? Happy to put it up.

@triska
Copy link
Owner

triska commented Dec 11, 2024

First: Excellent point! Almost all existing CLP(ℤ) programs are wrong because they are incomplete: Solutions exist and are found in certain usage modes but not in others. Using the monotonic execution mode makes many of these programs correct, and requires the # wrapper for integer variables.

So, I agree that we should make this change.

At the same time, I want this to be a resource that can be used with several different Prolog systems, notably also GNU Prolog as far as possible. Currently, the most conforming Prolog systems are SICStus, Scryer, and GNU, and I would like to make examples work as far as possible in all these systems.

So, the question is when to best introduce the # wrapper in code examples. In my opinion, a sensible time would be when GNU Prolog supports it.

For now, the clpz repository would certainly benefit most from such adaptions, both in the documentation and also in the code examples: https://github.com/triska/clpz I would greatly appreciate if you could take a look, and think about how to best introduce the monotonic mode in the documentation, which currently does not mention it at all.

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

No branches or pull requests

2 participants