Search in sources :

Example 11 with LTLNode

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);
}
Also used : LTLPrefixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) LTLInfixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLInfixOperatorNode)

Example 12 with LTLNode

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);
}
Also used : LTLPrefixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) LTLInfixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLInfixOperatorNode)

Example 13 with LTLNode

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));
}
Also used : LTLPrefixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode)

Example 14 with LTLNode

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);
}
Also used : LTLPrefixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) LTLKeywordNode(de.bmoth.parser.ast.nodes.ltl.LTLKeywordNode) LTLInfixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLInfixOperatorNode)

Example 15 with LTLNode

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);
}
Also used : LTLPrefixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) LTLKeywordNode(de.bmoth.parser.ast.nodes.ltl.LTLKeywordNode) LTLInfixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLInfixOperatorNode)

Aggregations

LTLNode (de.bmoth.parser.ast.nodes.ltl.LTLNode)31 LTLFormula (de.bmoth.parser.ast.nodes.ltl.LTLFormula)20 Test (org.junit.Test)20 BuechiAutomaton (de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton)19 LTLPrefixOperatorNode (de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode)11 LTLInfixOperatorNode (de.bmoth.parser.ast.nodes.ltl.LTLInfixOperatorNode)7 LTLBPredicateNode (de.bmoth.parser.ast.nodes.ltl.LTLBPredicateNode)2 LTLKeywordNode (de.bmoth.parser.ast.nodes.ltl.LTLKeywordNode)2 Node (de.bmoth.parser.ast.nodes.Node)1 PredicateNode (de.bmoth.parser.ast.nodes.PredicateNode)1 Ignore (org.junit.Ignore)1