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 package org.sat4j.tools;
31
32 import java.io.PrintStream;
33 import java.io.PrintWriter;
34 import java.util.Map;
35
36 import org.sat4j.specs.ContradictionException;
37 import org.sat4j.specs.IConstr;
38 import org.sat4j.specs.ISolver;
39 import org.sat4j.specs.ISolverService;
40 import org.sat4j.specs.IVec;
41 import org.sat4j.specs.IVecInt;
42 import org.sat4j.specs.SearchListener;
43 import org.sat4j.specs.TimeoutException;
44 import org.sat4j.specs.UnitClauseProvider;
45
46 public abstract class AbstractOutputSolver implements ISolver {
47
48 protected int nbvars;
49
50 protected int nbclauses;
51
52 protected boolean fixedNbClauses = false;
53
54 protected boolean firstConstr = true;
55
56
57
58
59 private static final long serialVersionUID = 1L;
60
61 public boolean removeConstr(IConstr c) {
62 throw new UnsupportedOperationException();
63 }
64
65 public void addAllClauses(IVec<IVecInt> clauses)
66 throws ContradictionException {
67 throw new UnsupportedOperationException();
68 }
69
70 public void setTimeout(int t) {
71
72
73 }
74
75 public void setTimeoutMs(long t) {
76
77 }
78
79 public int getTimeout() {
80 return 0;
81 }
82
83
84
85
86 public long getTimeoutMs() {
87 return 0L;
88 }
89
90 public void expireTimeout() {
91
92
93 }
94
95 public boolean isSatisfiable(IVecInt assumps, boolean global)
96 throws TimeoutException {
97 throw new TimeoutException("There is no real solver behind!");
98 }
99
100 public boolean isSatisfiable(boolean global) throws TimeoutException {
101 throw new TimeoutException("There is no real solver behind!");
102 }
103
104 public void printInfos(PrintWriter output, String prefix) {
105 }
106
107 public void setTimeoutOnConflicts(int count) {
108
109 }
110
111 public boolean isDBSimplificationAllowed() {
112 return false;
113 }
114
115 public void setDBSimplificationAllowed(boolean status) {
116
117 }
118
119 public void printStat(PrintStream output, String prefix) {
120
121 }
122
123 public void printStat(PrintWriter output, String prefix) {
124
125
126 }
127
128 public Map<String, Number> getStat() {
129
130 return null;
131 }
132
133 public void clearLearntClauses() {
134
135
136 }
137
138 public int[] model() {
139 throw new UnsupportedOperationException();
140 }
141
142 public boolean model(int var) {
143 throw new UnsupportedOperationException();
144 }
145
146 public boolean isSatisfiable() throws TimeoutException {
147 throw new TimeoutException("There is no real solver behind!");
148 }
149
150 public boolean isSatisfiable(IVecInt assumps) throws TimeoutException {
151 throw new TimeoutException("There is no real solver behind!");
152 }
153
154 public int[] findModel() throws TimeoutException {
155 throw new UnsupportedOperationException();
156 }
157
158 public int[] findModel(IVecInt assumps) throws TimeoutException {
159 throw new UnsupportedOperationException();
160 }
161
162
163
164
165 public boolean removeSubsumedConstr(IConstr c) {
166 return false;
167 }
168
169
170
171
172 public IConstr addBlockingClause(IVecInt literals)
173 throws ContradictionException {
174 throw new UnsupportedOperationException();
175 }
176
177
178
179
180 public <S extends ISolverService> SearchListener<S> getSearchListener() {
181 throw new UnsupportedOperationException();
182 }
183
184
185
186
187 public <S extends ISolverService> void setSearchListener(
188 SearchListener<S> sl) {
189 }
190
191
192
193
194 public boolean isVerbose() {
195 return true;
196 }
197
198
199
200
201 public void setVerbose(boolean value) {
202
203 }
204
205
206
207
208 public void setLogPrefix(String prefix) {
209
210
211 }
212
213
214
215
216 public String getLogPrefix() {
217 return "";
218 }
219
220
221
222
223 public IVecInt unsatExplanation() {
224 throw new UnsupportedOperationException();
225 }
226
227 public int[] primeImplicant() {
228 throw new UnsupportedOperationException();
229 }
230
231 public int nConstraints() {
232
233 return 0;
234 }
235
236 public int newVar(int howmany) {
237
238 return 0;
239 }
240
241 public int nVars() {
242
243 return 0;
244 }
245
246 public boolean isSolverKeptHot() {
247 return false;
248 }
249
250 public void setKeepSolverHot(boolean value) {
251 }
252
253 public ISolver getSolvingEngine() {
254 throw new UnsupportedOperationException();
255 }
256
257 public void setUnitClauseProvider(UnitClauseProvider upl) {
258 throw new UnsupportedOperationException();
259 }
260 }