Skip to content

add grammar-based testing script #145

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

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

IgnaceBleukx
Copy link
Contributor

I added a script that automatically generates a bunch of constraints and posts them through the Python API.

Some bugs I have found (annotated with TODO in the script):

  • Scaling with "0" results in division-by zero errors for some constraints
  • The reified propagator for Element seems to be unimplemented for now?

Ideally, we can also test whether the constraint is indeed satisfied by the solution found by the solver, but I'm not sure how to that.

Comment on lines +137 to +138
if name == 'element':
return # TODO: propagator not yet implemented?
Copy link
Contributor

Choose a reason for hiding this comment

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

I am trying to understand this guard statement. Removing it seems to work fine; the element propagator is implemented and accessible through the python interface. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think when I tested it before, the reification of Element gave me an error.
Maybe it has to do with the index being able to go out of bounds in this testing script?

thread '<unnamed>' panicked at pumpkin-solver/src/engine/cp/propagation/contexts/propagation_context.rs:101:43:
not yet implemented
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1]    87643 IOT instruction (core dumped)  python3 scratch.py

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@maartenflippo
Copy link
Contributor

This will be merged after #151 is merged!

@maartenflippo maartenflippo merged commit 94e7603 into ConSol-Lab:develop Feb 13, 2025
4 checks passed
maartenflippo pushed a commit that referenced this pull request Apr 11, 2025
I added a script that automatically generates a bunch of constraints and
posts them through the Python API.

Some bugs I have found (annotated with TODO in the script):
- Scaling with "0" results in division-by zero errors for some
constraints
- The reified propagator for Element seems to be unimplemented for now?

Ideally, we can also test whether the constraint is indeed satisfied by
the solution found by the solver, but I'm not sure how to that.
maartenflippo pushed a commit that referenced this pull request Apr 11, 2025
I added a script that automatically generates a bunch of constraints and
posts them through the Python API.

Some bugs I have found (annotated with TODO in the script):
- Scaling with "0" results in division-by zero errors for some
constraints
- The reified propagator for Element seems to be unimplemented for now?

Ideally, we can also test whether the constraint is indeed satisfied by
the solution found by the solver, but I'm not sure how to that.
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