Package stanfordlogic.prover

Examples of stanfordlogic.prover.ProofContext


        KnowledgeBase kb = new BasicKB();
       
        kb.setTrue(does);
        kb.setTrue(does2);
       
        ProofContext context = new ProofContext(kb, parser_);
       
        List<GroundFact> results = r.getAllAnswers( question, context );
       
        assertEquals(10, results.size());
    }
View Full Code Here


            kb.setTrue(move);
        }
       
        Fact nextQuestion = Fact.fromExpression(parser_.parse("next ?x"));
       
        ProofContext context = new ProofContext(kb, parser_);
       
        List<GroundFact> nexts = r.getAllAnswers(nextQuestion, context);
       
        KnowledgeBase newKb = new BasicKB();
       
View Full Code Here

       
        AbstractReasoner reasoner = new BasicReasoner(staticKb, rules, parser_);
       
        Fact question = VariableFact.fromList( parser_.parse("init ?x") );
       
        ProofContext context = new ProofContext(volatileKb, parser_);
       
        List<GroundFact> init = reasoner.getAllAnswers( question, context );
       
        // Make sure that we have a cache for all the initial truths
        assertEquals( 18, init.size() );
View Full Code Here

       
        AbstractReasoner reasoner = new BasicReasoner(staticKb, rules, parser_);
       
        Fact question = VariableFact.fromList( parser_.parse("init ?x") );
       
        ProofContext context = new ProofContext(volatileKb, parser_);
       
        List<GroundFact> init = reasoner.getAllAnswers( question, context );
       
        assertEquals(66, init.size());
       
View Full Code Here

        KnowledgeBase kb = new BasicKB();
        Iterable<GroundFact> inits = stanfordlogicReasoner.getAllAnswers(queryInit);
        for (GroundFact init : inits) {
          kb.setTrue(trueProcessor.processFact(init));
        }
        return new ProofContext(kb, parser);
  }
View Full Code Here

    Iterable<GroundFact> nextFacts=stanfordlogicReasoner.getAllAnswersIterable(queryNext, state);
        KnowledgeBase kb = new BasicKB();
        for (GroundFact fact : nextFacts) {
          kb.setTrue(trueProcessor.processFact(fact));
        }
    return new ProofContext(kb, parser);
  }
View Full Code Here

        KnowledgeBase kb = new BasicKB();
        for(GroundFact fact : facts)
        {
            kb.setTrue(fact);
        }
        return new ProofContext(kb, GameManager.getParser());
    }
View Full Code Here

    }

    @Override
    public RState next(Collection<RAction> actions)
    {
        ProofContext context = getContext();
       
        for(RAction action : actions)
        {
            context.getVolatileKb().setTrue(action.getGroundFact());
        }
       
        List<GroundFact> nextfacts = reasoner.getAllAnswers(reasoner.getQueryNext(), context);
        Set<GroundFact> newfacts = new HashSet<GroundFact>();
       
View Full Code Here

       
        for (GroundFact init : inits) {
            currentState_.setTrue(trueProcessor_.processFact(init));
        }
       
        currentContext_ = new ProofContext(currentState_, parser_);
    }
View Full Code Here

        if (stateLogger_.isLoggable(Level.FINE)) {
            stateLogger_.fine(gameId_ + "   -      New: " + currentState_.stateToGdl());
        }
       
        // Create a new proof context
        currentContext_ = new ProofContext(currentState_, parser_);
    }
View Full Code Here

TOP

Related Classes of stanfordlogic.prover.ProofContext

Copyright © 2018 www.massapicom. 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.