View Javadoc

1   /*******************************************************************************
2    * SAT4J: a SATisfiability library for Java Copyright (C) 2004, 2012 Artois University and CNRS
3    *
4    * All rights reserved. This program and the accompanying materials
5    * are made available under the terms of the Eclipse Public License v1.0
6    * which accompanies this distribution, and is available at
7    *  http://www.eclipse.org/legal/epl-v10.html
8    *
9    * Alternatively, the contents of this file may be used under the terms of
10   * either the GNU Lesser General Public License Version 2.1 or later (the
11   * "LGPL"), in which case the provisions of the LGPL are applicable instead
12   * of those above. If you wish to allow use of your version of this file only
13   * under the terms of the LGPL, and not to allow others to use your version of
14   * this file under the terms of the EPL, indicate your decision by deleting
15   * the provisions above and replace them with the notice and other provisions
16   * required by the LGPL. If you do not delete the provisions above, a recipient
17   * may use your version of this file under the terms of the EPL or the LGPL.
18   *
19   * Based on the original MiniSat specification from:
20   *
21   * An extensible SAT solver. Niklas Een and Niklas Sorensson. Proceedings of the
22   * Sixth International Conference on Theory and Applications of Satisfiability
23   * Testing, LNCS 2919, pp 502-518, 2003.
24   *
25   * See www.minisat.se for the original solver in C++.
26   *
27   * Contributors:
28   *   CRIL - initial API and implementation
29   *******************************************************************************/
30  
31  package org.sat4j.pb.constraints;
32  
33  import java.io.FileNotFoundException;
34  import java.io.IOException;
35  
36  import org.sat4j.reader.ParseFormatException;
37  
38  /**
39   * @author leberre
40   * 
41   *         Those pseudo boolean problems were kindly provided by Niklas Een.
42   * 
43   */
44  public abstract class AbstractPseudoBooleanAndPigeonHoleTest extends
45          AbstractEZPseudoBooleanAndPigeonHoleTest {
46  
47      protected static final String PREFIX = System.getProperty("test.pbprefix");
48  
49      public AbstractPseudoBooleanAndPigeonHoleTest(String arg) {
50          super(arg);
51      }
52  
53      public void testaloul1011() throws FileNotFoundException, IOException,
54              ParseFormatException {
55          assertFalse(solveInstance(PREFIX
56                  + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl10_11_pb.cnf.cr.opb"));
57      }
58  
59      public void testaloul1015() throws FileNotFoundException, IOException,
60              ParseFormatException {
61          assertFalse(solveInstance(PREFIX
62                  + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl10_15_pb.cnf.cr.opb"));
63      }
64  
65      public void testaloul1020() throws FileNotFoundException, IOException,
66              ParseFormatException {
67          assertFalse(solveInstance(PREFIX
68                  + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl10_20_pb.cnf.cr.opb"));
69      }
70  
71      public void testaloul1516() throws FileNotFoundException, IOException,
72              ParseFormatException {
73          assertFalse(solveInstance(PREFIX
74                  + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl15_16_pb.cnf.cr.opb"));
75      }
76  
77      public void testaloul1520() throws FileNotFoundException, IOException,
78              ParseFormatException {
79          assertFalse(solveInstance(PREFIX
80                  + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl15_20_pb.cnf.cr.opb"));
81      }
82  
83      public void testaloul1525() throws FileNotFoundException, IOException,
84              ParseFormatException {
85          assertFalse(solveInstance(PREFIX
86                  + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl15_25_pb.cnf.cr.opb"));
87      }
88  
89      public void testaloul2021() throws FileNotFoundException, IOException,
90              ParseFormatException {
91          assertFalse(solveInstance(PREFIX
92                  + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl20_21_pb.cnf.cr.opb"));
93      }
94  
95      public void testaloul2025() throws FileNotFoundException, IOException,
96              ParseFormatException {
97          assertFalse(solveInstance(PREFIX
98                  + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl20_25_pb.cnf.cr.opb"));
99      }
100 
101     public void testaloul2030() throws FileNotFoundException, IOException,
102             ParseFormatException {
103         assertFalse(solveInstance(PREFIX
104                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl20_30_pb.cnf.cr.opb"));
105     }
106 
107     public void testaloul3031() throws FileNotFoundException, IOException,
108             ParseFormatException {
109         assertFalse(solveInstance(PREFIX
110                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl30_31_pb.cnf.cr.opb"));
111     }
112 
113     public void testaloul3035() throws FileNotFoundException, IOException,
114             ParseFormatException {
115         assertFalse(solveInstance(PREFIX
116                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl30_35_pb.cnf.cr.opb"));
117     }
118 
119     public void testaloul3040() throws FileNotFoundException, IOException,
120             ParseFormatException {
121         assertFalse(solveInstance(PREFIX
122                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl30_40_pb.cnf.cr.opb"));
123     }
124 
125     public void testaloul3536() throws FileNotFoundException, IOException,
126             ParseFormatException {
127         assertFalse(solveInstance(PREFIX
128                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl35_36_pb.cnf.cr.opb"));
129     }
130 
131     public void testaloul3540() throws FileNotFoundException, IOException,
132             ParseFormatException {
133         assertFalse(solveInstance(PREFIX
134                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl35_40_pb.cnf.cr.opb"));
135     }
136 
137     public void testaloul3545() throws FileNotFoundException, IOException,
138             ParseFormatException {
139         assertFalse(solveInstance(PREFIX
140                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl35_45_pb.cnf.cr.opb"));
141     }
142 
143     public void testaloul4041() throws FileNotFoundException, IOException,
144             ParseFormatException {
145         assertFalse(solveInstance(PREFIX
146                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl40_41_pb.cnf.cr.opb"));
147     }
148 
149     public void testaloul4045() throws FileNotFoundException, IOException,
150             ParseFormatException {
151         assertFalse(solveInstance(PREFIX
152                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl40_45_pb.cnf.cr.opb"));
153     }
154 
155     public void testaloul4050() throws FileNotFoundException, IOException,
156             ParseFormatException {
157         assertFalse(solveInstance(PREFIX
158                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl40_50_pb.cnf.cr.opb"));
159     }
160 
161     public void testaloul5051() throws FileNotFoundException, IOException,
162             ParseFormatException {
163         assertFalse(solveInstance(PREFIX
164                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl50_51_pb.cnf.cr.opb"));
165     }
166 
167     public void testaloul5055() throws FileNotFoundException, IOException,
168             ParseFormatException {
169         assertFalse(solveInstance(PREFIX
170                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl50_55_pb.cnf.cr.opb"));
171     }
172 
173     public void testaloul5060() throws FileNotFoundException, IOException,
174             ParseFormatException {
175         assertFalse(solveInstance(PREFIX
176                 + "normalized-opb/submitted/aloul/FPGA_SAT05/normalized-chnl50_60_pb.cnf.cr.opb"));
177     }
178 
179     public void testncirc103() throws FileNotFoundException, IOException,
180             ParseFormatException {
181         assertTrue(solveInstance(PREFIX
182                 + "normalized-opb/submitted/manquinho/ttp/normalized-circ10_3.opb"));
183     }
184 
185     public void testndata103() throws FileNotFoundException, IOException,
186             ParseFormatException {
187         assertTrue(solveInstance(PREFIX
188                 + "normalized-opb/submitted/manquinho/ttp/normalized-data10_3.opb"));
189     }
190 
191     public void testPN10() throws FileNotFoundException, IOException,
192             ParseFormatException {
193         assertFalse(solveInstance(PREFIX + "pigeons/PN-10-9.opb"));
194     }
195 }