本文整理匯總了Java中de.learnlib.oracles.DefaultQuery.getOutput方法的典型用法代碼示例。如果您正苦於以下問題:Java DefaultQuery.getOutput方法的具體用法?Java DefaultQuery.getOutput怎麽用?Java DefaultQuery.getOutput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類de.learnlib.oracles.DefaultQuery
的用法示例。
在下文中一共展示了DefaultQuery.getOutput方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: add
import de.learnlib.oracles.DefaultQuery; //導入方法依賴的package包/類
private void add(DefaultQuery<SymbolicMethodSymbol, SymbolicQueryOutput> q,
Collection<DefaultQuery<
SymbolicMethodSymbol, SymbolicQueryOutput>> words) {
if (this.filter == null) {
words.add(q);
return;
}
DefaultQuery<SymbolicMethodSymbol, Boolean> test =
new DefaultQuery<>(q.getInput());
this.filter.processQueries(Collections.singleton(test));
if (test.getOutput()) {
words.add(q);
}
}
示例2: refine
import de.learnlib.oracles.DefaultQuery; //導入方法依賴的package包/類
public boolean refine(Word<SymbolicMethodSymbol> witness) {
DefaultQuery<SymbolicMethodSymbol, SymbolicExecutionResult> query =
new DefaultQuery<>(witness);
oracle.processQueries(Collections.singleton(query));
SymbolicExecutionResult result = query.getOutput();
SymbolicQueryOutput out = new SymbolicQueryOutput(result);
if (out.isUniform()) {
return false;
}
logger.finer("Execution result:" + result);
// refine single symbols
boolean refined = false;
int ppos = 1;
for (SymbolicMethodSymbol sms : witness) {
int pcount = sms.getArity();
Expression<Boolean> ok = projectResult(result.getOk(), ppos, pcount);
Expression<Boolean> err = projectResult(result.getError(), ppos, pcount);
Expression<Boolean> dk = projectResult(result.getDontKnow(), ppos, pcount);
Expression<Boolean> refiner = refineSymbol(sms, ok, err, dk);
if (refiner != null) {
refined = true;
inputs.refine(sms, refiner);
}
ppos += pcount;
}
return refined;
}
示例3: processQuery
import de.learnlib.oracles.DefaultQuery; //導入方法依賴的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);
}