Search in sources :

Example 6 with ModelCheckingResult

use of de.bmoth.modelchecker.ModelCheckingResult 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 7 with ModelCheckingResult

use of de.bmoth.modelchecker.ModelCheckingResult 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)

Example 8 with ModelCheckingResult

use of de.bmoth.modelchecker.ModelCheckingResult in project bmoth by hhu-stups.

the class LiftsTest method testFastDoors.

@Test
public void testFastDoors() {
    MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "FastDoors.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)

Example 9 with ModelCheckingResult

use of de.bmoth.modelchecker.ModelCheckingResult in project bmoth by hhu-stups.

the class LiftsTest method testMissingEmergencyCall.

@Test
public void testMissingEmergencyCall() {
    MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "EmergencyCallFail.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)

Example 10 with ModelCheckingResult

use of de.bmoth.modelchecker.ModelCheckingResult in project bmoth by hhu-stups.

the class LiftsTest method testLiftDoesNotMoveTowardsFirstPressedButton.

@Ignore("iseq not implemented in FormularToZ3Translator")
@Test
public void testLiftDoesNotMoveTowardsFirstPressedButton() {
    MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "LiftDoesNotMoveTowardsFirstPressedButton.mch");
    ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
    assertEquals(false, result.isCorrect());
}
Also used : MachineNode(de.bmoth.parser.ast.nodes.MachineNode) ModelCheckingResult(de.bmoth.modelchecker.ModelCheckingResult) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

ModelCheckingResult (de.bmoth.modelchecker.ModelCheckingResult)28 Test (org.junit.Test)24 MachineNode (de.bmoth.parser.ast.nodes.MachineNode)22 ExplicitStateModelChecker (de.bmoth.modelchecker.esmc.ExplicitStateModelChecker)2 BoolExpr (com.microsoft.z3.BoolExpr)1 Expr (com.microsoft.z3.Expr)1 Model (com.microsoft.z3.Model)1 Status (com.microsoft.z3.Status)1 ParserException (de.bmoth.parser.ParserException)1 IOException (java.io.IOException)1 Ignore (org.junit.Ignore)1 Benchmark (org.openjdk.jmh.annotations.Benchmark)1