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

LearnLib / learnlib / 12976289299

26 Jan 2025 04:11PM UTC coverage: 94.389% (+0.1%) from 94.288%
12976289299

Pull #141

github

web-flow
Merge a2d6e458d into bf66741db
Pull Request #141: L# Algorithm

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