use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class LiftsTest method testSlowDoors.
@Test
public void testSlowDoors() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "SlowDoors.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(false, result.isCorrect());
}
use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class LiftsTest method testLowerHigher.
@Test
public void testLowerHigher() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "LiftLowerHigher.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(false, result.isCorrect());
assertEquals("{doors_open=false, moving=true, current_floor=-1}", result.getLastState().toString());
}
use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class ModelCheckerMachineFilesTest method testSimpleModelWithoutVariables.
@Test
public void testSimpleModelWithoutVariables() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "OnlyConstants.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(true, result.isCorrect());
}
use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class ModelCheckerMachineFilesTest method testSimpleModelsWithoutOperations.
@Test
public void testSimpleModelsWithoutOperations() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "OnlyInitViolation.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(false, result.isCorrect());
assertEquals(1, result.getSteps());
MachineNode simpleMachineWithoutViolation = parseMachineFromFile(dir + "OnlyInitNoViolation.mch");
result = ExplicitStateModelChecker.check(simpleMachineWithoutViolation);
assertEquals(true, result.isCorrect());
assertEquals(1, result.getSteps());
}
use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class Issue66Test method testMachine.
@Test
public void testMachine() throws IOException {
MachineNode theMachine = parseMachineFromFile(dir + "LargeExponent.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(theMachine);
assertEquals(false, result.isCorrect());
}
Aggregations