Beispiel #1
0
        public void testDPLLSucceedsWithChadCarffsBugReport()
        {
            KnowledgeBase kb = new KnowledgeBase();

            kb.tell("B12 <=> P11 | P13 | P22 | P02");
            kb.tell("B21 <=> P20 | P22 | P31 | P11");
            kb.tell("B01 <=> P00 | P02 | P11");
            kb.tell("B10 <=> P11 | P20 | P00");
            kb.tell("~B21");
            kb.tell("~B12");
            kb.tell("B10");
            kb.tell("B01");

            Assert.IsTrue(dpll.isEntailed(kb, parser.parse("P00")));
            Assert.IsFalse(dpll.isEntailed(kb, parser.parse("~P00")));
        }
 public bool ask(Sentence query)
 {
     return(dpll.isEntailed(this, query));
 }