Search in sources :

Example 1 with ExplicitStateModelChecker

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());
}
Also used : ExplicitStateModelChecker(de.bmoth.modelchecker.esmc.ExplicitStateModelChecker) ModelCheckingResult(de.bmoth.modelchecker.ModelCheckingResult) Test(org.junit.Test)

Example 2 with ExplicitStateModelChecker

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);
    }
}
Also used : ExplicitStateModelChecker(de.bmoth.modelchecker.esmc.ExplicitStateModelChecker) FXML(javafx.fxml.FXML)

Example 3 with ExplicitStateModelChecker

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());
}
Also used : ExplicitStateModelChecker(de.bmoth.modelchecker.esmc.ExplicitStateModelChecker) ModelCheckingResult(de.bmoth.modelchecker.ModelCheckingResult) Test(org.junit.Test)

Aggregations

ExplicitStateModelChecker (de.bmoth.modelchecker.esmc.ExplicitStateModelChecker)3 ModelCheckingResult (de.bmoth.modelchecker.ModelCheckingResult)2 Test (org.junit.Test)2 FXML (javafx.fxml.FXML)1