Search in sources :

Example 6 with BuechiAutomaton

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

the class LTLBuechiTest method testGraphConstructionUntilNext.

@Test
public void testGraphConstructionUntilNext() throws ParserException {
    String formula = "{0=1} U (X {1=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 7 with BuechiAutomaton

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

the class LTLBuechiTest method testGraphConstructionUntil2.

@Test
public void testGraphConstructionUntil2() throws ParserException {
    String formula = "{1=1} U ({2=2} U {3=3})";
    LTLFormula ltlFormula = Parser.getLTLFormulaAsSemanticAst(formula);
    LTLNode node = LTLTransformations.transformLTLNode(ltlFormula.getLTLNode());
    BuechiAutomaton buechiAutomaton = new BuechiAutomaton(node);
    // should be 4?
    // assertEquals(6, 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 8 with BuechiAutomaton

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

the class LTLBuechiTest method testGraphConstructionAnd.

@Test
public void testGraphConstructionAnd() throws ParserException {
    String formula = "G (X ( {0=1} & {2=3} ) )";
    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 9 with BuechiAutomaton

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

the class LTLBuechiTest method testGraphConstructionUntil.

@Test
public void testGraphConstructionUntil() throws ParserException {
    String formula = "{0=1} U {1=1}";
    LTLFormula ltlFormula = Parser.getLTLFormulaAsSemanticAst(formula);
    LTLNode node = LTLTransformations.transformLTLNode(ltlFormula.getLTLNode());
    BuechiAutomaton buechiAutomaton = new BuechiAutomaton(node);
    assertEquals(3, 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 10 with BuechiAutomaton

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

the class LTLBuechiTest method testGraphConstructionGloballyFalsity.

@Test
public void testGraphConstructionGloballyFalsity() throws ParserException {
    String formula = "G ({0=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)

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