use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.
the class ConvertNotUntil method transformNode.
@Override
public Node transformNode(Node oldNode) {
LTLPrefixOperatorNode notOperator = (LTLPrefixOperatorNode) oldNode;
LTLNode argument = notOperator.getArgument();
LTLInfixOperatorNode untilOperator = (LTLInfixOperatorNode) argument;
LTLNode left = untilOperator.getLeft();
LTLNode right = untilOperator.getRight();
LTLPrefixOperatorNode notRight = new LTLPrefixOperatorNode(NOT, right);
LTLPrefixOperatorNode notLeft = new LTLPrefixOperatorNode(NOT, left);
return new LTLInfixOperatorNode(LTLInfixOperatorNode.Kind.RELEASE, notLeft, notRight);
}
use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.
the class ConvertFinallyPhiOrPsiToFinallyPhiOrFinallyPsi method transformNode.
@Override
public Node transformNode(Node oldNode) {
LTLPrefixOperatorNode finallyOperator = (LTLPrefixOperatorNode) oldNode;
LTLNode argument = finallyOperator.getArgument();
LTLInfixOperatorNode orOperator = (LTLInfixOperatorNode) argument;
LTLPrefixOperatorNode newNextLeft = new LTLPrefixOperatorNode(FINALLY, orOperator.getLeft());
LTLPrefixOperatorNode newNextRight = new LTLPrefixOperatorNode(FINALLY, orOperator.getRight());
return new LTLInfixOperatorNode(OR, newNextLeft, newNextRight);
}
use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.
the class ConvertNotGloballyToFinallyNot method transformNode.
@Override
public Node transformNode(Node node) {
LTLPrefixOperatorNode not = (LTLPrefixOperatorNode) node;
LTLPrefixOperatorNode globally = (LTLPrefixOperatorNode) not.getArgument();
LTLNode inner = globally.getArgument();
return new LTLPrefixOperatorNode(FINALLY, new LTLPrefixOperatorNode(NOT, inner));
}
use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.
the class ConvertFinallyPhiToTrueUntilPhi method transformNode.
@Override
public Node transformNode(Node oldNode) {
LTLPrefixOperatorNode finallyOperator = (LTLPrefixOperatorNode) oldNode;
LTLNode argument = finallyOperator.getArgument();
LTLKeywordNode trueNode = new LTLKeywordNode(LTLKeywordNode.Kind.TRUE);
return new LTLInfixOperatorNode(LTLInfixOperatorNode.Kind.UNTIL, trueNode, argument);
}
use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.
the class ConvertGloballyPhiToFalseReleasePhi method transformNode.
@Override
public Node transformNode(Node oldNode) {
LTLPrefixOperatorNode globallyOperator = (LTLPrefixOperatorNode) oldNode;
LTLNode argument = globallyOperator.getArgument();
return new LTLInfixOperatorNode(LTLInfixOperatorNode.Kind.RELEASE, new LTLKeywordNode(LTLKeywordNode.Kind.FALSE), argument);
}
Aggregations