-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathAbstractRunner.java
52 lines (38 loc) · 1001 Bytes
/
AbstractRunner.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package fr.lip6.move.gal.application;
import java.io.IOException;
import java.util.Set;
import org.smtlib.Log.IListener;
import fr.lip6.move.gal.Property;
import fr.lip6.move.gal.Specification;
import fr.lip6.move.gal.itscl.modele.IRunner;
public abstract class AbstractRunner implements IRunner {
protected Specification spec;
protected Set<String> doneProps;
protected IListener listener;
public AbstractRunner() {
super();
}
public void setListener(IListener l){
this.listener=l;
}
public void configure(Specification z3Spec, Set<String> doneProps) throws IOException {
this.spec = z3Spec;
this.doneProps = doneProps;
}
public abstract void solve();
public Specification getSpec() {
return spec;
}
public Set<String> getDoneProps() {
return doneProps;
}
public Boolean taskDone() {
for (Property prop : getSpec().getProperties()) {
if (!doneProps.contains(prop.getName())) {
// still some work to do
return false;
}
}
return true;
}
}