1 package org.sat4j.minisat.constraints.cnf; 2 3 import org.sat4j.minisat.core.ILits; 4 import org.sat4j.minisat.core.UnitPropagationListener; 5 import org.sat4j.specs.IVecInt; 6 7 /******************************************************************************* 8 * SAT4J: a SATisfiability library for Java Copyright (C) 2004-2008 Daniel Le Berre 9 * 10 * All rights reserved. This program and the accompanying materials 11 * are made available under the terms of the Eclipse Public License v1.0 12 * which accompanies this distribution, and is available at 13 * http://www.eclipse.org/legal/epl-v10.html 14 * 15 * Alternatively, the contents of this file may be used under the terms of 16 * either the GNU Lesser General Public License Version 2.1 or later (the 17 * "LGPL"), in which case the provisions of the LGPL are applicable instead 18 * of those above. If you wish to allow use of your version of this file only 19 * under the terms of the LGPL, and not to allow others to use your version of 20 * this file under the terms of the EPL, indicate your decision by deleting 21 * the provisions above and replace them with the notice and other provisions 22 * required by the LGPL. If you do not delete the provisions above, a recipient 23 * may use your version of this file under the terms of the EPL or the LGPL. 24 * 25 * Based on the original MiniSat specification from: 26 * 27 * An extensible SAT solver. Niklas Een and Niklas Sorensson. Proceedings of the 28 * Sixth International Conference on Theory and Applications of Satisfiability 29 * Testing, LNCS 2919, pp 502-518, 2003. 30 * 31 * See www.minisat.se for the original solver in C++. 32 * 33 *******************************************************************************/ 34 public class OriginalBinaryClause extends BinaryClause { 35 36 /** 37 * 38 */ 39 private static final long serialVersionUID = 1L; 40 41 public OriginalBinaryClause(IVecInt ps, ILits voc) { 42 super(ps, voc); 43 } 44 45 public void setLearnt() { 46 // do nothing 47 } 48 49 public boolean learnt() { 50 return false; 51 } 52 53 /** 54 * Creates a brand new clause, presumably from external data. 55 * 56 * @param s 57 * the object responsible for unit propagation 58 * @param voc 59 * the vocabulary 60 * @param literals 61 * the literals to store in the clause 62 * @return the created clause or null if the clause should be ignored 63 * (tautology for example) 64 */ 65 public static OriginalBinaryClause brandNewClause(UnitPropagationListener s, 66 ILits voc, IVecInt literals) { 67 OriginalBinaryClause c = new OriginalBinaryClause(literals, voc); 68 c.register(); 69 return c; 70 } 71 }