Search in sources :

Example 16 with LTLNode

use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.

the class ConvertImplicationToOr method transformNode.

@Override
public Node transformNode(Node oldNode) {
    LTLInfixOperatorNode implicationOperator = (LTLInfixOperatorNode) oldNode;
    LTLNode innerLeft = implicationOperator.getLeft();
    LTLNode innerRight = implicationOperator.getRight();
    return new LTLInfixOperatorNode(OR, new LTLPrefixOperatorNode(NOT, innerLeft), innerRight);
}
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 17 with LTLNode

use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.

the class ConvertNotFinallyToGloballyNot method transformNode.

@Override
public Node transformNode(Node node) {
    LTLPrefixOperatorNode not = (LTLPrefixOperatorNode) node;
    LTLPrefixOperatorNode innerFinally = (LTLPrefixOperatorNode) not.getArgument();
    LTLNode inner = innerFinally.getArgument();
    return new LTLPrefixOperatorNode(GLOBALLY, new LTLPrefixOperatorNode(NOT, inner));
}
Also used : LTLPrefixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode)

Example 18 with LTLNode

use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.

the class ConvertNotFormulaToNegatedBFormula method transformNode.

@Override
public Node transformNode(Node node) {
    LTLPrefixOperatorNode notOperator = (LTLPrefixOperatorNode) node;
    LTLNode argument = notOperator.getArgument();
    LTLBPredicateNode bPredicateNode = (LTLBPredicateNode) argument;
    PredicateNode negatedPredicate = bPredicateNode.getPredicate().getNegatedPredicateNode();
    return new LTLBPredicateNode(negatedPredicate);
}
Also used : LTLPrefixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) LTLBPredicateNode(de.bmoth.parser.ast.nodes.ltl.LTLBPredicateNode) PredicateNode(de.bmoth.parser.ast.nodes.PredicateNode) LTLBPredicateNode(de.bmoth.parser.ast.nodes.ltl.LTLBPredicateNode)

Example 19 with LTLNode

use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.

the class ConvertNotNextToNextNot method transformNode.

@Override
public Node transformNode(Node node) {
    LTLPrefixOperatorNode notOperator = (LTLPrefixOperatorNode) node;
    LTLNode argument = notOperator.getArgument();
    LTLPrefixOperatorNode nextOperator = (LTLPrefixOperatorNode) argument;
    LTLPrefixOperatorNode newNot = new LTLPrefixOperatorNode(NOT, nextOperator.getArgument());
    return new LTLPrefixOperatorNode(NEXT, newNot);
}
Also used : LTLPrefixOperatorNode(de.bmoth.parser.ast.nodes.ltl.LTLPrefixOperatorNode) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode)

Example 20 with LTLNode

use of de.bmoth.parser.ast.nodes.ltl.LTLNode in project bmoth by hhu-stups.

the class ConvertNotRelease method transformNode.

@Override
public Node transformNode(Node node) {
    LTLPrefixOperatorNode not = (LTLPrefixOperatorNode) node;
    LTLInfixOperatorNode release = (LTLInfixOperatorNode) not.getArgument();
    LTLNode innerLeft = release.getLeft();
    LTLNode innerRight = release.getRight();
    return new LTLInfixOperatorNode(UNTIL, new LTLPrefixOperatorNode(NOT, innerLeft), new LTLPrefixOperatorNode(NOT, innerRight));
}
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)

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