public void BackwardChainAndImp() { FileInput input = new FileInput("./t2.txt"); Model temp = new Model(); PropositionInterpreter test = new PropositionInterpreter(ref temp); World MyWorld = new World(test.ParseProps(input.ReadFromFile()), temp.Length); BackwardsChain solver = new BackwardsChain(temp, MyWorld); solver.Start(); }
public void All_t1() { filePath = "t1.txt"; bool rightAns = true; setup(); Truthsolver.solve(); bool truth = (strWriter.ToString()[0] == 'Y'); // if it returns YES clearsw(); backwardsolver.Start(); bool backwards = (strWriter.ToString()[0] == 'Y'); // if it returns YES clearsw(); forwardsolver.Start(); bool forward = (strWriter.ToString()[0] == 'Y'); // if it returns YES Assert.AreEqual(truth, rightAns); Assert.AreEqual(truth, backwards); Assert.AreEqual(backwards, forward); }