Skip to content

Conversation

@geraschenko
Copy link
Contributor

@geraschenko geraschenko commented Dec 14, 2025

greater_than(terms, rhs) is implemented as greater_than_or_equals(terms, rhs - 1), but should be greater_than_or_equals(terms, rhs + 1). This is likely a copy-paste error from the implementation of less_than.

Note: I've added a unit test saying that "x > 0" is not satisfiable for an integer variable x which is required to be 0. This feels like an odd test to have. I'm happy to remove or change it.

`greater_than(terms, rhs)` is implemented as
`greater_than_or_equals(terms, rhs - 1)`, but should be
`greater_than_or_equals(terms, rhs - 1)`. This is likely a copy-paste
error from the implementation of `less_than`.

Note: I've added a unit test saying that "x > 0" is not satisfiable for
an integer variable x which is required to be 0. This feels like an odd
test to have. I'm happy to remove or change it.
Copy link
Contributor

@ImkoMarijnissen ImkoMarijnissen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Thank you for creating a PR with the fix and a test case as well.

I think this brings up a good point that our MiniZinc interface is quite well-tested, but that the Rust interface requires more testing.

I have some small comments about the test case, but other than that, it looks good!

@ImkoMarijnissen ImkoMarijnissen changed the title Fix sign error in greater_than helper fix: Sign error in greater_than constraint Dec 15, 2025
Copy link
Contributor

@ImkoMarijnissen ImkoMarijnissen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you for making the changes!

It appears that the linting CI does not pass; once that is fixed, it should be good to go.

@geraschenko
Copy link
Contributor Author

geraschenko commented Dec 15, 2025

It appears that the linting CI does not pass; once that is fixed, it should be good to go.

Whoops, I must have forgotten to cargo fmt. CI is now passing.

"Dismiss old reviews when re-requested" is still failing. I'm not entirely sure what this is, but given that the error code is 403, I assume this is something a repo owner has to handle.

@ImkoMarijnissen ImkoMarijnissen merged commit 27b8c83 into ConSol-Lab:main Dec 16, 2025
8 of 9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants