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

Extend PropagateInit interface. #183

Merged
merged 9 commits into from
Dec 7, 2019
Merged

Extend PropagateInit interface. #183

merged 9 commits into from
Dec 7, 2019

Conversation

rkaminsk
Copy link
Member

@rkaminsk rkaminsk commented Dec 6, 2019

This pull request extends the PropagateInit class to add constraints and perform propagation during propagator initialization.

This commit restores the previously implemented add clause semantics.
Furthemore, it adds a propagate method to the PropagateInit class.
@rkaminsk rkaminsk changed the base branch from master to wip December 6, 2019 13:35
@rkaminsk
Copy link
Member Author

rkaminsk commented Dec 6, 2019

@BenKaufmann can you have a look at 732231d to check if this makes sense? I was especially unsure if it is okay to call propagate on the master solver during propagator initializtion like this.

@rkaminsk rkaminsk changed the title Propagator Extend PropagateInit interface. Dec 6, 2019
@rkaminsk
Copy link
Member Author

rkaminsk commented Dec 6, 2019

@BenKaufmann can you please also have a look at 713283f? I added a method to add weight constraints during propagator initialization.

@rkaminsk
Copy link
Member Author

rkaminsk commented Dec 6, 2019

@BenKaufmann and there is a final one for adding literals to minimize in PropagateInit. Please have a look at ec8a6f9, too.

libclingo/clingo.h Outdated Show resolved Hide resolved
libclingo/clingo.h Outdated Show resolved Hide resolved
libclingo/src/clingocontrol.cc Outdated Show resolved Hide resolved
libclingo/src/clingocontrol.cc Outdated Show resolved Hide resolved
libclingo/src/clingocontrol.cc Show resolved Hide resolved
@rkaminsk
Copy link
Member Author

rkaminsk commented Dec 6, 2019

Awesome, thanks. I'll address the Doxygen comments and also add Lua and Python bindings next. Would be nice if you could take care of the acquireProblemVars logic at some point. I guess it's not a big deal anyway.

The SAT-preprocessing we can simply leave aside for now.

@rkaminsk rkaminsk self-assigned this Dec 6, 2019
@rkaminsk rkaminsk added this to the v5.4.1 milestone Dec 6, 2019
@BenKaufmann
Copy link
Contributor

Would be nice if you could take care of the acquireProblemVars logic at some point. I guess it's not a big deal anyway.

I added the necessary changes in potassco/clasp@13ae0ea

This commit updates clasp. With this update it is no longer necessary to
call acquireProblemVars when adding clauses, weight constraints, or
minimize literals to the master solver.
@rkaminsk
Copy link
Member Author

rkaminsk commented Dec 7, 2019

Would be nice if you could take care of the acquireProblemVars logic at some point. I guess it's not a big deal anyway.

I added the necessary changes in potassco/clasp@13ae0ea

Thanks, using it now.

This commit adds functions to add weight constraints and minimize
constraints to the PropagateInit interface.
This commit adds functions to add weight constraints and minimize
constraints to the PropagateInit interface.
@rkaminsk rkaminsk merged commit 31cdb71 into wip Dec 7, 2019
@MaxOstrowski
Copy link
Member

Looks awesome. Thanks a lot.

@rkaminsk rkaminsk deleted the propagator branch December 11, 2019 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants