当前位置: 首页>>代码示例>>Java>>正文


Java Query类代码示例

本文整理汇总了Java中de.learnlib.api.Query的典型用法代码示例。如果您正苦于以下问题:Java Query类的具体用法?Java Query怎么用?Java Query使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Query类属于de.learnlib.api包,在下文中一共展示了Query类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public final void processQueries(
        Collection<? extends Query<SymbolicMethodSymbol, Boolean>> clctn) {
  
  ArrayList<Query<SymbolicMethodSymbol, Boolean>> queries = new ArrayList<>();
  for (Query<SymbolicMethodSymbol, Boolean> q : clctn) {
    boolean test = evaluateQuery(q);
    if (!test) {
      q.answer(false);
      continue;
    }
    
    if (next == null) {
      q.answer(true);
      continue;
    }
    
    queries.add(q);
  }
  
  if (!queries.isEmpty()) {
    next.processQueries(queries);
  }
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:25,代码来源:MethodExecutionFilter.java

示例2: processQuery

import de.learnlib.api.Query; //导入依赖的package包/类
private void processQuery(
        Query<SymbolicMethodSymbol, SymbolicQueryOutput> query) {
  Word<SymbolicQueryOutput> out = getPotentialOutput(query.getInput());
  int uniformIdx = getUniformIndex(out);
  if (uniformIdx == 0) {
    query.answer(SymbolicQueryOutput.OK);
    return;
  }
    
  if (uniformIdx == out.length()) {
    this.oracle.processQueries(Collections.singleton(query));
    return;
  }
  
  Word<SymbolicMethodSymbol> prefix = query.getInput().prefix(uniformIdx);
  DefaultQuery<SymbolicMethodSymbol, SymbolicQueryOutput> dQuery = 
          new DefaultQuery<>(prefix);
  
  this.oracle.processQueries(Collections.singleton(dQuery));
  query.answer(dQuery.getOutput());
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:22,代码来源:UniformOKSuffixFilter.java

示例3: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public void processQueries(Collection<? extends Query<I, Word<D>>> queries) {
	for (Query<I,Word<D>> q : queries) {
		Word<D> output = answerQuery(q.getPrefix(), q.getSuffix());
		q.answer(output);
	}
}
 
开发者ID:jderuiter,项目名称:statelearner,代码行数:8,代码来源:LogOracle.java

示例4: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public void processQueries(Collection<? extends Query<SymbolicMethodSymbol, SymbolicExecutionResult>> clctn) {
  for (Query<SymbolicMethodSymbol, SymbolicExecutionResult> query : clctn) {
    SymbolicExecutionResult result = processQuery(query.getInput());
    query.answer(result);
  }
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:8,代码来源:JDartOracle.java

示例5: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public void processQueries(Collection<? extends 
        Query<SymbolicMethodSymbol, SymbolicQueryOutput>> clctn) {
  for (Query<SymbolicMethodSymbol, SymbolicQueryOutput> query : clctn) {
    if (termination.isDone()) {
      throw new Terminate(termination);
    }
    this.oracle.processQueries(Collections.singleton(query));
  }
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:11,代码来源:TerminationCheckOracle.java

示例6: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public void processQueries(Collection<? extends Query<SymbolicMethodSymbol, SymbolicQueryOutput>> clctn) {
  ArrayList<WrapperQuery> queries = new ArrayList<>();
  for (Query<SymbolicMethodSymbol, SymbolicQueryOutput> q : clctn) {
    queries.add(new WrapperQuery(q));
  }
  this.oracle.processQueries(queries);
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:9,代码来源:SymbolicExecutionOracleWrapper.java

示例7: 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());
  }
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:14,代码来源:RefinementCheckOracle.java

示例8: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public void processQueries(
        Collection<? extends 
              Query<SymbolicMethodSymbol, SymbolicExecutionResult>> clctn) {
  for (Query<SymbolicMethodSymbol, SymbolicExecutionResult> query : clctn) {
    processQuery(query);
  }
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:9,代码来源:SummaryOracle.java

示例9: processQuery

import de.learnlib.api.Query; //导入依赖的package包/类
private void processQuery(
        Query<SymbolicMethodSymbol, SymbolicExecutionResult> query) {
  
  ArrayList<Path> ok  = new ArrayList<>(); 
  ArrayList<Path> err = new ArrayList<>(); 
  ArrayList<Path> dk  = new ArrayList<>(); 
  
  Collection<PathQuery> paths = PathUtil.explode(query.getInput(), inputs);
  for (PathQuery q : paths) {      
    Path p = PathUtil.executeSymbolically(
            q.getMethods(), q.getPaths(), inputs.getInitialValuation());
    
    // TODO: maybe add model to path 
    if (!sat(p.getPathCondition())) {
      continue;
    }
    switch (p.getState()) {
      case OK:
        ok.add(p);
        break;
      case ERROR:
        err.add(p);
        break;
      case DONT_KNOW:
        dk.add(p);
        break;
    }
  }
  
  query.answer(new SymbolicExecutionResult(ok, err, dk));
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:32,代码来源:SummaryOracle.java

示例10: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public void processQueries(Collection<? extends Query<SymbolicMethodSymbol,
        SymbolicQueryOutput>> clctn) {
  Collection<Query<SymbolicMethodSymbol, SymbolicQueryOutput>> lCol =
          new ArrayList<>();
  for (Query<SymbolicMethodSymbol, SymbolicQueryOutput> query : clctn) {
    lCol.add(new LoggingQuery(query));
  }
  this.oracle.processQueries(lCol);
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:11,代码来源:QueryLogger.java

示例11: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public void processQueries(
        Collection<? extends 
                Query<SymbolicMethodSymbol, SymbolicQueryOutput>> clctn) {

  for (Query<SymbolicMethodSymbol, SymbolicQueryOutput> q : clctn) {
    processQuery(q);
  }
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:10,代码来源:Cache.java

示例12: 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);   
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:16,代码来源:Cache.java

示例13: 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());
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:8,代码来源:InterpolationCache.java

示例14: 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;
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:30,代码来源:PORFilter.java

示例15: processQueries

import de.learnlib.api.Query; //导入依赖的package包/类
@Override
public void processQueries(Collection<? extends 
        Query<SymbolicMethodSymbol, SymbolicQueryOutput>> clctn) {
  for (Query<SymbolicMethodSymbol, SymbolicQueryOutput> query : clctn) {
    processQuery(query);
  }
}
 
开发者ID:psycopaths,项目名称:psyco,代码行数:8,代码来源:UniformErrorFilter.java


注:本文中的de.learnlib.api.Query类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。