Skip to content
Snippets Groups Projects
Commit 31486be4 authored by Sebastian Krings's avatar Sebastian Krings
Browse files

refactoring of enum, renamed element

parent 30832b68
No related branches found
No related tags found
No related merge requests found
......@@ -17,14 +17,15 @@ import de.prob.prolog.term.PrologTerm;
public class ConstraintBasedAssertionCheckCommand implements IComposableCommand {
public static enum ResultType {
TIMEOUT, COUNTER_EXAMPLE, NO_COUNTER_EXAMPLE
INTERRUPTED, COUNTER_EXAMPLE, NO_COUNTER_EXAMPLE
};
private static final String COMMAND_NAME = "cbc_static_assertion_violation_checking";
private static final String RESULT_VARIABLE = "R";
private ResultType result;
private ListPrologTerm counterExampleState;
private Operation counterExampleOperation;
private String counterExampleStateID;
public ConstraintBasedAssertionCheckCommand() {
}
......@@ -50,8 +51,8 @@ public class ConstraintBasedAssertionCheckCommand implements IComposableCommand
throws CommandException {
final PrologTerm resultTerm = bindings.get(RESULT_VARIABLE);
final ResultType result;
if (resultTerm.hasFunctor("time_out", 0)) {
result = ResultType.TIMEOUT;
if (resultTerm.hasFunctor("interrupted", 0)) {
result = ResultType.INTERRUPTED;
} else if (resultTerm.hasFunctor("no_counterexample_found", 0)) {
result = ResultType.NO_COUNTER_EXAMPLE;
} else if (resultTerm.hasFunctor("counterexample_found", 1)) {
......
......@@ -56,7 +56,7 @@ public class AssertionCheckFinishedListener extends ProBJobFinishedListener {
message = "The model contains a Counter-Example state, it will be shown in the state view.";
displayCounterExample(command, animator);
break;
case TIMEOUT:
case INTERRUPTED:
dialogType = MessageDialog.WARNING;
dialogTitle = " Interrupt";
message = "The deadlock check has been interrupted by the user or a time-out.";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment