Skip to content

Commit 0afeef0

Browse files
committed
MMLTs: add direct equivalence check
1 parent 8762c02 commit 0afeef0

File tree

1 file changed

+6
-0
lines changed
  • util/src/main/java/net/automatalib/util/automaton/mmlt

1 file changed

+6
-0
lines changed

util/src/main/java/net/automatalib/util/automaton/mmlt/MMLTUtil.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
*/
2020
public class MMLTUtil {
2121

22+
public static <I, O> boolean testEquivalence(MMLT<?, I, ?, O> modelA,
23+
MMLT<?, I, ?, O> modelB,
24+
Collection<TimedInput<I>> inputs) {
25+
return findSeparatingWord(modelA, modelB, inputs) == null;
26+
}
27+
2228
public static @Nullable <I, O> Word<TimedInput<I>> findSeparatingWord(MMLT<?, I, ?, O> modelA, MMLT<?, I, ?, O> modelB,
2329
Collection<TimedInput<I>> inputs) {
2430
var expandedA = ReducedMMLTSemantics.forLocalTimerMealy(modelA);

0 commit comments

Comments
 (0)