Skip to content

Commit a876054

Browse files
committed
bump analysis plugins + corresponding cleanups
1 parent 5192e3c commit a876054

56 files changed

Lines changed: 145 additions & 163 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

algorithms/active/adt/src/main/java/de/learnlib/algorithm/adt/learner/ADTLearner.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -847,24 +847,24 @@ private BuilderDefaults() {
847847
// prevent instantiation
848848
}
849849

850-
public static LeafSplitter leafSplitter() {
850+
static LeafSplitter leafSplitter() {
851851
return LeafSplitters.DEFAULT_SPLITTER;
852852
}
853853

854-
public static ADTExtender adtExtender() {
854+
static ADTExtender adtExtender() {
855855
return ADTExtenders.EXTEND_BEST_EFFORT;
856856
}
857857

858-
public static SubtreeReplacer subtreeReplacer() {
858+
static SubtreeReplacer subtreeReplacer() {
859859
return SubtreeReplacers.LEVELED_BEST_EFFORT;
860860
}
861861

862-
public static boolean useObservationTree() {
862+
static boolean useObservationTree() {
863863
return true;
864864
}
865865

866866
@SuppressWarnings("unchecked")
867-
public static <I, D> LocalSuffixFinder<I, D> suffixFinder() {
867+
static <I, D> LocalSuffixFinder<I, D> suffixFinder() {
868868
return (LocalSuffixFinder<I, D>) LocalSuffixFinders.RIVEST_SCHAPIRE;
869869
}
870870
}

algorithms/active/dhc/src/main/java/de/learnlib/algorithm/dhc/mealy/MealyDHC.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ private BuilderDefaults() {
301301
// prevent instantiation
302302
}
303303

304-
public static <I, O> GlobalSuffixFinder<? super I, ? super Word<O>> suffixFinder() {
304+
static <I, O> GlobalSuffixFinder<? super I, ? super Word<O>> suffixFinder() {
305305
return GlobalSuffixFinders.RIVEST_SCHAPIRE;
306306
}
307307

308-
public static <I> Collection<Word<I>> initialSplitters() {
308+
static <I> Collection<Word<I>> initialSplitters() {
309309
return Collections.emptyList();
310310
}
311311
}

algorithms/active/kearns-vazirani/src/main/java/de/learnlib/algorithm/kv/dfa/KearnsVaziraniDFA.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,24 +363,24 @@ private BuilderDefaults() {
363363
// prevent instantiation
364364
}
365365

366-
public static boolean repeatedCounterexampleEvaluation() {
366+
static boolean repeatedCounterexampleEvaluation() {
367367
return true;
368368
}
369369

370-
public static AcexAnalyzer counterexampleAnalyzer() {
370+
static AcexAnalyzer counterexampleAnalyzer() {
371371
return AcexAnalyzers.LINEAR_FWD;
372372
}
373373
}
374374

375-
protected class KVAbstractCounterexample extends AbstractBaseCounterexample<Boolean> {
375+
private class KVAbstractCounterexample extends AbstractBaseCounterexample<Boolean> {
376376

377377
private final Word<I> ceWord;
378378
private final MembershipOracle<I, Boolean> oracle;
379379
private final StateInfo<I, Boolean>[] states;
380380
private final LCAInfo<Boolean, AbstractWordBasedDTNode<I, Boolean, StateInfo<I, Boolean>>>[] lcas;
381381

382382
@SuppressWarnings("unchecked")
383-
public KVAbstractCounterexample(Word<I> ceWord, boolean output, MembershipOracle<I, Boolean> oracle) {
383+
KVAbstractCounterexample(Word<I> ceWord, boolean output, MembershipOracle<I, Boolean> oracle) {
384384
super(ceWord.length() + 1);
385385
this.ceWord = ceWord;
386386
this.oracle = oracle;
@@ -401,11 +401,11 @@ public KVAbstractCounterexample(Word<I> ceWord, boolean output, MembershipOracle
401401
lcas[m] = new LCAInfo<>(discriminationTree.getRoot(), !output, output);
402402
}
403403

404-
public StateInfo<I, Boolean> getStateInfo(int idx) {
404+
StateInfo<I, Boolean> getStateInfo(int idx) {
405405
return states[idx];
406406
}
407407

408-
public LCAInfo<Boolean, AbstractWordBasedDTNode<I, Boolean, StateInfo<I, Boolean>>> getLCA(int idx) {
408+
LCAInfo<Boolean, AbstractWordBasedDTNode<I, Boolean, StateInfo<I, Boolean>>> getLCA(int idx) {
409409
return lcas[idx];
410410
}
411411

algorithms/active/kearns-vazirani/src/main/java/de/learnlib/algorithm/kv/mealy/KearnsVaziraniMealy.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,24 +378,24 @@ private BuilderDefaults() {
378378
// prevent instantiation
379379
}
380380

381-
public static boolean repeatedCounterexampleEvaluation() {
381+
static boolean repeatedCounterexampleEvaluation() {
382382
return true;
383383
}
384384

385-
public static AcexAnalyzer counterexampleAnalyzer() {
385+
static AcexAnalyzer counterexampleAnalyzer() {
386386
return AcexAnalyzers.LINEAR_FWD;
387387
}
388388
}
389389

390-
protected class KVAbstractCounterexample extends AbstractBaseCounterexample<Boolean> {
390+
private class KVAbstractCounterexample extends AbstractBaseCounterexample<Boolean> {
391391

392392
private final Word<I> ceWord;
393393
private final MembershipOracle<I, Word<O>> oracle;
394394
private final StateInfo<I, Word<O>>[] states;
395395
private final LCAInfo<Word<O>, @Nullable AbstractWordBasedDTNode<I, Word<O>, StateInfo<I, Word<O>>>>[] lcas;
396396

397397
@SuppressWarnings("unchecked")
398-
public KVAbstractCounterexample(Word<I> ceWord, Word<O> output, MembershipOracle<I, Word<O>> oracle) {
398+
KVAbstractCounterexample(Word<I> ceWord, Word<O> output, MembershipOracle<I, Word<O>> oracle) {
399399
super(ceWord.length() + 1);
400400
this.ceWord = ceWord;
401401
this.oracle = oracle;
@@ -418,11 +418,11 @@ public KVAbstractCounterexample(Word<I> ceWord, Word<O> output, MembershipOracle
418418
super.setEffect(m, false);
419419
}
420420

421-
public StateInfo<I, Word<O>> getStateInfo(int idx) {
421+
StateInfo<I, Word<O>> getStateInfo(int idx) {
422422
return states[idx];
423423
}
424424

425-
public LCAInfo<Word<O>, @Nullable AbstractWordBasedDTNode<I, Word<O>, StateInfo<I, Word<O>>>> getLCA(int idx) {
425+
LCAInfo<Word<O>, @Nullable AbstractWordBasedDTNode<I, Word<O>, StateInfo<I, Word<O>>>> getLCA(int idx) {
426426
return lcas[idx];
427427
}
428428

algorithms/active/lsharp/src/main/java/de/learnlib/algorithm/lsharp/LSharpMealy.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,23 +354,23 @@ private BuilderDefaults() {
354354
// prevent instantiation
355355
}
356356

357-
public static Rule2 rule2() {
357+
static Rule2 rule2() {
358358
return Rule2.ADS;
359359
}
360360

361-
public static Rule3 rule3() {
361+
static Rule3 rule3() {
362362
return Rule3.ADS;
363363
}
364364

365-
public static <I> @Nullable Word<I> sinkState() {
365+
static <I> @Nullable Word<I> sinkState() {
366366
return null;
367367
}
368368

369-
public static <O> @Nullable O sinkOutput() {
369+
static <O> @Nullable O sinkOutput() {
370370
return null;
371371
}
372372

373-
public static Random random() {
373+
static Random random() {
374374
return new Random();
375375
}
376376
}

algorithms/active/lsharp/src/test/java/de/learnlib/algorithm/lsharp/NormalObservationTreeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private List<Pair<Word<String>, Word<String>>> tryGenInputs(MealyMachine<?, Stri
7474
}
7575

7676
@Test
77-
public void xferSeqMantained() throws IOException, FormatException {
77+
public void xferSeqMaintained() throws IOException, FormatException {
7878
InputModelData<String, CompactMealy<String, String>> model = readMealy("/BitVise.dot");
7979
CompactMealy<String, String> fsm = model.model;
8080
Alphabet<String> alphabet = model.alphabet;
@@ -110,7 +110,7 @@ public void xferSeqMantained() throws IOException, FormatException {
110110
}
111111

112112
@Test
113-
public void accessSeqMantained() throws IOException, FormatException {
113+
public void accessSeqMaintained() throws IOException, FormatException {
114114
InputModelData<String, CompactMealy<String, String>> model = readMealy("/BitVise.dot");
115115
CompactMealy<String, String> fsm = model.model;
116116
Alphabet<String> alphabet = model.alphabet;

algorithms/active/lstar/src/main/java/de/learnlib/algorithm/lstar/AbstractAutomatonLStar.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ public void resume(AutomatonLStarState<I, D, AI, S> state) {
205205
}
206206
}
207207

208+
// the class should only be visible to children but they need to be able to access the getters without extending
209+
@SuppressWarnings("PMD.PublicMemberInNonPublicType")
208210
protected static final class StateInfo<S, I> {
209211

210212
private final Row<I> row;

algorithms/active/lstar/src/main/java/de/learnlib/algorithm/lstar/mmlt/MMLTHypothesis.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ public class MMLTHypothesis<I, O> extends CompactMMLT<I, O> {
4040

4141
MMLTHypothesis(Alphabet<I> alphabet,
4242
int sizeHint,
43-
O silentOuput,
43+
O silentOutput,
4444
SymbolCombiner<O> outputCombiner,
4545
Map<Integer, Word<TimedInput<I>>> prefixMap) {
46-
super(alphabet, sizeHint, silentOuput, outputCombiner);
46+
super(alphabet, sizeHint, silentOutput, outputCombiner);
4747
this.prefixMap = prefixMap;
4848
}
4949

algorithms/active/observation-pack-vpa/src/main/java/de/learnlib/algorithm/observationpack/vpa/OPLearnerVPA.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ protected boolean refineHypothesisSingle(DefaultQuery<I, Boolean> ceQuery) {
125125
return true;
126126
}
127127

128+
// the class should only be visible to children but they need to be able to access the getters without extending
129+
@SuppressWarnings("PMD.PublicMemberInNonPublicType")
128130
protected class PrefixTransformAcex extends AbstractBaseCounterexample<Boolean> {
129131

130132
private final Word<I> suffix;

algorithms/active/observation-pack-vpa/src/main/java/de/learnlib/algorithm/observationpack/vpa/hypothesis/DTNode.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import de.learnlib.datastructure.discriminationtree.iterators.DiscriminationTreeIterators;
2222
import de.learnlib.datastructure.discriminationtree.model.AbstractTemporaryIntrusiveDTNode;
2323
import de.learnlib.datastructure.discriminationtree.model.BooleanMap;
24-
import de.learnlib.datastructure.list.IntrusiveListEntry;
2524

2625
/**
2726
* Specific discrimination tree node implementation.
@@ -30,8 +29,7 @@
3029
* input symbol type
3130
*/
3231
public class DTNode<I>
33-
extends AbstractTemporaryIntrusiveDTNode<ContextPair<I>, Boolean, HypLoc<I>, TransList<I>, DTNode<I>>
34-
implements IntrusiveListEntry<DTNode<I>> {
32+
extends AbstractTemporaryIntrusiveDTNode<ContextPair<I>, Boolean, HypLoc<I>, TransList<I>, DTNode<I>> {
3533

3634
private final TransList<I> nonTreeIncoming = new TransList<>();
3735

0 commit comments

Comments
 (0)