Search in sources :

Example 1 with VariableArgument

use of edu.cmu.ml.proppr.prove.wam.VariableArgument in project ProPPR by TeamCohen.

the class QueryParserTest method testArity2.

@Test
public void testArity2() {
    Query q = Query.parse("bob(joe,X)");
    q.variabilize();
    System.out.println(q);
    checkTo0(q);
    assertEquals("head arity", 2, q.getRhs()[0].getArity());
    assertEquals("head arg0", new ConstantArgument("joe"), q.getRhs()[0].getArg(0));
    assertEquals("head arg1", new VariableArgument(-1), q.getRhs()[0].getArg(1));
}
Also used : Query(edu.cmu.ml.proppr.prove.wam.Query) ConstantArgument(edu.cmu.ml.proppr.prove.wam.ConstantArgument) VariableArgument(edu.cmu.ml.proppr.prove.wam.VariableArgument) Test(org.junit.Test)

Aggregations

ConstantArgument (edu.cmu.ml.proppr.prove.wam.ConstantArgument)1 Query (edu.cmu.ml.proppr.prove.wam.Query)1 VariableArgument (edu.cmu.ml.proppr.prove.wam.VariableArgument)1 Test (org.junit.Test)1