Package stanfordlogic.prover

Examples of stanfordlogic.prover.Expression


    public void testGroundProofWithRule()
    {
        GdlList succs = parser_.parse("(succ 1 2)");
        addFacts(succs);
       
        Expression conjunct = GroundFact.fromList( parser_.parse("succ 1 2") );
        Implication rule = new Implication( GroundFact.fromList(parser_.parse("gt 2 1")), conjunct);
       
        ArrayList<Implication> rules = new ArrayList<Implication>();
        rules.add(rule);
       
View Full Code Here


    public void testGroundProofWithRuleAndVars()
    {
        GdlList succs = parser_.parse("(succ 1 2) (succ 2 2) (succ 1 3)");
        addFacts(succs);
       
        Expression conjunct = VariableFact.fromList( parser_.parse("succ 1 ?x") );
        Implication rule = new Implication( VariableFact.fromList(parser_.parse("gt ?x 1")), conjunct);
       
        ArrayList<Implication> rules = new ArrayList<Implication>();
        rules.add(rule);
       
View Full Code Here

    public void testGroundProofWithRulesAndVars()
    {
        GdlList succs = parser_.parse("(succ 1 2) (succ 2 2) (succ 1 3)");
        addFacts(succs);
       
        Expression conjunct = VariableFact.fromList( parser_.parse("succ 2 ?x") );
        Implication rule = new Implication( VariableFact.fromList(parser_.parse("gt ?x 1")), conjunct);
       
        Expression conjunct2 = VariableFact.fromList( parser_.parse("succ ?y ?x") );
        Implication rule2 = new Implication( VariableFact.fromList(parser_.parse("gt ?x ?y")), conjunct2);
       
        ArrayList<Implication> rules = new ArrayList<Implication>();
        rules.add(rule);
        rules.add(rule2);
View Full Code Here

    public void testGroundProofWithMultiConjunction()
    {
        GdlList succs = parser_.parse("(succ 1 2) (succ 2 2) (succ 1 3) (succ 2 3) (succ 3 2)");
        addFacts(succs);
       
        Expression conjunct = VariableFact.fromList( parser_.parse("succ 2 ?x") );
        Expression conjunct2 = VariableFact.fromList( parser_.parse("succ ?x 2") );
        Implication rule = new Implication( VariableFact.fromList(parser_.parse("gt ?x")), conjunct, conjunct2);
       
        ArrayList<Implication> rules = new ArrayList<Implication>();
        rules.add(rule);
       
View Full Code Here

    public void testGroundProofWithLevels()
    {
        GdlList succs = parser_.parse("(succ 1 2) (succ 2 2) (succ 1 3) (succ 2 3) (succ 3 2) (succ 2 1)");
        addFacts(succs);
       
        Expression conjunct = VariableFact.fromList( parser_.parse("succ 2 ?x") );
        Expression conjunct2 = VariableFact.fromList( parser_.parse("pop ?x") );
        Implication rule = new Implication( VariableFact.fromList(parser_.parse("gt ?x")), conjunct, conjunct2);
       
        Expression conjunct3 = VariableFact.fromList( parser_.parse("succ ?y 2") );
        Implication rule2 = new Implication( VariableFact.fromList(parser_.parse("pop ?y")), conjunct3);
       
        ArrayList<Implication> rules = new ArrayList<Implication>();
        rules.add(rule);
        rules.add(rule2);
View Full Code Here

TOP

Related Classes of stanfordlogic.prover.Expression

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.