diff --git a/src/main/java/org/logicng/backbones/Backbone.java b/src/main/java/org/logicng/backbones/Backbone.java index 54ceccb9..eaca5a89 100644 --- a/src/main/java/org/logicng/backbones/Backbone.java +++ b/src/main/java/org/logicng/backbones/Backbone.java @@ -57,10 +57,13 @@ * Therefore these variables can be assigned to true or false. * * 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 positiveBackbone; private final SortedSet negativeBackbone; @@ -98,7 +101,7 @@ public static Backbone satBackbone(final SortedSet positiveBackbone, f * @return the backbone */ public static Backbone unsatBackbone() { - return new Backbone(false, null, null, null); + return UNSAT_BACKBONE; } /** diff --git a/src/main/java/org/logicng/util/FormulaRandomizerConfig.java b/src/main/java/org/logicng/util/FormulaRandomizerConfig.java index a703a600..938ad7dd 100644 --- a/src/main/java/org/logicng/util/FormulaRandomizerConfig.java +++ b/src/main/java/org/logicng/util/FormulaRandomizerConfig.java @@ -46,7 +46,7 @@ *
  • maximum numbers of operands for conjunctions, disjunctions, PBCs, and CCs
  • * * Note that the weights can only be applied for inner nodes of the generated formula, - * since the 'leafs' of a formula in LogicNG are always literals or PBCs. So the weight of literals and PBCs + * since the 'leaves' of a formula in LogicNG are always 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. @@ -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) { diff --git a/src/test/java/org/logicng/backbones/BackboneTest.java b/src/test/java/org/logicng/backbones/BackboneTest.java index e257d84b..8ef56d8f 100644 --- a/src/test/java/org/logicng/backbones/BackboneTest.java +++ b/src/test/java/org/logicng/backbones/BackboneTest.java @@ -47,7 +47,7 @@ /** * Unit tests for {@link Backbone}. - * @version 2.0.0 + * @version 2.3.1 * @since 1.5.0 */ public class BackboneTest { diff --git a/src/test/java/org/logicng/datastructures/AssignmentTest.java b/src/test/java/org/logicng/datastructures/AssignmentTest.java index b5b93de2..39600551 100644 --- a/src/test/java/org/logicng/datastructures/AssignmentTest.java +++ b/src/test/java/org/logicng/datastructures/AssignmentTest.java @@ -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 {