Search in sources :

Example 1 with LTLNode

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

the class LTLBuechiTest method testGraphConstructionGloballyNotFalse.

@Test
public void testGraphConstructionGloballyNotFalse() throws ParserException {
    String formula = "G not false";
    LTLFormula ltlFormula = Parser.getLTLFormulaAsSemanticAst(formula);
    LTLNode node = LTLTransformations.transformLTLNode(ltlFormula.getLTLNode());
    BuechiAutomaton buechiAutomaton = new BuechiAutomaton(node);
    assertEquals(1, buechiAutomaton.getFinalNodeSet().size());
    logger.log(Level.INFO, buechiAutomaton::toString);
}
Also used : LTLFormula(de.bmoth.parser.ast.nodes.ltl.LTLFormula) BuechiAutomaton(de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) Test(org.junit.Test)

Example 2 with LTLNode

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

the class LTLBuechiTest method testGraphConstructionGloballyTruth.

@Test
public void testGraphConstructionGloballyTruth() throws ParserException {
    String formula = "G ({1=1})";
    LTLFormula ltlFormula = Parser.getLTLFormulaAsSemanticAst(formula);
    LTLNode node = LTLTransformations.transformLTLNode(ltlFormula.getLTLNode());
    BuechiAutomaton buechiAutomaton = new BuechiAutomaton(node);
    assertEquals(1, buechiAutomaton.getFinalNodeSet().size());
    logger.log(Level.INFO, buechiAutomaton::toString);
}
Also used : LTLFormula(de.bmoth.parser.ast.nodes.ltl.LTLFormula) BuechiAutomaton(de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) Test(org.junit.Test)

Example 3 with LTLNode

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

the class LTLBuechiTest method testGraphConstructionNot.

@Test
public void testGraphConstructionNot() throws ParserException {
    String formula = "G not (X {0=1})";
    LTLFormula ltlFormula = Parser.getLTLFormulaAsSemanticAst(formula);
    LTLNode node = LTLTransformations.transformLTLNode(ltlFormula.getLTLNode());
    BuechiAutomaton buechiAutomaton = new BuechiAutomaton(node);
    assertEquals(2, buechiAutomaton.getFinalNodeSet().size());
    logger.log(Level.INFO, buechiAutomaton::toString);
}
Also used : LTLFormula(de.bmoth.parser.ast.nodes.ltl.LTLFormula) BuechiAutomaton(de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) Test(org.junit.Test)

Example 4 with LTLNode

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

the class LTLBuechiTest method testGraphConstructionFinallyNext.

@Test
public void testGraphConstructionFinallyNext() throws ParserException {
    String formula = "F (X {0=1})";
    LTLFormula ltlFormula = Parser.getLTLFormulaAsSemanticAst(formula);
    LTLNode node = LTLTransformations.transformLTLNode(ltlFormula.getLTLNode());
    BuechiAutomaton buechiAutomaton = new BuechiAutomaton(node);
    assertEquals(4, buechiAutomaton.getFinalNodeSet().size());
    logger.log(Level.INFO, buechiAutomaton::toString);
}
Also used : LTLFormula(de.bmoth.parser.ast.nodes.ltl.LTLFormula) BuechiAutomaton(de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) Test(org.junit.Test)

Example 5 with LTLNode

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

the class LTLBuechiTest method testGraphConstructionGloballyNext.

@Test
public void testGraphConstructionGloballyNext() throws ParserException {
    String formula = "G (X {0=1})";
    LTLFormula ltlFormula = Parser.getLTLFormulaAsSemanticAst(formula);
    LTLNode node = LTLTransformations.transformLTLNode(ltlFormula.getLTLNode());
    BuechiAutomaton buechiAutomaton = new BuechiAutomaton(node);
    assertEquals(2, buechiAutomaton.getFinalNodeSet().size());
    logger.log(Level.INFO, buechiAutomaton::toString);
}
Also used : LTLFormula(de.bmoth.parser.ast.nodes.ltl.LTLFormula) BuechiAutomaton(de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton) LTLNode(de.bmoth.parser.ast.nodes.ltl.LTLNode) Test(org.junit.Test)

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