askWithTTEntails() public méthode

public askWithTTEntails ( String queryString ) : bool
queryString String
Résultat bool
Exemple #1
0
        public void testTTEntailsSucceedsWithChadCarffsBugReport()
        {
            KnowledgeBase kb = new KnowledgeBase();
            kb.tell("(B12 <=> (P11 OR (P13 OR (P22 OR P02))))");
            kb.tell("(B21 <=> (P20 OR (P22 OR (P31 OR P11))))");
            kb.tell("(B01 <=> (P00 OR (P02 OR P11)))");
            kb.tell("(B10 <=> (P11 OR (P20 OR P00)))");
            kb.tell("(NOT B21)");
            kb.tell("(NOT B12)");
            kb.tell("(B10)");
            kb.tell("(B01)");

            Assert.IsTrue(kb.askWithTTEntails("(P00)"));
            Assert.IsFalse(kb.askWithTTEntails("(NOT P00)"));
        }
Exemple #2
0
 public void testDoesNotKnow()
 {
     KnowledgeBase kb = new KnowledgeBase();
     kb.tell("A");
     Assert.IsFalse(kb.askWithTTEntails("B"));
     Assert.IsFalse(kb.askWithTTEntails("(NOT B)"));
 }