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