Examples of convertToCNF()


Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

    // FOL B.
    origSentence = parser
        .parse("FORALL x (EXISTS y (Animal(y) AND Kills(x, y)) => FORALL z NOT(Loves(z, x)))");

    cnf = cnfConv.convertToCNF(origSentence);

    // CNF B.
    Assert.assertEquals("[~Animal(y), ~Kills(x,y), ~Loves(z,x)]",
        cnf.toString());
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

        cnf.toString());

    // FOL C.
    origSentence = parser.parse("FORALL x (Animal(x) => Loves(Jack, x))");

    cnf = cnfConv.convertToCNF(origSentence);

    // CNF C.
    Assert.assertEquals("[~Animal(x), Loves(Jack,x)]", cnf.toString());

    // FOL D.
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

    // FOL D.
    origSentence = parser
        .parse("(Kills(Jack, Tuna) OR Kills(Curiosity, Tuna))");

    cnf = cnfConv.convertToCNF(origSentence);

    // CNF D.
    Assert.assertEquals("[Kills(Curiosity,Tuna), Kills(Jack,Tuna)]",
        cnf.toString());
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

        cnf.toString());

    // FOL E.
    origSentence = parser.parse("Cat(Tuna)");

    cnf = cnfConv.convertToCNF(origSentence);

    // CNF E.
    Assert.assertEquals("[Cat(Tuna)]", cnf.toString());

    // FOL F.
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

    Assert.assertEquals("[Cat(Tuna)]", cnf.toString());

    // FOL F.
    origSentence = parser.parse("FORALL x (Cat(x) => Animal(x))");

    cnf = cnfConv.convertToCNF(origSentence);

    // CNF F.
    Assert.assertEquals("[~Cat(x), Animal(x)]", cnf.toString());

    // FOL G.
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

    Assert.assertEquals("[~Cat(x), Animal(x)]", cnf.toString());

    // FOL G.
    origSentence = parser.parse("NOT(Kills(Curiosity, Tuna))");

    cnf = cnfConv.convertToCNF(origSentence);

    // CNF G.
    Assert.assertEquals("[~Kills(Curiosity,Tuna)]", cnf.toString());
  }
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

    Sentence origSentence = parser
        .parse("EXISTS w (FORALL x ( (EXISTS z (Q(w, z))) => (EXISTS y (NOT(P(x, y)) AND R(y))) ) )");

    CNFConverter cnfConv = new CNFConverter(parser);

    CNF cnf = cnfConv.convertToCNF(origSentence);

    Assert.assertEquals("[~P(x,SF0(x)), ~Q(SC0,z)],[~Q(SC0,z), R(SF0(x))]",
        cnf.toString());

    // Ax.Ay.(p(x,y) => Ez.(q(x,y,z)))
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

    // Ax.Ay.(p(x,y) => Ez.(q(x,y,z)))
    origSentence = parser
        .parse("FORALL x1 (FORALL y1 (P(x1, y1) => EXISTS z1 (Q(x1, y1, z1))))");

    cnf = cnfConv.convertToCNF(origSentence);

    Assert.assertEquals("[~P(x1,y1), Q(x1,y1,SF1(x1,y1))]", cnf.toString());

    // Ex.Ay.Az.(r(y,z) <=> q(x,y,z))
    origSentence = parser
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

    // Ex.Ay.Az.(r(y,z) <=> q(x,y,z))
    origSentence = parser
        .parse("EXISTS x2 (FORALL y2 (FORALL z2 (R(y2, z2) <=> Q(x2, y2, z2))))");

    cnf = cnfConv.convertToCNF(origSentence);

    Assert.assertEquals(
        "[~R(y2,z2), Q(SC1,y2,z2)],[~Q(SC1,y2,z2), R(y2,z2)]",
        cnf.toString());
View Full Code Here

Examples of aima.core.logic.fol.CNFConverter.convertToCNF()

    // Ax.Ey.(~p(x,y) => Az.(q(x,y,z)))
    origSentence = parser
        .parse("FORALL x3 (EXISTS y3 (NOT(P(x3, y3)) => FORALL z3 (Q(x3, y3, z3))))");

    cnf = cnfConv.convertToCNF(origSentence);

    Assert.assertEquals("[P(x3,SF2(x3)), Q(x3,SF2(x3),z3)]", cnf.toString());

    // Ew.Ex.Ey.Ez.(r(x,y) & q(x,w,z))
    origSentence = parser
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.