Skip to content

Commit

Permalink
Merge pull request #40 from logic-ng/release/v2.3
Browse files Browse the repository at this point in the history
Release/v2.3
  • Loading branch information
rouven-walter authored Jul 27, 2022
2 parents 80ed6bc + 6c0026b commit 252dcb6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/logicng/backbones/Backbone.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@
* Therefore these variables can be assigned to true or false.
* </ol>
* All variable sets which were not computed are empty.
* @version 2.0.0
* @version 2.3.1
* @since 1.5.0
*/
public final class Backbone {

private static final Backbone UNSAT_BACKBONE = new Backbone(false, null, null, null);

private final boolean sat;
private final SortedSet<Variable> positiveBackbone;
private final SortedSet<Variable> negativeBackbone;
Expand Down Expand Up @@ -98,7 +101,7 @@ public static Backbone satBackbone(final SortedSet<Variable> positiveBackbone, f
* @return the backbone
*/
public static Backbone unsatBackbone() {
return new Backbone(false, null, null, null);
return UNSAT_BACKBONE;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/logicng/util/FormulaRandomizerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* <li>maximum numbers of operands for conjunctions, disjunctions, PBCs, and CCs</li>
* </ul>
* Note that the weights can only be applied for inner nodes of the generated formula,
* since the 'leafs' of a formula in LogicNG are <b>always</b> literals or PBCs. So the weight of literals and PBCs
* since the 'leaves' of a formula in LogicNG are <b>always</b> literals or PBCs. So the weight of literals and PBCs
* will effectively be higher and the weights of all other formula types (especially conjunctions and disjunctions)
* will be lower. Similarly, the weight of constants will usually be lower, because they are always reduced in LogicNG
* unless they are a single formula.
Expand Down Expand Up @@ -278,8 +278,8 @@ public Builder weightNegativeLiteral(final double weightNegativeLiteral) {
}

/**
* Sets the relative weight of a disjuction.
* @param weightOr the relative weight of a disjuction
* Sets the relative weight of a disjunction.
* @param weightOr the relative weight of a disjunction
* @return the builder
*/
public Builder weightOr(final double weightOr) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/logicng/backbones/BackboneTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

/**
* Unit tests for {@link Backbone}.
* @version 2.0.0
* @version 2.3.1
* @since 1.5.0
*/
public class BackboneTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

/**
* Unit tests for the class {@link Assignment}.
* @version 2.0.0
* @version 2.3.1
* @since 1.0
*/
public class AssignmentTest extends TestWithExampleFormulas {
Expand Down

0 comments on commit 252dcb6

Please sign in to comment.