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

refactored counter example

parent b0a97f59
No related branches found
No related tags found
No related merge requests found
...@@ -6,8 +6,6 @@ public interface ICounterExample { ...@@ -6,8 +6,6 @@ public interface ICounterExample {
public boolean timeoutOccured(); public boolean timeoutOccured();
public String getMessage();
public boolean isProof(); public boolean isProof();
} }
\ No newline at end of file
...@@ -26,6 +26,7 @@ class CounterExample implements ICounterExample { ...@@ -26,6 +26,7 @@ class CounterExample implements ICounterExample {
this.timeoutOccured = timeoutOccured; this.timeoutOccured = timeoutOccured;
} }
@Override
public boolean isProof() { public boolean isProof() {
return proof; return proof;
} }
...@@ -34,29 +35,29 @@ class CounterExample implements ICounterExample { ...@@ -34,29 +35,29 @@ class CounterExample implements ICounterExample {
this.proof = proof; this.proof = proof;
} }
/* @Override
* (non-Javadoc)
*
* @see de.prob.eventb.disprover.core.internal.ICounterExample#getMessage()
*/
public String getMessage() {
return counterExampleFound ? state.toString()
: "Counter-Example does not exists.";
}
public boolean counterExampleFound() { public boolean counterExampleFound() {
return counterExampleFound; return counterExampleFound;
} }
@Override @Override
public String toString() { public String toString() {
return getMessage(); if (counterExampleFound) {
return state.toString();
} else {
if (isProof()) {
return "No Counter-Example exists.";
} else {
return "No Counter-Example found.";
}
}
} }
void addVar(String name, String value) { void addVar(String name, String value) {
state.put(name, value); state.put(name, value);
} }
@Override
public boolean timeoutOccured() { public boolean timeoutOccured() {
return timeoutOccured; return timeoutOccured;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment