本文整理匯總了Java中net.automatalib.automata.UniversalDeterministicAutomaton類的典型用法代碼示例。如果您正苦於以下問題:Java UniversalDeterministicAutomaton類的具體用法?Java UniversalDeterministicAutomaton怎麽用?Java UniversalDeterministicAutomaton使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
UniversalDeterministicAutomaton類屬於net.automatalib.automata包,在下文中一共展示了UniversalDeterministicAutomaton類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: findCounterExample
import net.automatalib.automata.UniversalDeterministicAutomaton; //導入依賴的package包/類
@Override
public DefaultQuery<I, Word<O>> findCounterExample(A hypothesis, Collection<? extends I> inputs) {
UniversalDeterministicAutomaton<?, I, ?, ?, ?> aut = hypothesis;
Output<I, Word<O>> out = hypothesis;
List<Word<I>> traces = doFindTraces(aut, out, inputs);
for (Word<I> trace : traces) {
// System.out.println(testStepLimit + " " + trace.length());
// System.out.println(testStepLimit + " " + trace.length());
if (testStepLimit == 0)
return null;
DefaultQuery<I, Word<O>> query = null;
if (trace.length() < testStepLimit) {
testStepLimit -= trace.length();
query = new DefaultQuery<>(trace);
} else {
query = new DefaultQuery<>(trace.prefix((int)testStepLimit));
testStepLimit = 0;
}
sulOracle.processQuery(query);
Word<O> outputHyp = hypothesis.computeOutput(trace);
if (!outputHyp.equals(query.getOutput())){
return query;
}
}
return null;
}