Examples of askAll()


Examples of org.ggp.base.util.prover.aima.AimaProver.askAll()

      StateMachine sm = new ProverStateMachine();
      sm.initialize(theGame.getRules());

      AimaProver prover = new AimaProver(theGame.getRules());
      GdlSentence basesQuery = GdlPool.getRelation(BASE, new GdlTerm[] {X});
      Set<GdlSentence> bases = prover.askAll(basesQuery, Collections.<GdlSentence>emptySet());
      GdlSentence inputsQuery = GdlPool.getRelation(INPUT, new GdlTerm[] {X, Y});
      Set<GdlSentence> inputs = prover.askAll(inputsQuery, Collections.<GdlSentence>emptySet());

      if (bases.size() == 0) {
        throw new ValidatorException("Could not find base propositions.");
View Full Code Here

Examples of org.ggp.base.util.prover.aima.AimaProver.askAll()

      AimaProver prover = new AimaProver(theGame.getRules());
      GdlSentence basesQuery = GdlPool.getRelation(BASE, new GdlTerm[] {X});
      Set<GdlSentence> bases = prover.askAll(basesQuery, Collections.<GdlSentence>emptySet());
      GdlSentence inputsQuery = GdlPool.getRelation(INPUT, new GdlTerm[] {X, Y});
      Set<GdlSentence> inputs = prover.askAll(inputsQuery, Collections.<GdlSentence>emptySet());

      if (bases.size() == 0) {
        throw new ValidatorException("Could not find base propositions.");
      } else if (inputs.size() == 0) {
        throw new ValidatorException("Could not find input propositions.");
View Full Code Here

Examples of org.ggp.base.util.prover.aima.AimaProver.askAll()

      Multimap<SentenceForm, GdlSentence> sentencesByForm,
      SentenceFormModel model) throws InterruptedException {
    AimaProver prover = new AimaProver(model.getDescription());
    for (SentenceForm form : model.getConstantSentenceForms()) {
      GdlSentence query = form.getSentenceFromTuple(getVariablesTuple(form.getTupleSize()));
      for (GdlSentence result : prover.askAll(query, ImmutableSet.<GdlSentence>of())) {
        ConcurrencyUtils.checkForInterruption();
        //Variables may end up being replaced with functions, which is not
        //what we want here, so we have to double-check that the form is correct.
        if (form.matches(result)) {
          sentencesByForm.put(form, result);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.