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

LearnLib / automatalib / 6763327895

05 Nov 2023 07:29PM UTC coverage: 89.726% (-0.1%) from 89.868%
6763327895

push

github

mtf90
fix typo

4 of 4 new or added lines in 4 files covered. (100.0%)

99 existing lines in 18 files now uncovered.

15677 of 17472 relevant lines covered (89.73%)

1.66 hits per line

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

33.33
/incremental/src/main/java/net/automatalib/incremental/dfa/IncrementalDFABuilder.java
1
/* Copyright (C) 2013-2023 TU Dortmund
2
 * This file is part of AutomataLib, http://www.automatalib.net/.
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 net.automatalib.incremental.dfa;
17

18
import net.automatalib.alphabet.SupportsGrowingAlphabet;
19
import net.automatalib.automaton.fsa.DFA;
20
import net.automatalib.graph.Graph;
21
import net.automatalib.incremental.ConflictException;
22
import net.automatalib.incremental.IncrementalConstruction;
23
import net.automatalib.ts.UniversalDTS;
24
import net.automatalib.word.Word;
25

26
/**
27
 * General interface for incremental DFA builders.
28
 *
29
 * @param <I>
30
 *         input symbol type
31
 */
32
public interface IncrementalDFABuilder<I> extends IncrementalConstruction<DFA<?, I>, I>, SupportsGrowingAlphabet<I> {
33

34
    /**
35
     * Looks up the tri-state acceptance value for a given word.
36
     *
37
     * @param inputWord
38
     *         the word
39
     *
40
     * @return the tri-state acceptance value for this word.
41
     */
42
    Acceptance lookup(Word<? extends I> inputWord);
43

44
    /**
45
     * Inserts a new word into the automaton, with a given acceptance value.
46
     *
47
     * @param word
48
     *         the word to insert
49
     * @param accepting
50
     *         whether this word should be marked as accepting
51
     *
52
     * @throws ConflictException
53
     *         if the newly provided information conflicts with existing information
54
     */
55
    void insert(Word<? extends I> word, boolean accepting);
56

57
    /**
58
     * Inserts a new word into the automaton. This is a convenience method equivalent to invoking {@code insert(word,
59
     * true)}.
60
     *
61
     * @param word
62
     *         the word to insert
63
     *
64
     * @throws ConflictException
65
     *         if the newly provided information conflicts with existing information
66
     * @see #insert(Word, boolean)
67
     */
68
    default void insert(Word<? extends I> word) {
UNCOV
69
        insert(word, true);
×
UNCOV
70
    }
×
71

72
    @Override
73
    default boolean hasDefinitiveInformation(Word<? extends I> word) {
74
        return lookup(word) != Acceptance.DONT_KNOW;
2✔
75
    }
76

77
    @Override
78
    Graph<?, ?> asGraph();
79

80
    @Override
81
    UniversalDTS<?, I, ?, Acceptance, Void> asTransitionSystem();
82

83
}
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