-
Notifications
You must be signed in to change notification settings - Fork 11
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
WIP: Grounding strategies and phase saving and restarts #206
Closed
rtaupe
wants to merge
80
commits into
master
from
grounding_strategies_and_phase_saving_and_restarts
Closed
WIP: Grounding strategies and phase saving and restarts #206
rtaupe
wants to merge
80
commits into
master
from
grounding_strategies_and_phase_saving_and_restarts
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(i.e. heuristics that allow to ground more rules than just those whose positive body is satisfied)
* removed NaiveGrounder.predicatesDefinedOnlyByFacts again, because it does not provide additional benefit over ProgramAnalysis * comments on design decisions in NaiveGrounder.bindNextAtomInRule * bugfix in NaiveGrounder.storeAtomAndTerminateIfAtomDoesNotHold
The issue here is that it is possible that atoms have been grounded by bootstrap() and are not yet known to the assignment. The computation of maxAtomIdBeforeGroundingNewNoGoods happened therefore too late (after bootstrap()), but we can do without maxAtomIdBeforeGroundingNewNoGoods anyway.
i.e. a situation in which it has to terminate binding, but where it could (potentially) continue if the grounding order were different
terminate binding if more than N positive body literals are unassigned
# Conflicts: # src/main/java/at/ac/tuwien/kr/alpha/Main.java # src/main/java/at/ac/tuwien/kr/alpha/grounder/GrounderFactory.java # src/main/java/at/ac/tuwien/kr/alpha/grounder/NaiveGrounder.java # src/test/java/at/ac/tuwien/kr/alpha/solver/AggregatesTest.java
(which is just a temporary workaround)
because this might lead to necessary rules not being grounded at all
to be left in grounded rules
# Conflicts: # src/main/java/at/ac/tuwien/kr/alpha/config/CommandLineParser.java # src/main/java/at/ac/tuwien/kr/alpha/config/SystemConfig.java # src/main/java/at/ac/tuwien/kr/alpha/solver/NaiveNoGoodStore.java # src/main/java/at/ac/tuwien/kr/alpha/solver/NoGoodStore.java # src/main/java/at/ac/tuwien/kr/alpha/solver/NoGoodStoreAlphaRoaming.java
- CommandLineParser and SystemConfig have option to enable restarts. - DefaultSolver runs restarts if enabled. - Add MixedRestartStrategy combining Luby and dynamic (EMA) restarts. - Enhanced performance logs for conflicts and restarts
- ChainedBranchingHeuristics gives access to first-run heuristics. - HeapOfActiveAtoms reports activity increment for normalization. - VSIDSWithPhaseSaving logs * the overall, normalized decrease in activity of the seelected atoms, * the number of most-active choices thrown away because they were not active choice points at the time. - PerformanceLog prints heuristics information if DefaultSolver is runnning with VSIDSWithPhaseSaving
(-dir / --disableInstanceRemoval)
that is apparently not necessary.
with phase saving. - CommandLineParser and SystemConfig accept initial phase settings. - AtomChoiceRelation stores relation between ordinary atoms and the choice points that influence them. - NaiveGrounder and ProgramAnalyzingGrounder provide AtomChoiceRelation. - NoGoodGenerator fills AtomChoiceRelation. - BranchingHeuristicFactory sets AtomChoiceRelation for VSIDSWithPhaseSaving. - PhaseInitializerFactory provides different initial phase settings. - VSIDSWithPhaseSaving uses AtomChoiceRelation for activity increments. - SolverFactory sets chosen phase initializer. - TrailAssignment considers initial phase value, if phase was not set. - Tests set a phase initializer if needed.
- In HeapOfActiveAtoms several members/methods package-private now to allow overriding. - Add HeapOfRelatedChoiceAtoms using AtomChoiceRelation to only record and initialize choice points. - Moved ChoiceManager update in DefaultSolver to correctly know which atoms are choice points. - Improved logging in VSIDSWithPhaseSaving and PerformanceLog.
- Move getAtomChoiceRelation() from NaiveGrounder to Grounder, implement method also in DummyGrounder and ChoiceGrounder. - HeapOfActiveAtoms keeps track of literals occurring in the heap. - More logging stats from VSIDSWithPhaseSaving. - ChoiceInfluenceManager: simplified callbackOnChange
…d_phase_saving_and_restarts # Conflicts: # src/main/java/at/ac/tuwien/kr/alpha/config/CommandLineParser.java # src/main/java/at/ac/tuwien/kr/alpha/config/SystemConfig.java # src/main/java/at/ac/tuwien/kr/alpha/grounder/NaiveGrounder.java # src/test/java/at/ac/tuwien/kr/alpha/grounder/NaiveGrounderTest.java
…d_phase_saving_and_restarts
Codecov Report
@@ Coverage Diff @@
## master #206 +/- ##
============================================
+ Coverage 78.64% 79.19% +0.54%
- Complexity 1990 2156 +166
============================================
Files 141 149 +8
Lines 6373 6829 +456
Branches 1129 1187 +58
============================================
+ Hits 5012 5408 +396
- Misses 964 1015 +51
- Partials 397 406 +9
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the union of #192 and #202. Instead of merging this pull request, the other two should be merged to master. This is just to see if CI gets through.