Examples of Fact


Examples of stanfordlogic.prover.Fact

    public void testEqualsMvr()
    {
        String s1 = "count 1 1 ?var11583106 ?var11583106";
        String s2 = "count 1 1 ?var11580908 ?var11580909";
       
        Fact f1 = Fact.fromExpression( parser_.parse(s1) );
        Fact f2 = Fact.fromExpression( parser_.parse(s2) );
       
        // Make sure f1 can't map to f2
        assertFalse(f1.canMapVariables(f2));
       
        // But, that f2 can map to f1
        assertTrue(f2.canMapVariables(f1));
    }
View Full Code Here

Examples of stanfordlogic.prover.Fact

    private Implication examineRule(GdlList rule)
    {
        // First element is the IMPLIEDBY token; ignore it.

        // Second element is the head of the rule. It's a relation (fact).
        Fact head = (Fact) examineRelation(rule.getElement(1));
       
        // Everything thereafter are the antecedent relations.
        Expression [] conjuncts = new Expression[rule.getArity()-1];
       
        // Create the conjunct list
View Full Code Here

Examples of stanfordlogic.prover.Fact

   
    protected Fact makeQuery(String ... args)
    {
        GdlList list = GdlList.buildFromWords(symbolTable_, args);
      
        Fact query = VariableFact.fromList(list);
           
        return query;
    }
View Full Code Here

Examples of stanfordlogic.prover.Fact

     * @return a list of facts answering the input query
     * @see camembert.knowledge.reasoner.getAllAnswers
     */
    protected List<GroundFact> getAllAnswers(ProofContext context, String ... args)
    {
        Fact question = makeQuery(args);
        return reasoner_.getAllAnswers(question, context);
    }
View Full Code Here

Examples of stanfordlogic.prover.Fact

        return reasoner_.getAllAnswers(question, context);
    }
   
    protected Iterable<GroundFact> getAllAnswersIterable(ProofContext context, String ... args)
    {
        Fact question = makeQuery(args);
        return reasoner_.getAllAnswersIterable(question, context);
    }
View Full Code Here

Examples of stanfordlogic.prover.Fact

     * @return a fact answering the input query
     * @see camembert.knowledge.reasoner.getAnAnswer
     */
    protected GroundFact getAnAnswer(ProofContext context, String ... args)
    {
        Fact question = makeQuery(args);
        return reasoner_.getAnAnswer(question, context);
    }
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.