|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| package org.sat4j.minisat.constraints; |
|
8 |
| |
|
9 |
| import org.sat4j.minisat.constraints.cnf.WLClause; |
|
10 |
| import org.sat4j.minisat.core.Constr; |
|
11 |
| import org.sat4j.specs.ContradictionException; |
|
12 |
| import org.sat4j.specs.IVecInt; |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| public class ClausalDataStructureWL extends AbstractDataStructureFactory { |
|
19 |
| |
|
20 |
| private static final long serialVersionUID = 1L; |
|
21 |
| |
|
22 |
| |
|
23 |
| |
|
24 |
| |
|
25 |
| |
|
26 |
| |
|
27 |
1251339
| public Constr createClause(IVecInt literals) throws ContradictionException {
|
|
28 |
1251339
| IVecInt v = WLClause.sanityCheck(literals, getVocabulary(), solver);
|
|
29 |
1251329
| if (v == null)
|
|
30 |
67
| return null;
|
|
31 |
1251262
| return WLClause.brandNewClause(solver, getVocabulary(), v);
|
|
32 |
| } |
|
33 |
| |
|
34 |
53513972
| public Constr createUnregisteredClause(IVecInt literals) {
|
|
35 |
53513972
| return new WLClause(literals, getVocabulary());
|
|
36 |
| } |
|
37 |
| } |