Search in sources :

Example 1 with BuechiAutomaton

use of de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton 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 BuechiAutomaton

use of de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton 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 BuechiAutomaton

use of de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton 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 BuechiAutomaton

use of de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton 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 BuechiAutomaton

use of de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton 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

BuechiAutomaton (de.bmoth.parser.ast.nodes.ltl.BuechiAutomaton)19 LTLFormula (de.bmoth.parser.ast.nodes.ltl.LTLFormula)19 LTLNode (de.bmoth.parser.ast.nodes.ltl.LTLNode)19 Test (org.junit.Test)19 Ignore (org.junit.Ignore)1