Search in sources :

Example 1 with FactsPlugin

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

the class FactsPluginTest method test.

@Test
public void test() throws LogicProgramException {
    APROptions apr = new APROptions();
    FactsPlugin p = FactsPlugin.load(apr, new File(GrounderTest.FACTS), false);
    WamProgram program = new WamBaseProgram();
    Query q = Query.parse("validClass(X)");
    StateProofGraph pg = new StateProofGraph(q, apr, program, p);
    Prover prover = new DprProver();
    Map<String, Double> sols = prover.solutions(pg, new StatusLogger());
    assertEquals(2, sols.size());
}
Also used : StatusLogger(edu.cmu.ml.proppr.util.StatusLogger) Query(edu.cmu.ml.proppr.prove.wam.Query) DprProver(edu.cmu.ml.proppr.prove.DprProver) Prover(edu.cmu.ml.proppr.prove.Prover) DprProver(edu.cmu.ml.proppr.prove.DprProver) WamProgram(edu.cmu.ml.proppr.prove.wam.WamProgram) StateProofGraph(edu.cmu.ml.proppr.prove.wam.StateProofGraph) FactsPlugin(edu.cmu.ml.proppr.prove.wam.plugins.FactsPlugin) APROptions(edu.cmu.ml.proppr.util.APROptions) File(java.io.File) WamBaseProgram(edu.cmu.ml.proppr.prove.wam.WamBaseProgram) Test(org.junit.Test) GrounderTest(edu.cmu.ml.proppr.GrounderTest)

Aggregations

GrounderTest (edu.cmu.ml.proppr.GrounderTest)1 DprProver (edu.cmu.ml.proppr.prove.DprProver)1 Prover (edu.cmu.ml.proppr.prove.Prover)1 Query (edu.cmu.ml.proppr.prove.wam.Query)1 StateProofGraph (edu.cmu.ml.proppr.prove.wam.StateProofGraph)1 WamBaseProgram (edu.cmu.ml.proppr.prove.wam.WamBaseProgram)1 WamProgram (edu.cmu.ml.proppr.prove.wam.WamProgram)1 FactsPlugin (edu.cmu.ml.proppr.prove.wam.plugins.FactsPlugin)1 APROptions (edu.cmu.ml.proppr.util.APROptions)1 StatusLogger (edu.cmu.ml.proppr.util.StatusLogger)1 File (java.io.File)1 Test (org.junit.Test)1