diff --git a/src/test/java/puzzles/shorttruthtable/ShortTruthTableImporterTest.java b/src/test/java/puzzles/shorttruthtable/ShortTruthTableImporterTest.java deleted file mode 100644 index 3054a99d9..000000000 --- a/src/test/java/puzzles/shorttruthtable/ShortTruthTableImporterTest.java +++ /dev/null @@ -1,10 +0,0 @@ -// package puzzles.shorttruthtable; - -// class ShortTruthTableImporterTest{ - -// @Test -// public void testImport(){ - -// } - -// } diff --git a/src/test/java/puzzles/shorttruthtable/ShortTruthTableStatementTest.java b/src/test/java/puzzles/shorttruthtable/ShortTruthTableStatementTest.java deleted file mode 100644 index 91a45933a..000000000 --- a/src/test/java/puzzles/shorttruthtable/ShortTruthTableStatementTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package puzzles.shorttruthtable; - -// import org.junit.Test; -// import static org.junit.Assert.assertEquals; - -// class ShortTruthTableStatementTest{ - -// @Test -// public void testCreateStatement(){ -// ShortTruthTableStatement statement = new ShortTruthTableStatement("a^b"); - -// assertEquals(statement.getLength(), 3); -// } - -// } diff --git a/src/test/java/puzzles/shorttruthtable/rules/AndContradictionRuleTest.java b/src/test/java/puzzles/shorttruthtable/rules/AndContradictionRuleTest.java new file mode 100644 index 000000000..7cb0ed012 --- /dev/null +++ b/src/test/java/puzzles/shorttruthtable/rules/AndContradictionRuleTest.java @@ -0,0 +1,132 @@ +package puzzles.shorttruthtable.rules; + +import edu.rpi.legup.model.tree.TreeNode; +import edu.rpi.legup.model.tree.TreeTransition; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTable; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableBoard; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCell; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCellType; +import edu.rpi.legup.puzzle.shorttruthtable.rules.contradiction.ContradictionRuleAnd; +import edu.rpi.legup.save.InvalidFileFormatException; +import legup.MockGameBoardFacade; +import legup.TestUtilities; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +public class AndContradictionRuleTest { + + private static final ContradictionRuleAnd RULE = new ContradictionRuleAnd(); + private static ShortTruthTable stt; + + @BeforeClass + public static void setUp() { + MockGameBoardFacade.getInstance(); + stt = new ShortTruthTable(); + } + + /** + * Given a statement: A ^ B where ^ is true + * + * Asserts that this is a valid application of the rule if + * and only if A or B are set to false. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void trueAndTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/AndContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + trueAndTestHelper(path + first + "T" + second); + } + } + } + + private void trueAndTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(2, 0); + + if (a.getType() == ShortTruthTableCellType.FALSE || b.getType() == ShortTruthTableCellType.FALSE) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } + + /** + * Given a statement: A ^ B where ^ is false + * + * Asserts that this is a valid application of the rule if + * and only if A or B (or both) are set to true. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void falseAndTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/AndContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + falseAndTestHelper(path + first + "F" + second); + } + } + } + + private void falseAndTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(2, 0); + + if (a.getType() == ShortTruthTableCellType.TRUE && b.getType() == ShortTruthTableCellType.TRUE) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } + + /** + * Given a statement: A ^ B where ^ is unknown + * + * Asserts that this is not a valid application of this rule. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void unknownAndTest() throws InvalidFileFormatException { + // Getting the files that have or set to unknown from And Introduction + String path = "puzzles/shorttruthtable/rules/AndIntroductionDirectRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + unknownAndTestHelper(path + first + "U" + second); + } + } + } + + private void unknownAndTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } +} diff --git a/src/test/java/puzzles/shorttruthtable/rules/AtomicContradictionRuleTest.java b/src/test/java/puzzles/shorttruthtable/rules/AtomicContradictionRuleTest.java new file mode 100644 index 000000000..c6325df5d --- /dev/null +++ b/src/test/java/puzzles/shorttruthtable/rules/AtomicContradictionRuleTest.java @@ -0,0 +1,65 @@ +package puzzles.shorttruthtable.rules; + +import edu.rpi.legup.model.tree.TreeNode; +import edu.rpi.legup.model.tree.TreeTransition; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTable; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableBoard; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCell; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCellType; +import edu.rpi.legup.puzzle.shorttruthtable.rules.contradiction.ContradictionRuleAtomic; +import edu.rpi.legup.save.InvalidFileFormatException; +import legup.MockGameBoardFacade; +import legup.TestUtilities; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +public class AtomicContradictionRuleTest { + + private static final ContradictionRuleAtomic RULE = new ContradictionRuleAtomic(); + private static ShortTruthTable stt; + + @BeforeClass + public static void setUp() { + MockGameBoardFacade.getInstance(); + stt = new ShortTruthTable(); + } + + /** + * Given two statements: A, A + * + * Asserts that this is a valid application of the rule if + * and only if both A and B are not unknown and different. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void mismatchTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/AtomicContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + mismatchHelper(path + first + second); + } + } + } + + private void mismatchHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(0, 2); + + if (a.getType() != ShortTruthTableCellType.UNKNOWN && b.getType() != ShortTruthTableCellType.UNKNOWN && a.getType() != b.getType()) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } +} diff --git a/src/test/java/puzzles/shorttruthtable/rules/BiconditionalContradictionRuleTest.java b/src/test/java/puzzles/shorttruthtable/rules/BiconditionalContradictionRuleTest.java new file mode 100644 index 000000000..750eb544d --- /dev/null +++ b/src/test/java/puzzles/shorttruthtable/rules/BiconditionalContradictionRuleTest.java @@ -0,0 +1,132 @@ +package puzzles.shorttruthtable.rules; + +import edu.rpi.legup.model.tree.TreeNode; +import edu.rpi.legup.model.tree.TreeTransition; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTable; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableBoard; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCell; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCellType; +import edu.rpi.legup.puzzle.shorttruthtable.rules.contradiction.ContradictionRuleBiconditional; +import edu.rpi.legup.save.InvalidFileFormatException; +import legup.MockGameBoardFacade; +import legup.TestUtilities; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +public class BiconditionalContradictionRuleTest { + + private static final ContradictionRuleBiconditional RULE = new ContradictionRuleBiconditional(); + private static ShortTruthTable stt; + + @BeforeClass + public static void setUp() { + MockGameBoardFacade.getInstance(); + stt = new ShortTruthTable(); + } + + /** + * Given a statement: A <-> B where <-> is true + * + * Asserts that this is a valid application of the rule if + * and only if A and B are not unknown and A does not equal B + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void trueBiconditionalTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/BiconditionalContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + trueBiconditionalTestHelper(path + first + "T" + second); + } + } + } + + private void trueBiconditionalTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(2, 0); + + if (a.getType() != ShortTruthTableCellType.UNKNOWN && b.getType() != ShortTruthTableCellType.UNKNOWN && a.getType() != b.getType()) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } + + /** + * Given a statement: A <-> B where <-> is false + * + * Asserts that this is a valid application of the rule if + * and only if A and B are not unknown and A equals B + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void falseConditionalTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/BiconditionalContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + falseBiconditionalTestHelper(path + first + "F" + second); + } + } + } + + private void falseBiconditionalTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(2, 0); + + if (a.getType() != ShortTruthTableCellType.UNKNOWN && b.getType() != ShortTruthTableCellType.UNKNOWN && a.getType() == b.getType()) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } + + /** + * Given a statement: A <-> B where <-> is unknown + * + * Asserts that this is not a valid application of this rule. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void unknownBiconditionalTest() throws InvalidFileFormatException { + // Getting the files that have or set to unknown from Biconditional Introduction + String path = "puzzles/shorttruthtable/rules/BiconditionalIntroductionDirectRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + unknownBiconditionalTestHelper(path + first + "U" + second); + } + } + } + + private void unknownBiconditionalTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } +} diff --git a/src/test/java/puzzles/shorttruthtable/rules/ConditionalContradictionRuleTest.java b/src/test/java/puzzles/shorttruthtable/rules/ConditionalContradictionRuleTest.java new file mode 100644 index 000000000..a13217cb2 --- /dev/null +++ b/src/test/java/puzzles/shorttruthtable/rules/ConditionalContradictionRuleTest.java @@ -0,0 +1,132 @@ +package puzzles.shorttruthtable.rules; + +import edu.rpi.legup.model.tree.TreeNode; +import edu.rpi.legup.model.tree.TreeTransition; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTable; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableBoard; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCell; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCellType; +import edu.rpi.legup.puzzle.shorttruthtable.rules.contradiction.ContradictionRuleConditional; +import edu.rpi.legup.save.InvalidFileFormatException; +import legup.MockGameBoardFacade; +import legup.TestUtilities; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ConditionalContradictionRuleTest { + + private static final ContradictionRuleConditional RULE = new ContradictionRuleConditional(); + private static ShortTruthTable stt; + + @BeforeClass + public static void setUp() { + MockGameBoardFacade.getInstance(); + stt = new ShortTruthTable(); + } + + /** + * Given a statement: A -> B where -> is true + * + * Asserts that this is a valid application of the rule if + * and only if both A is true and B is false + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void trueConditionalTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/ConditionalContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + trueConditionalTestHelper(path + first + "T" + second); + } + } + } + + private void trueConditionalTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(2, 0); + + if (a.getType() == ShortTruthTableCellType.TRUE && b.getType() == ShortTruthTableCellType.FALSE) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } + + /** + * Given a statement: A -> B where -> is false + * + * Asserts that this is a valid application of the rule if + * and only if A is false or B is true + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void falseConditionalTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/ConditionalContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + falseConditionalTestHelper(path + first + "F" + second); + } + } + } + + private void falseConditionalTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(2, 0); + + if (a.getType() == ShortTruthTableCellType.FALSE || b.getType() == ShortTruthTableCellType.TRUE) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } + + /** + * Given a statement: A -> B where -> is unknown + * + * Asserts that this is not a valid application of this rule. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void unknownConditionalTest() throws InvalidFileFormatException { + // Getting the files that have or set to unknown from Conditional Introduction + String path = "puzzles/shorttruthtable/rules/ConditionalIntroductionDirectRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + unknownConditionalTestHelper(path + first + "U" + second); + } + } + } + + private void unknownConditionalTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } +} diff --git a/src/test/java/puzzles/shorttruthtable/rules/NotContradictionRuleTest.java b/src/test/java/puzzles/shorttruthtable/rules/NotContradictionRuleTest.java new file mode 100644 index 000000000..7c2b144e9 --- /dev/null +++ b/src/test/java/puzzles/shorttruthtable/rules/NotContradictionRuleTest.java @@ -0,0 +1,65 @@ +package puzzles.shorttruthtable.rules; + +import edu.rpi.legup.model.tree.TreeNode; +import edu.rpi.legup.model.tree.TreeTransition; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTable; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableBoard; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCell; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCellType; +import edu.rpi.legup.puzzle.shorttruthtable.rules.contradiction.ContradictionRuleNot; +import edu.rpi.legup.save.InvalidFileFormatException; +import legup.MockGameBoardFacade; +import legup.TestUtilities; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +public class NotContradictionRuleTest { + + private static final ContradictionRuleNot RULE = new ContradictionRuleNot(); + private static ShortTruthTable stt; + + @BeforeClass + public static void setUp() { + MockGameBoardFacade.getInstance(); + stt = new ShortTruthTable(); + } + + /** + * Given a statement: ¬A + * + * Asserts that this is a valid application of the rule if + * and only if A and B are both true or are both false. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void notContradictionTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/NotContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + notContradictionTestHelper(path + first + second); + } + } + } + + private void notContradictionTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell not = board.getCell(0, 0); + ShortTruthTableCell a = board.getCell(1, 0); + + if ((not.getType() == ShortTruthTableCellType.TRUE && a.getType() == ShortTruthTableCellType.TRUE) || (not.getType() == ShortTruthTableCellType.FALSE && a.getType() == ShortTruthTableCellType.FALSE)) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } +} diff --git a/src/test/java/puzzles/shorttruthtable/rules/OrContradictionRuleTest.java b/src/test/java/puzzles/shorttruthtable/rules/OrContradictionRuleTest.java new file mode 100644 index 000000000..b2aaf583d --- /dev/null +++ b/src/test/java/puzzles/shorttruthtable/rules/OrContradictionRuleTest.java @@ -0,0 +1,133 @@ +package puzzles.shorttruthtable.rules; + +import edu.rpi.legup.model.tree.TreeNode; +import edu.rpi.legup.model.tree.TreeTransition; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTable; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableBoard; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCell; +import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCellType; +import edu.rpi.legup.puzzle.shorttruthtable.rules.contradiction.ContradictionRuleOr; +import edu.rpi.legup.save.InvalidFileFormatException; +import legup.MockGameBoardFacade; +import legup.TestUtilities; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +public class OrContradictionRuleTest { + + private static final ContradictionRuleOr RULE = new ContradictionRuleOr(); + private static ShortTruthTable stt; + + @BeforeClass + public static void setUp() { + MockGameBoardFacade.getInstance(); + stt = new ShortTruthTable(); + } + + /** + * Given a statement: A V B where V is true + * + * Asserts that this is a valid application of the rule if + * and only if both A and B are set to false. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void trueOrTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/OrContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + trueOrTestHelper(path + first + "T" + second); + } + } + } + + private void trueOrTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(2, 0); + + if (a.getType() == ShortTruthTableCellType.FALSE && b.getType() == ShortTruthTableCellType.FALSE) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } + + /** + * Given a statement: A V B where V is false + * + * Asserts that this is a valid application of the rule if + * and only if A or B is set to true or both A and B are set + * to true. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void falseOrTest() throws InvalidFileFormatException { + String path = "puzzles/shorttruthtable/rules/OrContradictionRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + falseOrTestHelper(path + first + "F" + second); + } + } + } + + private void falseOrTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + ShortTruthTableBoard board = (ShortTruthTableBoard) transition.getBoard(); + ShortTruthTableCell a = board.getCell(0, 0); + ShortTruthTableCell b = board.getCell(2, 0); + + if (a.getType() == ShortTruthTableCellType.TRUE || b.getType() == ShortTruthTableCellType.TRUE) { + Assert.assertNull(RULE.checkContradiction(transition.getBoard())); + } + else { + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } + } + + /** + * Given a statement: A V B where V is unknown + * + * Asserts that this is not a valid application of this rule. + * + * @param filePath The file path for test board setup. + * @throws InvalidFileFormatException + */ + @Test + public void unknownOrTest() throws InvalidFileFormatException { + // Getting the files that have or set to unknown from Or Introduction + String path = "puzzles/shorttruthtable/rules/OrIntroductionDirectRule/"; + String[] letters = {"T", "F", "U"}; + for (String first : letters) { + for (String second : letters) { + unknownOrTestHelper(path + first + "U" + second); + } + } + } + + private void unknownOrTestHelper(String filePath) throws InvalidFileFormatException { + TestUtilities.importTestBoard(filePath, stt); + TreeNode rootNode = stt.getTree().getRootNode(); + TreeTransition transition = rootNode.getChildren().get(0); + transition.setRule(RULE); + + Assert.assertNotNull(RULE.checkContradiction(transition.getBoard())); + } +} diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFF b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFF new file mode 100644 index 000000000..5285dbb86 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFT b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFT new file mode 100644 index 000000000..18d6030d9 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFU b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFU new file mode 100644 index 000000000..39b9e9811 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FFU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTF b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTF new file mode 100644 index 000000000..9df198c5f --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTT b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTT new file mode 100644 index 000000000..0c2feabe7 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTU b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTU new file mode 100644 index 000000000..d024cb841 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/FTU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFF b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFF new file mode 100644 index 000000000..8234ebd2a --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFT b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFT new file mode 100644 index 000000000..4a6b0f1d7 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFU b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFU new file mode 100644 index 000000000..b2bb6e1a5 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TFU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTF b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTF new file mode 100644 index 000000000..9e53ac8e3 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTT b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTT new file mode 100644 index 000000000..837730943 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTU b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTU new file mode 100644 index 000000000..893f7d3ec --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/TTU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFF b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFF new file mode 100644 index 000000000..6d4f44071 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFT b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFT new file mode 100644 index 000000000..7fcda3fba --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFU b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFU new file mode 100644 index 000000000..5285dbb86 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UFU @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTF b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTF new file mode 100644 index 000000000..d11a314b8 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTT b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTT new file mode 100644 index 000000000..1772e1986 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTU b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTU new file mode 100644 index 000000000..9df198c5f --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AndContradictionRule/UTU @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FF b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FF new file mode 100644 index 000000000..47ede6499 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FT b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FT new file mode 100644 index 000000000..56192a97b --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FU b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FU new file mode 100644 index 000000000..9e25868fc --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/FU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TF b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TF new file mode 100644 index 000000000..326988fbb --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TT b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TT new file mode 100644 index 000000000..0b8b9b690 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TU b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TU new file mode 100644 index 000000000..4ee98e3d4 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/TU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UF b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UF new file mode 100644 index 000000000..03432df5f --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UT b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UT new file mode 100644 index 000000000..a69e019a2 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UU b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UU new file mode 100644 index 000000000..7d1f0bae6 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/AtomicContradictionRule/UU @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFF b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFF new file mode 100644 index 000000000..b1c975982 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFT b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFT new file mode 100644 index 000000000..9aaa26431 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFU b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFU new file mode 100644 index 000000000..150134e46 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FFU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTF b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTF new file mode 100644 index 000000000..e1cecaeb7 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTT b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTT new file mode 100644 index 000000000..370cefc0a --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTU b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTU new file mode 100644 index 000000000..4ac904290 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/FTU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFF b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFF new file mode 100644 index 000000000..48e1fa36b --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFT b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFT new file mode 100644 index 000000000..a260489cc --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFU b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFU new file mode 100644 index 000000000..08a999c1a --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TFU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTF b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTF new file mode 100644 index 000000000..c6764d0fb --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTT b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTT new file mode 100644 index 000000000..7ce20257b --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTU b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTU new file mode 100644 index 000000000..b440c157a --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/TTU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFF b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFF new file mode 100644 index 000000000..865d9b59b --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFT b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFT new file mode 100644 index 000000000..31f372a95 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFU b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFU new file mode 100644 index 000000000..b1c975982 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UFU @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTF b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTF new file mode 100644 index 000000000..e1e7eeafc --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTT b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTT new file mode 100644 index 000000000..15ed9b08f --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTU b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTU new file mode 100644 index 000000000..e1cecaeb7 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/BiconditionalContradictionRule/UTU @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFF b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFF new file mode 100644 index 000000000..479b8172d --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFT b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFT new file mode 100644 index 000000000..4c328f840 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFU b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFU new file mode 100644 index 000000000..2a5220f46 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FFU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTF b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTF new file mode 100644 index 000000000..d28a4b9f9 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTT b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTT new file mode 100644 index 000000000..aa0c242b3 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTU b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTU new file mode 100644 index 000000000..b9867188f --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/FTU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFF b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFF new file mode 100644 index 000000000..ad3329472 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFT b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFT new file mode 100644 index 000000000..92eaf7cb3 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFU b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFU new file mode 100644 index 000000000..0ea50831a --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TFU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTF b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTF new file mode 100644 index 000000000..d0e4ec7bb --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTT b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTT new file mode 100644 index 000000000..e2f1a7102 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTU b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTU new file mode 100644 index 000000000..0a38381b1 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/TTU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFF b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFF new file mode 100644 index 000000000..78ff4e0f0 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFT b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFT new file mode 100644 index 000000000..9ac9c39fa --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFU b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFU new file mode 100644 index 000000000..479b8172d --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UFU @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTF b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTF new file mode 100644 index 000000000..cc05da528 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTT b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTT new file mode 100644 index 000000000..0559dcf83 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTU b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTU new file mode 100644 index 000000000..d28a4b9f9 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/ConditionalContradictionRule/UTU @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FF b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FF new file mode 100644 index 000000000..56b5cd97e --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FT b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FT new file mode 100644 index 000000000..5091d620c --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FU b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FU new file mode 100644 index 000000000..ae65d166d --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/FU @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TF b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TF new file mode 100644 index 000000000..cf510f0c3 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TT b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TT new file mode 100644 index 000000000..7bcb69b15 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TU b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TU new file mode 100644 index 000000000..a33ef3016 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/TU @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UF b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UF new file mode 100644 index 000000000..96bc1fb52 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UF @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UT b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UT new file mode 100644 index 000000000..b87293cdc --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UT @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UU b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UU new file mode 100644 index 000000000..78bd1d67e --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/NotContradictionRule/UU @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFF b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFF new file mode 100644 index 000000000..32c62f59e --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFT b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFT new file mode 100644 index 000000000..96e3122bf --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFU b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFU new file mode 100644 index 000000000..b9bb63a6b --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FFU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTF b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTF new file mode 100644 index 000000000..062c5d3e4 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTT b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTT new file mode 100644 index 000000000..4fbb5922a --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTU b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTU new file mode 100644 index 000000000..1767546df --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/FTU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFF b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFF new file mode 100644 index 000000000..3e50d3b54 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFT b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFT new file mode 100644 index 000000000..69cbef4db --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFU b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFU new file mode 100644 index 000000000..018064192 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TFU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTF b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTF new file mode 100644 index 000000000..8247a1cfa --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTF @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTT b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTT new file mode 100644 index 000000000..4446c1e34 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTT @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTU b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTU new file mode 100644 index 000000000..c662ec79b --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/TTU @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFF b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFF new file mode 100644 index 000000000..dae9e4311 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFT b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFT new file mode 100644 index 000000000..1c68eb53b --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFU b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFU new file mode 100644 index 000000000..32c62f59e --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UFU @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTF b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTF new file mode 100644 index 000000000..67169da0c --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTF @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTT b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTT new file mode 100644 index 000000000..c761569c5 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTT @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTU b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTU new file mode 100644 index 000000000..062c5d3e4 --- /dev/null +++ b/src/test/resources/puzzles/shorttruthtable/rules/OrContradictionRule/UTU @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +