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