From d551993496a4fea52bedc76cc6d76f8b274304b5 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 24 Dec 2021 13:58:19 -0500 Subject: [PATCH 1/4] Debugging stuff --- legup-update/build/libs/legup-update-2.0.jar | Bin 9946 -> 9946 bytes .../shorttruthtable/ShortTruthTableCell.java | 2 +- .../ShortTruthTableImporter.java | 2 +- .../rules/basic/BasicRule_Generic.java | 20 +++++++++++------- .../elimination/BasicRuleAndElimination.java | 2 +- .../caserule/CaseRule_GenericStatement.java | 9 +++----- .../contradiction/ContradictionRuleAnd.java | 1 + .../ContradictionRule_GenericStatement.java | 16 ++++++-------- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/legup-update/build/libs/legup-update-2.0.jar b/legup-update/build/libs/legup-update-2.0.jar index eb09441b051af1cb4aa8b002c7bf9e71115dec46..9094be7c93ba337be9cc585527b60be1d48f80f2 100644 GIT binary patch delta 209 zcmccRd&`$Mz?+$ci-CcIgTX3m#zbBJ#L~UkfTOx v=`a<2Fx{bI45s%%#3!lxfVuvvL121`syCSaq#6uWCOtV>O$E&EQVRe8_3K1B delta 209 zcmccRd&`$Mz?+$ci-CcIgQ0SH#YA2;=81k`6V1GsWx~QHHYiK;i4|4B6%tbLz~ O^yFkU6)?L?EdT%^v_b3u diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 1613c4e39..19e92d78e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -34,7 +34,7 @@ public ShortTruthTableCell(Point location){ //Getters - public ShortTruthTableStatement getStatementRefference() { + public ShortTruthTableStatement getStatementReference() { return statement; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index 7ddfc72e0..cbf052521 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -169,7 +169,7 @@ private ShortTruthTableBoard generateBoard(List> allCe //for a cell to exist at (x, y), it must be a valid row and within the statment length if(y%2==0 && x < statements.get(statementIndex).getLength()) { cell = allCells.get(statementIndex).get(x); - System.out.println("Importer: check cell statement ref: "+cell.getStatementRefference()); + System.out.println("Importer: check cell statement ref: "+cell.getStatementReference()); }else{ //if it is not a valid cell space, add a NOT_IN_PLAY cell cell = new ShortTruthTableCell(' ', ShortTruthTableCellType.NOT_IN_PLAY, new Point(x, y)); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java index 6aea49b2c..680f0b2ab 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java @@ -8,13 +8,8 @@ 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.ShortTruthTableStatement; import edu.rpi.legup.model.rules.ContradictionRule; -import java.awt.*; -import java.util.List; - public abstract class BasicRule_Generic extends BasicRule { final ContradictionRule correspondingContradictionRule; @@ -42,7 +37,7 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement element){ //check that it is assigned to the right value ShortTruthTableBoard originalBoard = (ShortTruthTableBoard) transition.getParents().get(0).getBoard(); - //Use this board to check what would happen if the cell what the oppisite value + //Use this board to check what would happen if the cell what the opposite value ShortTruthTableBoard testBoard = originalBoard.copy(); ((ShortTruthTableCell) testBoard.getPuzzleElement(element)).setType(cell.getType().getNegation()); @@ -51,13 +46,22 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement element){ //if elimination, check the parent if(this.eliminationRule){ - checkElement = cell.getStatementRefference().getParentStatement().getCell(); + System.out.println("Is an elimination rule"); + checkElement = cell.getStatementReference().getParentStatement().getCell(); } //see if there is a contradiction + if (this.eliminationRule) + System.out.println("Parent check contradiction START"); String checkContradiction = correspondingContradictionRule.checkContradictionAt(testBoard, checkElement); + if (this.eliminationRule) + { + System.out.println("Parent check contradiction END"); + System.out.println("Parent contradiction: " + checkContradiction); + } + - //if there is a contradition when the modified element is negated, then the basic riule must be true + //if there is a contradiction when the modified element is negated, then the basic rule must be true if(checkContradiction==null) return null; diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleAndElimination.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleAndElimination.java index f63b25f76..6680b75a3 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleAndElimination.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleAndElimination.java @@ -6,7 +6,7 @@ public class BasicRuleAndElimination extends BasicRule_GenericElimination { public BasicRuleAndElimination() { super("And", new ContradictionRuleAnd()); - System.out.println("and eliminatio constructor"); + //System.out.println("and elimination constructor"); } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_GenericStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_GenericStatement.java index f5bc61070..8b233c6e9 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_GenericStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_GenericStatement.java @@ -3,8 +3,6 @@ import edu.rpi.legup.model.gameboard.Board; import edu.rpi.legup.model.gameboard.CaseBoard; import edu.rpi.legup.model.gameboard.PuzzleElement; -import edu.rpi.legup.model.rules.CaseRule; -import edu.rpi.legup.model.tree.TreeTransition; import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableBoard; import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCell; @@ -14,7 +12,6 @@ import java.util.ArrayList; -import java.util.List; public abstract class CaseRule_GenericStatement extends CaseRule_Generic { @@ -63,10 +60,10 @@ public CaseBoard getCaseBoard(Board board) { //the statement must be assigned with unassigned sub-statements if(!cell.getType().isTrueOrFalse()) continue; System.out.println(" Operation is known"); - if(cell.getStatementRefference().getRightStatement().getCell().getType().isTrueOrFalse()) continue; + if(cell.getStatementReference().getRightStatement().getCell().getType().isTrueOrFalse()) continue; System.out.println(" right side is unknown"); if(this.operation != ShortTruthTableOperation.NOT && - cell.getStatementRefference().getRightStatement().getCell().getType().isTrueOrFalse()) continue; + cell.getStatementReference().getRightStatement().getCell().getType().isTrueOrFalse()) continue; System.out.println(" left side is unknown"); System.out.println(" Valid choice"); @@ -113,7 +110,7 @@ private ArrayList getCasesFromCell(ShortTruthTableBoard board, PuzzleElem //get the statement of the square that was selected ShortTruthTableCell cell = b.getCellFromElement(puzzleElement); - ShortTruthTableStatement statement = cell.getStatementRefference(); + ShortTruthTableStatement statement = cell.getStatementReference(); //modify its children //avoid error if it is a NOT statement diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAnd.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAnd.java index efddc4b6e..5c19486ab 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAnd.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAnd.java @@ -13,6 +13,7 @@ public ContradictionRuleAnd(){ new ShortTruthTableCellType[][] { {n, T, F}, {F, T, n}, + // {F, T, F}, {T, F, T}, } ); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java index 1c46b09c1..09d901433 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java @@ -9,11 +9,8 @@ import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCell; import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableCellType; import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableStatement; -import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableOperation; -import java.util.Set; import java.util.Arrays; -import java.util.Iterator; public abstract class ContradictionRule_GenericStatement extends ContradictionRule{ @@ -38,12 +35,12 @@ public ContradictionRule_GenericStatement(String ruleName, String description, S @Override public String checkContradictionAt(Board puzzleBoard, PuzzleElement puzzleElement) { - //cast the board toa shortTruthTableBoard + //cast the board to a shortTruthTableBoard ShortTruthTableBoard board = (ShortTruthTableBoard) puzzleBoard; //get the cell that contradicts another cell in the board ShortTruthTableCell cell = board.getCellFromElement(puzzleElement); - ShortTruthTableStatement statement = cell.getStatementRefference(); + ShortTruthTableStatement statement = cell.getStatementReference(); //must be the correct statement if(cell.getSymbol() != this.operationSymbol) @@ -58,10 +55,11 @@ public String checkContradictionAt(Board puzzleBoard, PuzzleElement puzzleElemen //get the pattern for this sub-statement ShortTruthTableCellType[] testPattern = statement.getCellTypePattern(); - //if the board pattern matches any contradiction patter, it is a valid contradiction + //if the board pattern matches any contradiction pattern, it is a valid contradiction + System.out.println("Name: " + this.ruleName); System.out.println("Testing pattern: "+Arrays.toString(testPattern)); for(ShortTruthTableCellType[] pattern : contradictionPatterns){ - System.out.println("compareing to: "+Arrays.toString(pattern)); + System.out.println("Comparing to: "+Arrays.toString(pattern)); boolean matches = true; for(int i = 0; i<3; i++){ //null means that part does not affect the statement @@ -74,12 +72,12 @@ public String checkContradictionAt(Board puzzleBoard, PuzzleElement puzzleElemen } //if testPattern matches one of the valid contradiction patterns, the contradiction is correct if(matches){ - System.out.println("This is a valid contradiction: matches pat: "+pattern); + System.out.println("This is a valid contradiction: matches pat: "+Arrays.toString(pattern)); return null; } } - System.out.println("not patterns match. There is not a contradiction"); + System.out.println("No patterns match. There is not a contradiction"); return "This cell does not match any contradiction pattern for this rule"; } From e943cc9fdd93d3f40bdeb0efca3229980300bc66 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 24 Dec 2021 15:02:02 -0500 Subject: [PATCH 2/4] Discovered flaw in programming logic --- .../legup/puzzle/shorttruthtable/ShortTruthTableCell.java | 2 +- .../puzzle/shorttruthtable/ShortTruthTableStatement.java | 3 +-- .../shorttruthtable/rules/basic/BasicRule_Generic.java | 6 +++++- .../contradiction/ContradictionRule_GenericStatement.java | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 19e92d78e..1f182c9fc 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -67,7 +67,7 @@ public boolean isAssigned(){ //Setters - void setStatementRefference(ShortTruthTableStatement statement){ + void setStatementReference(ShortTruthTableStatement statement){ this.statement = statement; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java index 99a5c5351..46186681c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java @@ -9,7 +9,6 @@ import java.awt.Point; import java.util.List; import java.util.ArrayList; -import java.util.Arrays; public class ShortTruthTableStatement extends PuzzleElement{ @@ -52,7 +51,7 @@ private ShortTruthTableStatement(String statement, ShortTruthTableStatement pare //construct the cell for this node in the tree cell = cells.get(index); //give the cell a reference back to this statement - cell.setStatementRefference(this); + cell.setStatementReference(this); //get the strings on either side of this char in the string rep String left = statement.substring(0, index); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java index 680f0b2ab..294db05ce 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java @@ -53,15 +53,19 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement element){ //see if there is a contradiction if (this.eliminationRule) System.out.println("Parent check contradiction START"); + System.out.println("checkElement: " + checkElement); String checkContradiction = correspondingContradictionRule.checkContradictionAt(testBoard, checkElement); + System.out.println("Contradiction message: " + checkContradiction); if (this.eliminationRule) { System.out.println("Parent check contradiction END"); System.out.println("Parent contradiction: " + checkContradiction); } - + // MISTAKE IS HERE: //if there is a contradiction when the modified element is negated, then the basic rule must be true + // ^ that is false. Given F^T, where T was the modified element, if T is negated, it becomes F^F. F^F is F, but + // that does not mean that F^T is true. if(checkContradiction==null) return null; diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java index 09d901433..91f3d986a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java @@ -43,6 +43,7 @@ public String checkContradictionAt(Board puzzleBoard, PuzzleElement puzzleElemen ShortTruthTableStatement statement = cell.getStatementReference(); //must be the correct statement + System.out.println("Symbol: " + cell.getSymbol()); if(cell.getSymbol() != this.operationSymbol) return "This cell does not contain the correct operation"; From 8b8b473be5622f9c455f2901978dbd02fca02a60 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 25 Dec 2021 12:17:51 -0500 Subject: [PATCH 3/4] Rolling back some changes, using new strategy --- .../rules/basic/BasicRule_Generic.java | 31 ++++++++++++++++--- .../ContradictionRule_GenericStatement.java | 5 +++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java index 294db05ce..25eed0a85 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java @@ -53,24 +53,45 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement element){ //see if there is a contradiction if (this.eliminationRule) System.out.println("Parent check contradiction START"); - System.out.println("checkElement: " + checkElement); String checkContradiction = correspondingContradictionRule.checkContradictionAt(testBoard, checkElement); - System.out.println("Contradiction message: " + checkContradiction); if (this.eliminationRule) { System.out.println("Parent check contradiction END"); System.out.println("Parent contradiction: " + checkContradiction); } - // MISTAKE IS HERE: + //if there is a contradiction when the modified element is negated, then the basic rule must be true - // ^ that is false. Given F^T, where T was the modified element, if T is negated, it becomes F^F. F^F is F, but - // that does not mean that F^T is true. if(checkContradiction==null) return null; return "Negated Contradiction Failed: "+checkContradiction; +// if (this.eliminationRule) +// { +// System.out.println("Elimination rule check entered"); +// // If the rule is an elimination rule, we can check if the statement contains a contradiction. If it does +// // contain a contradiction, then we know that the rule must be false +// +// String checkContradiction = correspondingContradictionRule.checkContradictionAt(originalBoard, checkElement); +// System.out.println("checkContradiction: " + checkContradiction); +// if (checkContradiction == null) // original board contains a contradiction: this is bad! +// return "This is not a valid use of " + this.ruleName + "!"; +// return null; +// } +// else +// { +// // If the rule is not an elimination rule, we can check to see if negating the modified cell will create +// // a contradiction +// +// // Use the original board to check what would happen if the cell what the opposite value +// ShortTruthTableBoard testBoard = originalBoard.copy(); +// ((ShortTruthTableCell) testBoard.getPuzzleElement(element)).setType(cell.getType().getNegation()); +// String checkContradiction = correspondingContradictionRule.checkContradictionAt(testBoard, checkElement); +// if (checkContradiction == null) // modified board contains a contradiction: this is good! +// return null; +// return "Negated Contradiction Failed: "+checkContradiction; +// } } /** diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java index 91f3d986a..a2b9ed877 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java @@ -41,9 +41,14 @@ public String checkContradictionAt(Board puzzleBoard, PuzzleElement puzzleElemen //get the cell that contradicts another cell in the board ShortTruthTableCell cell = board.getCellFromElement(puzzleElement); ShortTruthTableStatement statement = cell.getStatementReference(); + ShortTruthTableStatement parentStatement = statement.getParentStatement(); + System.out.println("Statement: " + statement); + //must be the correct statement System.out.println("Symbol: " + cell.getSymbol()); + + // ISSUE: IT SEEMS TO BE THAT puzzleElement IS EXPECTED TO BE THE OPERATOR if(cell.getSymbol() != this.operationSymbol) return "This cell does not contain the correct operation"; From f58065187a644df64a870dae92ed8c86324af027 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 25 Dec 2021 13:45:40 -0500 Subject: [PATCH 4/4] Quick temporary fix implemented --- .../rules/basic/BasicRule_Generic.java | 14 ++++++++++++-- .../ContradictionRule_GenericStatement.java | 7 +++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java index 25eed0a85..b546f40b1 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java @@ -62,9 +62,19 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement element){ //if there is a contradiction when the modified element is negated, then the basic rule must be true - if(checkContradiction==null) + if(checkContradiction==null && !eliminationRule) + { return null; - + } + // if it's an elimination rule, check if the original case was also invalid + else if (checkContradiction == null && eliminationRule) + { + String checkOriginalContradiction = correspondingContradictionRule.checkContradictionAt(originalBoard, checkElement); + if (checkOriginalContradiction == null) + return "Invalid use of " + this.ruleName; + else + return null; + } return "Negated Contradiction Failed: "+checkContradiction; // if (this.eliminationRule) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java index a2b9ed877..d63846ea3 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java @@ -33,22 +33,21 @@ public ContradictionRule_GenericStatement(String ruleName, String description, S @Override - public String checkContradictionAt(Board puzzleBoard, PuzzleElement puzzleElement) { + public String checkContradictionAt(Board puzzleBoard, PuzzleElement operatorPuzzleElement) { //cast the board to a shortTruthTableBoard ShortTruthTableBoard board = (ShortTruthTableBoard) puzzleBoard; //get the cell that contradicts another cell in the board - ShortTruthTableCell cell = board.getCellFromElement(puzzleElement); + ShortTruthTableCell cell = board.getCellFromElement(operatorPuzzleElement); ShortTruthTableStatement statement = cell.getStatementReference(); - ShortTruthTableStatement parentStatement = statement.getParentStatement(); + // ShortTruthTableStatement parentStatement = statement.getParentStatement(); System.out.println("Statement: " + statement); //must be the correct statement System.out.println("Symbol: " + cell.getSymbol()); - // ISSUE: IT SEEMS TO BE THAT puzzleElement IS EXPECTED TO BE THE OPERATOR if(cell.getSymbol() != this.operationSymbol) return "This cell does not contain the correct operation";