AIMA.Test.Core.Unit.Logic.FOL.CNFConverterTest.testExamplePg296AIMA2e C# (CSharp) Method

testExamplePg296AIMA2e() private method

private testExamplePg296AIMA2e ( ) : void
return void
        public void testExamplePg296AIMA2e()
        {
            FOLDomain domain = DomainFactory.lovesAnimalDomain();
            FOLParser parser = new FOLParser(domain);

            Sentence origSentence = parser
                    .parse("FORALL x (FORALL y (Animal(y) => Loves(x, y)) => EXISTS y Loves(y, x))");

            CNFConverter cnfConv = new CNFConverter(parser);

            CNF cnf = cnfConv.convertToCNF(origSentence);

            Assert
                    .AreEqual(
                            "[Animal(SF0(x)), Loves(SF1(x),x)],[~Loves(x,SF0(x)), Loves(SF1(x),x)]",
                            cnf.ToString());
        }