use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class ModelCheckerPerformanceTest method testLeuschelPerformanceMachines3.
@Test
public // @Benchmark
void testLeuschelPerformanceMachines3() throws IOException {
MachineNode machine = parseMachineFromFile(dir + "/performance/CounterErr2.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(machine);
assertEquals(false, result.isCorrect());
}
use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class MachinesTest method testAOperationParameter.
@Test
public void testAOperationParameter() {
String machine = MACHINE_NAME;
machine += VARIABLES_X_Y;
machine += INVARIANT_X_Y;
machine += INITIALISATION_X_1_Y_TRUE;
machine += "OPERATIONS foo(p) = SELECT p = 1 THEN x := p END \n";
machine += "END";
MachineNode machineAsSemanticAst = parseMachine(machine);
OperationNode operationNode = machineAsSemanticAst.getOperations().get(0);
DeclarationNode p = operationNode.getParams().get(0);
assertEquals("p", p.getName());
assertEquals(INTEGER, p.getType().toString());
}
use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class MachinesTest method testAnySubstitution.
@Test
public void testAnySubstitution() {
String machine = MACHINE_NAME;
machine += VARIABLES_X_Y;
machine += INVARIANT_X_Y;
machine += INITIALISATION_X_1_Y_TRUE;
machine += "OPERATIONS foo = ANY p WHERE 1=1 THEN x := p END \n";
machine += "END";
MachineNode machineAsSemanticAst = parseMachine(machine);
AnySubstitutionNode any = (AnySubstitutionNode) machineAsSemanticAst.getOperations().get(0).getSubstitution();
DeclarationNode p = any.getParameters().get(0);
assertEquals("p", p.getName());
assertEquals(INTEGER, p.getType().toString());
}
use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class ModelCheckerPerformanceTest method testLeuschelPerformanceMachines2.
@Test
public // @Benchmark
void testLeuschelPerformanceMachines2() throws IOException {
MachineNode machine = parseMachineFromFile(dir + "/performance/SimpleSetIncrease.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(machine);
assertEquals(false, result.isCorrect());
}
use of de.bmoth.parser.ast.nodes.MachineNode in project bmoth by hhu-stups.
the class ModelCheckerPerformanceTest method testLeuschelPerformanceMachines1.
@Test
@Benchmark
public void testLeuschelPerformanceMachines1() throws IOException {
MachineNode machine = parseMachineFromFile(dir + "/performance/CounterErr.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(machine);
assertEquals(false, result.isCorrect());
}
Aggregations