本文整理匯總了Java中de.learnlib.api.Query.getInput方法的典型用法代碼示例。如果您正苦於以下問題:Java Query.getInput方法的具體用法?Java Query.getInput怎麽用?Java Query.getInput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類de.learnlib.api.Query
的用法示例。
在下文中一共展示了Query.getInput方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: processQueries
import de.learnlib.api.Query; //導入方法依賴的package包/類
@Override
public void processQueries(Collection<? extends
Query<SymbolicMethodSymbol, SymbolicQueryOutput>> clctn) {
for (Query<SymbolicMethodSymbol, SymbolicQueryOutput> query : clctn) {
DefaultQuery<SymbolicMethodSymbol, SymbolicQueryOutput> _query =
new DefaultQuery<>(query.getInput());
this.oracle.processQueries(Collections.singleton(_query));
if (!_query.getOutput().isUniform()) {
throw new RefinementNeeded(_query);
}
query.answer(_query.getOutput());
}
}
示例2: processQuery
import de.learnlib.api.Query; //導入方法依賴的package包/類
private void processQuery(Query<SymbolicMethodSymbol,
SymbolicQueryOutput> q) {
String[] test = queryToString(q.getInput());
SymbolicQueryOutput result = table.getSimulatedResult(test);
if (result == null) {
DefaultQuery<SymbolicMethodSymbol, SymbolicQueryOutput> defq =
new DefaultQuery<>(q.getInput());
this.oracle.processQueries(Collections.singleton(defq));
result = defq.getOutput();
table.setResult(test, result);
}
q.answer(result);
}
示例3: processQuery
import de.learnlib.api.Query; //導入方法依賴的package包/類
private void processQuery(Query<SymbolicMethodSymbol,
SymbolicQueryOutput> query) {
Word<SymbolicMethodSymbol> sEps = Word.epsilon();
Word<Path> pEps = Word.epsilon();
ExecutionTree tree = new ExecutionTree(pEps, sEps, query.getInput());
query.answer(tree.getOutput());
}
示例4: evaluateQuery
import de.learnlib.api.Query; //導入方法依賴的package包/類
@Override
public boolean evaluateQuery(Query<SymbolicMethodSymbol, Boolean> query) {
Word<SymbolicMethodSymbol> input = query.getInput();
// constructor + 1 will always be executed
if (input.size() < 3) {
return false;
}
String lastName = input.getSymbol(1).getConcolicMethodConfig().getId();
Pair<BitSet,BitSet> lastMethod = po.get(lastName);
for (int i=2; i<input.size(); i++) {
String curName = input.getSymbol(i).getConcolicMethodConfig().getId();
Pair<BitSet,BitSet> cur = po.get(curName);
if (cur != null && lastMethod != null) {
if (curName.compareTo(lastName) < 0
&& !lastMethod._1.intersects(cur._2) // read-write
&& !lastMethod._2.intersects(cur._1) // write-read
&& !lastMethod._2.intersects(cur._2) // write-write
) {
return false;
}
}
lastName = curName;
lastMethod = cur;
}
return true;
}