Skip to content

Commit

Permalink
corrected negation embedding with more parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Steen committed Jan 19, 2021
1 parent b98f145 commit 746e3ef
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,12 @@ private void replaceNullaryAndUnaryOperators(Node leaf) throws AnalysisException
usedConnectives.add("mfalse");
break;
case "~":
leaf.setLabel("mnot @");
Node operatorTree = leaf.getNextTopBranchingNode(); // should be thf_unary_formula
if (!operatorTree.getRule().equals("thf_unary_formula")) throw new ImplementationError("~ ... is not a thf_unary_formula.");
operatorTree.replaceChildAt(0, new Node("t_mnot", "mnot @"));
operatorTree.addChildAt(new Node("t_left_paren", "("), 0);
operatorTree.addChild(new Node("t_right_paren", ")"));
// leaf.setLabel("mnot @");
usedConnectives.add("mnot");
break;
// embed simple modality
Expand Down

0 comments on commit 746e3ef

Please sign in to comment.