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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations