Search in sources :

Example 1 with MachineNode

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

the class Issue39Test method testMachine2.

@Test
public void testMachine2() throws IOException {
    MachineNode theMachine = parseMachineFromFile(dir + "SetVarToConstantNoViolation.mch");
    ModelCheckingResult result = ExplicitStateModelChecker.check(theMachine);
    assertEquals(true, result.isCorrect());
}
Also used : MachineNode(de.bmoth.parser.ast.nodes.MachineNode) ModelCheckingResult(de.bmoth.modelchecker.ModelCheckingResult) Test(org.junit.Test)

Example 2 with MachineNode

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

the class Issue39Test method testMachine1.

@Test
public void testMachine1() throws IOException {
    MachineNode theMachine = parseMachineFromFile(dir + "SetVarToConstantViolation.mch");
    ModelCheckingResult result = ExplicitStateModelChecker.check(theMachine);
    assertEquals(false, result.isCorrect());
}
Also used : MachineNode(de.bmoth.parser.ast.nodes.MachineNode) ModelCheckingResult(de.bmoth.modelchecker.ModelCheckingResult) Test(org.junit.Test)

Example 3 with MachineNode

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

the class Issue59Test method testArithmeticLawsMachine.

@Test
public void testArithmeticLawsMachine() {
    MachineNode simpleMachineWithoutViolation = parseMachineFromFile("src/test/resources/machines/OnlyInitNoViolation.mch");
    ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithoutViolation);
    assertEquals(true, result.isCorrect());
}
Also used : MachineNode(de.bmoth.parser.ast.nodes.MachineNode) ModelCheckingResult(de.bmoth.modelchecker.ModelCheckingResult) Test(org.junit.Test)

Example 4 with MachineNode

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

the class BooleanLawsTest method testSimpleModelsWithoutOperations.

@Test
public void testSimpleModelsWithoutOperations() throws IOException {
    MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "BoolLaws.mch");
    ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
    assertTrue(result.isCorrect());
}
Also used : MachineNode(de.bmoth.parser.ast.nodes.MachineNode) ModelCheckingResult(de.bmoth.modelchecker.ModelCheckingResult) Test(org.junit.Test)

Example 5 with MachineNode

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

the class LiftsTest method testAcceleration.

@Test
public void testAcceleration() {
    MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "AccMachine.mch");
    ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
    assertEquals(false, result.isCorrect());
}
Also used : MachineNode(de.bmoth.parser.ast.nodes.MachineNode) ModelCheckingResult(de.bmoth.modelchecker.ModelCheckingResult) Test(org.junit.Test)

Aggregations

MachineNode (de.bmoth.parser.ast.nodes.MachineNode)30 Test (org.junit.Test)25 ModelCheckingResult (de.bmoth.modelchecker.ModelCheckingResult)22 ParserException (de.bmoth.parser.ParserException)2 DeclarationNode (de.bmoth.parser.ast.nodes.DeclarationNode)2 Expr (com.microsoft.z3.Expr)1 BMoThParser (de.bmoth.antlr.BMoThParser)1 LtlStartContext (de.bmoth.antlr.BMoThParser.LtlStartContext)1 StartContext (de.bmoth.antlr.BMoThParser.StartContext)1 SemanticAstCreator (de.bmoth.parser.ast.SemanticAstCreator)1 TypeErrorException (de.bmoth.parser.ast.TypeErrorException)1 AnySubstitutionNode (de.bmoth.parser.ast.nodes.AnySubstitutionNode)1 OperationNode (de.bmoth.parser.ast.nodes.OperationNode)1 LTLFormula (de.bmoth.parser.ast.nodes.ltl.LTLFormula)1 IOException (java.io.IOException)1 PrintWriter (java.io.PrintWriter)1 StringJoiner (java.util.StringJoiner)1 Ignore (org.junit.Ignore)1 Benchmark (org.openjdk.jmh.annotations.Benchmark)1