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

testExamplePg295AIMA2e() private method

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

            Sentence origSentence = parser
                    .parse("FORALL x ((((American(x) AND Weapon(y)) AND Sells(x, y, z)) AND Hostile(z)) => Criminal(x))");

            CNFConverter cnfConv = new CNFConverter(parser);

            CNF cnf = cnfConv.convertToCNF(origSentence);

            Assert
                    .AreEqual(
                            "[~American(x), ~Hostile(z), ~Sells(x,y,z), ~Weapon(y), Criminal(x)]",
                            cnf.ToString());
        }