• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LearnLib / learnlib / 12999975393

27 Jan 2025 11:00PM UTC coverage: 94.389% (+0.1%) from 94.288%
12999975393

push

github

web-flow
L# Algorithm (#141)

* feat: lsharp

* fix: LSoracle Rule3 SepSeq mode

* fix: tidy pom

* chore: tidy imports

* chore: spotbugs

* chore: spotbugs

* chore: spotbugs

* chore: spotbugs

* chore: spotbugs

* chore: pmd

* chore: pmd

* chore: pmd

* chore: pmd

* chore: pmd

* chore: pmd

* chore: checkstyle

* chore: checkstyle

* chore: checkstyle

* chore: checkstyle

* fix: use SymbolQueryOracle instead of MembershipOracle in LSharp
Thanks to @stateMachinist for noticing this issue and providing us with
a patch.

Co-authored-by: stateMachinist

* chore: update CI

* chore: update CI

* chore: remove L# test. I couldn't get it to work with MealyIT given the use of the SymbolQueryOracle.

* update to latest refactorings

* restore old integration test

* initial cleanup

drop dead code and make code analysis plugins happy

* replace LSMealyMachine with CompactMealy

* determinize integration tests

* de-stream-ify code

not having to deal with multithreading (and therefore not having to deal with synchronization) sped up integration tests by a factor of >30

* do not use exceptions for control flow

* cleanup dependencies

drop guava

* fix issues reported by checkerframework

* include into existing hierarchies

* general cleanups

* documentation

* ignore LSharp builder in coverage

* add comment detailing the scope of the implementation

---------

Co-authored-by: Markus Frohme <mtf90@users.noreply.github.com>
Co-authored-by: Markus Frohme <markus.frohme@udo.edu>

629 of 653 new or added lines in 13 files covered. (96.32%)

12414 of 13152 relevant lines covered (94.39%)

1.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/algorithms/active/lsharp/src/main/java/de/learnlib/algorithm/lsharp/ObservationTree.java
1
/* Copyright (C) 2013-2025 TU Dortmund University
2
 * This file is part of LearnLib <https://learnlib.de>.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package de.learnlib.algorithm.lsharp;
17

18
import net.automatalib.alphabet.Alphabet;
19
import net.automatalib.common.util.Pair;
20
import net.automatalib.word.Word;
21
import org.checkerframework.checker.nullness.qual.Nullable;
22

23
public interface ObservationTree<S extends Comparable<S>, I, O> {
24

25
    S defaultState();
26

27
    S insertObservation(@Nullable S start, Word<I> input, Word<O> output);
28

29
    Word<I> getAccessSeq(S state);
30

31
    Word<I> getTransferSeq(S toState, S fromState);
32

33
    @Nullable Word<O> getObservation(@Nullable S start, Word<I> input);
34

35
    @Nullable Pair<O, S> getOutSucc(S src, I input);
36

37
    default @Nullable O getOut(S src, I input) {
38
        Pair<O, S> out = this.getOutSucc(src, input);
2✔
39
        if (out == null) {
2✔
NEW
40
            return null;
×
41
        }
42

43
        return out.getFirst();
2✔
44
    }
45

46
    @Nullable S getSucc(S src, Word<I> input);
47

48
    Alphabet<I> getInputAlphabet();
49

50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc