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

LearnLib / automatalib / 13138848026

04 Feb 2025 02:53PM UTC coverage: 92.108% (+2.2%) from 89.877%
13138848026

push

github

mtf90
[maven-release-plugin] prepare release automatalib-0.12.0

16609 of 18032 relevant lines covered (92.11%)

1.7 hits per line

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

83.33
/api/src/main/java/net/automatalib/automaton/fsa/DFA.java
1
/* Copyright (C) 2013-2025 TU Dortmund University
2
 * This file is part of AutomataLib <https://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.automaton.fsa;
17

18
import java.util.Collection;
19

20
import net.automatalib.automaton.UniversalDeterministicAutomaton;
21
import net.automatalib.automaton.concept.DetSuffixOutputAutomaton;
22
import net.automatalib.ts.acceptor.DeterministicAcceptorTS;
23

24
/**
25
 * Deterministic finite state acceptor.
26
 */
27
public interface DFA<S, I> extends UniversalDeterministicAutomaton<S, I, S, Boolean, Void>,
28
                                   DeterministicAcceptorTS<S, I>,
29
                                   DetSuffixOutputAutomaton<S, I, S, Boolean>,
30
                                   NFA<S, I> {
31

32
    @Override
33
    default Boolean computeSuffixOutput(Iterable<? extends I> prefix, Iterable<? extends I> suffix) {
34
        S tgt = getState(prefix);
1✔
35
        return tgt != null && computeStateOutput(tgt, suffix);
1✔
36
    }
37

38
    @Override
39
    default Boolean computeStateOutput(S state, Iterable<? extends I> input) {
40
        S tgt = getSuccessor(state, input);
1✔
41
        return tgt != null && isAccepting(tgt);
1✔
42
    }
43

44
    @Override
45
    default Boolean computeOutput(Iterable<? extends I> input) {
46
        return accepts(input);
1✔
47
    }
48

49
    @Override
50
    default boolean isAccepting(Collection<? extends S> states) {
51
        return DeterministicAcceptorTS.super.isAccepting(states);
×
52
    }
53
}
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