/** * Returns the answer to the specified question using the TT-Entails * algorithm. * * @param queryString * a question to ASK the knowledge base * * @return the answer to the specified question using the TT-Entails * algorithm. */ public bool askWithTTEntails(string queryString) { PLParser parser = new PLParser(); Sentence alpha = parser.parse(queryString); return(new TTEntails().ttEntails(this, alpha)); }
static void displayResolutionResults(KnowledgeBase kb, string query) { PLParser parser = new PLParser(); System.Console.WriteLine("Running plResolution of query " + query + " on knowledgeBase gives " + plr.plResolution(kb, parser.parse(query))); }
public void setUp() { parser = new PLParser(); trueSentence = (Sentence)parser.parse("true"); falseSentence = (Sentence)parser.parse("false"); andSentence = (Sentence)parser.parse("(P & Q)"); orSentence = (Sentence)parser.parse("(P | Q)"); impliedSentence = (Sentence)parser.parse("(P => Q)"); biConditionalSentence = (Sentence)parser.parse("(P <=> Q)"); m = new Model(); }
public static void displayDPLLSatisfiableStatus(string query) { PLParser parser = new PLParser(); if (dpll.dpllSatisfiable(parser.parse(query))) { System.Console.WriteLine(query + " is (DPLL) satisfiable"); } else { System.Console.WriteLine(query + " is NOT (DPLL) satisfiable"); } }
public void setUp() { parser = new PLParser(); plfce = new PLFCEntails(); }
public void setUp() { parser = new PLParser(); }
public DPLLTest() { this.dpll = new DPLLSatisfiable(); this.parser = new PLParser(); }
public PLResolutionTest() { this.resolution = new PLResolution(false); parser = new PLParser(); }
public PLKbInferProcedureInfo() { parser = new PLParser(); WalkSatProbability = 0.5; WalkSatMaxFlips = 100; }