From ae79302c73515202df5a2565b7493783a5f96593 Mon Sep 17 00:00:00 2001 From: Christoph Zengler Date: Wed, 8 May 2019 09:24:24 +0200 Subject: [PATCH] Adjusted version in POM an files --- README.md | 11 +++++++++-- .../org/logicng/backbones/BackboneGeneration.java | 4 +--- .../java/org/logicng/backbones/MiniSatBackbone.java | 2 +- .../org/logicng/collections/ImmutableFormulaList.java | 3 +-- .../java/org/logicng/formulas/BinaryOperator.java | 3 +-- src/main/java/org/logicng/formulas/NAryOperator.java | 3 +-- src/main/java/org/logicng/formulas/PBConstraint.java | 3 +-- .../logicng/formulas/cache/PredicateCacheEntry.java | 2 +- .../java/org/logicng/predicates/NNFPredicate.java | 6 ++---- .../java/org/logicng/pseudobooleans/PBEncoder.java | 2 +- src/main/java/org/logicng/util/FormulaHelper.java | 2 ++ src/test/java/org/logicng/formulas/CacheTest.java | 2 +- .../java/org/logicng/predicates/NNFPredicateTest.java | 4 ++-- src/test/java/org/logicng/util/FormulaHelperTest.java | 2 ++ 14 files changed, 26 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index bfa886e4..2fc4eeb2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![wercker status](https://app.wercker.com/status/24c4765f3a0d79520ad80a1e4c20cfa2/s/master "wercker status")](https://app.wercker.com/project/bykey/24c4765f3a0d79520ad80a1e4c20cfa2) [![Coverage Status](https://coveralls.io/repos/logic-ng/LogicNG/badge.svg?branch=master&service=github)](https://coveralls.io/github/logic-ng/LogicNG?branch=master) ![License](https://img.shields.io/badge/license-Apache%202-blue.svg) ![Version](https://img.shields.io/badge/version-1.5.0-ff69b4.svg) +[![wercker status](https://app.wercker.com/status/24c4765f3a0d79520ad80a1e4c20cfa2/s/master "wercker status")](https://app.wercker.com/project/bykey/24c4765f3a0d79520ad80a1e4c20cfa2) [![Coverage Status](https://coveralls.io/repos/logic-ng/LogicNG/badge.svg?branch=master&service=github)](https://coveralls.io/github/logic-ng/LogicNG?branch=master) ![License](https://img.shields.io/badge/license-Apache%202-blue.svg) ![Version](https://img.shields.io/badge/version-1.5.1-ff69b4.svg) logo @@ -19,7 +19,7 @@ LogicNG is released in the Maven Central Repository. To include it just add org.logicng logicng - 1.5.0 + 1.5.1 ``` to your Maven POM. @@ -63,6 +63,13 @@ The library is released under the Apache License and therefore is free to use in ## Changelog +### Version 1.5.1 (Release May 2019) +* Introduced a new `FormulaHelper` class for small utility methods on formulas +* Added a new NNF predicate +* Fixed an unspecified behaviour in `SATPredicate` +* Fixed a small performance issue in the new backbone solver +* Fixed a bug in a special case of the CNF transformation of a pseudo-Boolean constraint + ### Version 1.5.0 (Release March 2019) * Algorithm & data structures for efficiently computing backbones of formulas * Data structures for UBTrees in order to efficiently identify sub- and supersets diff --git a/src/main/java/org/logicng/backbones/BackboneGeneration.java b/src/main/java/org/logicng/backbones/BackboneGeneration.java index 3771dd41..c258190c 100644 --- a/src/main/java/org/logicng/backbones/BackboneGeneration.java +++ b/src/main/java/org/logicng/backbones/BackboneGeneration.java @@ -34,8 +34,6 @@ import java.util.Collection; import java.util.Collections; -import java.util.SortedSet; -import java.util.TreeSet; /** * Main entry point for backbone computations. @@ -44,7 +42,7 @@ * For more control over the backbone solver you can create an instance of * {@link MiniSatBackbone} directly. E.g., with an instance of {@link MiniSatBackbone} * the already loaded formulas can be re-used for multiple backbone computations. - * @version 1.5.0 + * @version 1.5.1 * @since 1.5.0 */ public class BackboneGeneration { diff --git a/src/main/java/org/logicng/backbones/MiniSatBackbone.java b/src/main/java/org/logicng/backbones/MiniSatBackbone.java index 5e731ea4..e4d419be 100644 --- a/src/main/java/org/logicng/backbones/MiniSatBackbone.java +++ b/src/main/java/org/logicng/backbones/MiniSatBackbone.java @@ -55,7 +55,7 @@ *

* Reference: Algorithm 3 in M. Janota, I. Lynce, J. Marques-Silva, Algorithms for Computing Backbones of Propositional * Formulae, AI Communications, Volume 28(2), 161-177, 2015. - * @version 1.5.0 + * @version 1.5.1 * @since 1.5.0 */ public class MiniSatBackbone extends MiniSat2Solver { diff --git a/src/main/java/org/logicng/collections/ImmutableFormulaList.java b/src/main/java/org/logicng/collections/ImmutableFormulaList.java index cfdc0580..c5aaf488 100644 --- a/src/main/java/org/logicng/collections/ImmutableFormulaList.java +++ b/src/main/java/org/logicng/collections/ImmutableFormulaList.java @@ -48,11 +48,10 @@ import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeMap; -import java.util.TreeSet; /** * A list of formulas. This can represent the operands of an n-ary operator, a CNF, a DNF, a constraint, etc. - * @version 1.0 + * @version 1.5.1 * @since 1.0 */ public final class ImmutableFormulaList implements Iterable { diff --git a/src/main/java/org/logicng/formulas/BinaryOperator.java b/src/main/java/org/logicng/formulas/BinaryOperator.java index 6fe6b733..dfbb2ec5 100644 --- a/src/main/java/org/logicng/formulas/BinaryOperator.java +++ b/src/main/java/org/logicng/formulas/BinaryOperator.java @@ -35,11 +35,10 @@ import java.util.Iterator; import java.util.NoSuchElementException; import java.util.SortedSet; -import java.util.TreeSet; /** * Super class for Boolean binary operators. - * @version 1.2 + * @version 1.5.1 * @since 1.0 */ public abstract class BinaryOperator extends Formula { diff --git a/src/main/java/org/logicng/formulas/NAryOperator.java b/src/main/java/org/logicng/formulas/NAryOperator.java index fdc72ab8..5d60918d 100644 --- a/src/main/java/org/logicng/formulas/NAryOperator.java +++ b/src/main/java/org/logicng/formulas/NAryOperator.java @@ -40,13 +40,12 @@ import java.util.List; import java.util.NoSuchElementException; import java.util.SortedSet; -import java.util.TreeSet; import static org.logicng.formulas.cache.TransformationCacheEntry.NNF; /** * Super class for Boolean n-ary operators. - * @version 1.1 + * @version 1.5.1 * @since 1.0 */ public abstract class NAryOperator extends Formula { diff --git a/src/main/java/org/logicng/formulas/PBConstraint.java b/src/main/java/org/logicng/formulas/PBConstraint.java index 4d8326c7..58e8d11c 100644 --- a/src/main/java/org/logicng/formulas/PBConstraint.java +++ b/src/main/java/org/logicng/formulas/PBConstraint.java @@ -47,14 +47,13 @@ import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeMap; -import java.util.TreeSet; import static org.logicng.formulas.cache.TransformationCacheEntry.NNF; /** * A pseudo-Boolean constraint of the form {@code c_1 * l_1 + ... + c_n * l_n R k} where {@code R} is one of * {@code =, >, >=, <, <=}. - * @version 1.3 + * @version 1.5.1 * @since 1.0 */ public final class PBConstraint extends Formula { diff --git a/src/main/java/org/logicng/formulas/cache/PredicateCacheEntry.java b/src/main/java/org/logicng/formulas/cache/PredicateCacheEntry.java index bd13dac2..1e1c806c 100644 --- a/src/main/java/org/logicng/formulas/cache/PredicateCacheEntry.java +++ b/src/main/java/org/logicng/formulas/cache/PredicateCacheEntry.java @@ -30,7 +30,7 @@ /** * The pre-defined predicate cache entries. - * @version 1.3 + * @version 1.5.1 * @since 1.0 */ public enum PredicateCacheEntry implements CacheEntry { diff --git a/src/main/java/org/logicng/predicates/NNFPredicate.java b/src/main/java/org/logicng/predicates/NNFPredicate.java index be8046d7..13169cae 100644 --- a/src/main/java/org/logicng/predicates/NNFPredicate.java +++ b/src/main/java/org/logicng/predicates/NNFPredicate.java @@ -32,14 +32,12 @@ import org.logicng.formulas.Formula; import org.logicng.formulas.FormulaPredicate; -import static org.logicng.formulas.cache.PredicateCacheEntry.IS_AIG; -import static org.logicng.formulas.cache.PredicateCacheEntry.IS_CNF; import static org.logicng.formulas.cache.PredicateCacheEntry.IS_NNF; /** * NNF predicate. Indicates whether a formula is in NNF or not. - * @version 1.6.0 - * @since 1.6.0 + * @version 1.5.1 + * @since 1.5.1 */ public final class NNFPredicate implements FormulaPredicate { @Override diff --git a/src/main/java/org/logicng/pseudobooleans/PBEncoder.java b/src/main/java/org/logicng/pseudobooleans/PBEncoder.java index a9ac81a0..2cd42312 100644 --- a/src/main/java/org/logicng/pseudobooleans/PBEncoder.java +++ b/src/main/java/org/logicng/pseudobooleans/PBEncoder.java @@ -48,7 +48,7 @@ /** * An encoder for pseudo-Boolean constraints. - * @version 1.1 + * @version 1.5.1 * @since 1.0 */ public class PBEncoder { diff --git a/src/main/java/org/logicng/util/FormulaHelper.java b/src/main/java/org/logicng/util/FormulaHelper.java index 7c55c380..fb2fece4 100644 --- a/src/main/java/org/logicng/util/FormulaHelper.java +++ b/src/main/java/org/logicng/util/FormulaHelper.java @@ -10,6 +10,8 @@ /** * A class which contains utility methods for {@link Formula} objects. + * @version 1.5.1 + * @since 1.5.1 */ public class FormulaHelper { diff --git a/src/test/java/org/logicng/formulas/CacheTest.java b/src/test/java/org/logicng/formulas/CacheTest.java index 447e0938..c6d727c9 100644 --- a/src/test/java/org/logicng/formulas/CacheTest.java +++ b/src/test/java/org/logicng/formulas/CacheTest.java @@ -39,7 +39,7 @@ /** * Unit tests for the package formulas.cache. - * @version 1.3 + * @version 1.5.1 * @since 1.1 */ public class CacheTest { diff --git a/src/test/java/org/logicng/predicates/NNFPredicateTest.java b/src/test/java/org/logicng/predicates/NNFPredicateTest.java index c35a5fb6..06dfbf36 100644 --- a/src/test/java/org/logicng/predicates/NNFPredicateTest.java +++ b/src/test/java/org/logicng/predicates/NNFPredicateTest.java @@ -34,8 +34,8 @@ /** * Unit tests for the nnf predicate. - * @version 1.6.0 - * @since 1.6.0 + * @version 1.5.1 + * @since 1.5.1 */ public class NNFPredicateTest { diff --git a/src/test/java/org/logicng/util/FormulaHelperTest.java b/src/test/java/org/logicng/util/FormulaHelperTest.java index ff651339..9e9b60c7 100644 --- a/src/test/java/org/logicng/util/FormulaHelperTest.java +++ b/src/test/java/org/logicng/util/FormulaHelperTest.java @@ -39,6 +39,8 @@ /** * Unit tests for {@link FormulaHelper}. + * @version 1.5.1 + * @since 1.5.1 */ public class FormulaHelperTest {