use of de.bmoth.modelchecker.esmc.ExplicitStateModelChecker in project bmoth by hhu-stups.
the class Issue59Test method testIssue59.
@Test
public void testIssue59() {
String machine = "MACHINE SimpleMachine\n";
machine += "VARIABLES x\n";
machine += "INVARIANT x : INTEGER &\n";
machine += "\tx**2 = x*x \n";
machine += "INITIALISATION x := -3\n";
machine += "OPERATIONS\n";
machine += "\tIncX = SELECT x < 50 THEN x := x+1 END\n";
machine += "END";
ModelCheckingResult result = new ExplicitStateModelChecker(parseMachine(machine)).check();
assertEquals(true, result.isCorrect());
}
use of de.bmoth.modelchecker.esmc.ExplicitStateModelChecker in project bmoth by hhu-stups.
the class AppView method handleCheck.
@FXML
public void handleCheck() {
if (codeArea.getText().replaceAll("\\s+", "").length() > 0) {
parseMachineNode();
modelChecker = new ExplicitStateModelChecker(machineNode);
checkwithChecker(modelChecker);
}
}
use of de.bmoth.modelchecker.esmc.ExplicitStateModelChecker in project bmoth by hhu-stups.
the class Issue59Test method testIssue59WithAdditionalInvariant.
@Test
public void testIssue59WithAdditionalInvariant() {
String machine = "MACHINE SimpleMachine\n";
machine += "VARIABLES x\n";
machine += "INVARIANT x : INTEGER &\n";
machine += "\tx**2 = x*x &\n";
machine += "\t#x.(x:INTEGER & {x} \\/ {1,2} = {1,2})\n";
machine += "INITIALISATION x := -3\n";
machine += "OPERATIONS\n";
machine += "\tIncX = SELECT x < 50 THEN x := x+1 END\n";
machine += "END";
ModelCheckingResult result = new ExplicitStateModelChecker(parseMachine(machine)).check();
assertEquals(true, result.isCorrect());
}
Aggregations