alpha-asp / Alpha

A lazy-grounding Answer-Set Programming system
BSD 2-Clause "Simplified" License
58 stars 10 forks source link

Refactor DefaultSolver #297

Closed AntoniusW closed 3 years ago

AntoniusW commented 3 years ago

Some refactoring/polishing inside the solver component, mostly DefaultSolver. Changes are intended to support subclassing of DefaultSolver for optimization tasks/weak constraints.

codecov[bot] commented 3 years ago

Codecov Report

Merging #297 (79f720f) into master (9118335) will increase coverage by 0.13%. The diff coverage is 86.10%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #297      +/-   ##
============================================
+ Coverage     78.35%   78.48%   +0.13%     
+ Complexity     2659     2515     -144     
============================================
  Files           191      189       -2     
  Lines          8870     8199     -671     
  Branches       1592     1417     -175     
============================================
- Hits           6950     6435     -515     
+ Misses         1449     1324     -125     
+ Partials        471      440      -31     
Impacted Files Coverage Δ
.../java/at/ac/tuwien/kr/alpha/common/Assignment.java 86.66% <ø> (ø)
.../at/ac/tuwien/kr/alpha/common/atoms/BasicAtom.java 83.67% <0.00%> (-6.04%) :arrow_down:
...a/at/ac/tuwien/kr/alpha/common/rule/BasicRule.java 33.33% <0.00%> (-16.67%) :arrow_down:
...wien/kr/alpha/grounder/IndexedInstanceStorage.java 76.62% <ø> (ø)
.../at/ac/tuwien/kr/alpha/grounder/NaiveGrounder.java 85.82% <ø> (-2.20%) :arrow_down:
...a/at/ac/tuwien/kr/alpha/solver/PerformanceLog.java 100.00% <ø> (ø)
.../ac/tuwien/kr/alpha/solver/WritableAssignment.java 76.92% <ø> (ø)
...va/at/ac/tuwien/kr/alpha/solver/ChoiceManager.java 81.25% <57.14%> (+0.57%) :arrow_up:
...ounder/transformation/VariableEqualityRemoval.java 87.69% <62.50%> (-7.61%) :arrow_down:
...grounder/transformation/PredicateInternalizer.java 74.19% <63.63%> (-15.00%) :arrow_down:
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b1fc76c...79f720f. Read the comment docs.

AntoniusW commented 3 years ago

@lorenzleutgeb and/or @madmike200590 please have another look.