Examples of binaryResolvents()


Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    domain.addPredicate("Pred4");

    Clause c1 = new Clause();

    // Ensure that resolving to self when empty returns an empty clause
    Assert.assertNotNull(c1.binaryResolvents(c1));
    Assert.assertEquals(1, c1.binaryResolvents(c1).size());
    Assert.assertTrue(c1.binaryResolvents(c1).iterator().next().isEmpty());

    // Check if resolve with self to an empty clause
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    Clause c1 = new Clause();

    // Ensure that resolving to self when empty returns an empty clause
    Assert.assertNotNull(c1.binaryResolvents(c1));
    Assert.assertEquals(1, c1.binaryResolvents(c1).size());
    Assert.assertTrue(c1.binaryResolvents(c1).iterator().next().isEmpty());

    // Check if resolve with self to an empty clause
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    c1.addNegativeLiteral(new Predicate("Pred1", new ArrayList<Term>()));
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    Clause c1 = new Clause();

    // Ensure that resolving to self when empty returns an empty clause
    Assert.assertNotNull(c1.binaryResolvents(c1));
    Assert.assertEquals(1, c1.binaryResolvents(c1).size());
    Assert.assertTrue(c1.binaryResolvents(c1).iterator().next().isEmpty());

    // Check if resolve with self to an empty clause
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    c1.addNegativeLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    Assert.assertNotNull(c1.binaryResolvents(c1));
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    Assert.assertTrue(c1.binaryResolvents(c1).iterator().next().isEmpty());

    // Check if resolve with self to an empty clause
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    c1.addNegativeLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    Assert.assertNotNull(c1.binaryResolvents(c1));
    Assert.assertEquals(1, c1.binaryResolvents(c1).size());
    // i.e. resolving a tautology with a tautology gives you
    // back a tautology.
    Assert.assertEquals("[~Pred1(), Pred1()]", c1.binaryResolvents(c1)
        .iterator().next().toString());
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    // Check if resolve with self to an empty clause
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    c1.addNegativeLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    Assert.assertNotNull(c1.binaryResolvents(c1));
    Assert.assertEquals(1, c1.binaryResolvents(c1).size());
    // i.e. resolving a tautology with a tautology gives you
    // back a tautology.
    Assert.assertEquals("[~Pred1(), Pred1()]", c1.binaryResolvents(c1)
        .iterator().next().toString());
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    c1.addNegativeLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    Assert.assertNotNull(c1.binaryResolvents(c1));
    Assert.assertEquals(1, c1.binaryResolvents(c1).size());
    // i.e. resolving a tautology with a tautology gives you
    // back a tautology.
    Assert.assertEquals("[~Pred1(), Pred1()]", c1.binaryResolvents(c1)
        .iterator().next().toString());

    // Check if try to resolve with self and no resolvents
    c1 = new Clause();
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

        .iterator().next().toString());

    // Check if try to resolve with self and no resolvents
    c1 = new Clause();
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    Assert.assertEquals(0, c1.binaryResolvents(c1).size());

    c1 = new Clause();
    Clause c2 = new Clause();
    // Ensure that two empty clauses resolve to an empty clause
    Assert.assertNotNull(c1.binaryResolvents(c2));
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    Clause c2 = new Clause();
    // Ensure that two empty clauses resolve to an empty clause
    Assert.assertNotNull(c1.binaryResolvents(c2));
    Assert.assertEquals(1, c1.binaryResolvents(c2).size());
    Assert.assertTrue(c1.binaryResolvents(c2).iterator().next().isEmpty());
    Assert.assertNotNull(c2.binaryResolvents(c1));
    Assert.assertEquals(1, c2.binaryResolvents(c1).size());
    Assert.assertTrue(c2.binaryResolvents(c1).iterator().next().isEmpty());

    // Enusre the two complementary clauses resolve
    // to the empty clause
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    // Ensure that two empty clauses resolve to an empty clause
    Assert.assertNotNull(c1.binaryResolvents(c2));
    Assert.assertEquals(1, c1.binaryResolvents(c2).size());
    Assert.assertTrue(c1.binaryResolvents(c2).iterator().next().isEmpty());
    Assert.assertNotNull(c2.binaryResolvents(c1));
    Assert.assertEquals(1, c2.binaryResolvents(c1).size());
    Assert.assertTrue(c2.binaryResolvents(c1).iterator().next().isEmpty());

    // Enusre the two complementary clauses resolve
    // to the empty clause
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
View Full Code Here

Examples of aima.core.logic.fol.kb.data.Clause.binaryResolvents()

    Assert.assertNotNull(c1.binaryResolvents(c2));
    Assert.assertEquals(1, c1.binaryResolvents(c2).size());
    Assert.assertTrue(c1.binaryResolvents(c2).iterator().next().isEmpty());
    Assert.assertNotNull(c2.binaryResolvents(c1));
    Assert.assertEquals(1, c2.binaryResolvents(c1).size());
    Assert.assertTrue(c2.binaryResolvents(c1).iterator().next().isEmpty());

    // Enusre the two complementary clauses resolve
    // to the empty clause
    c1.addPositiveLiteral(new Predicate("Pred1", new ArrayList<Term>()));
    c2.addNegativeLiteral(new Predicate("Pred1", new ArrayList<Term>()));
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.