@Test(groups = "1s") public void testAttachClause() throws Exception { }
private void attachClause(Clause cr) { assert cr.size() > 1; ArrayList<Watcher> l0 = watches_.get(negated(cr._g(0))); if (l0 == null) { l0 = new ArrayList<>(); watches_.put(negated(cr._g(0)), l0); } ArrayList<Watcher> l1 = watches_.get(negated(cr._g(1))); if (l1 == null) { l1 = new ArrayList<>(); watches_.put(negated(cr._g(1)), l1); } l0.add(new Watcher(cr, cr._g(1))); l1.add(new Watcher(cr, cr._g(0))); }
SatSolver implements SatFactory { private void attachClause(Clause cr) { assert cr.size() > 1; ArrayList<Watcher> l0 = watches_.get(negated(cr._g(0))); if (l0 == null) { l0 = new ArrayList<>(); watches_.put(negated(cr._g(0)), l0); } ArrayList<Watcher> l1 = watches_.get(negated(cr._g(1))); if (l1 == null) { l1 = new ArrayList<>(); watches_.put(negated(cr._g(1)), l1); } l0.add(new Watcher(cr, cr._g(1))); l1.add(new Watcher(cr, cr._g(0))); } }
SatSolver implements SatFactory { private void attachClause(Clause cr) { assert cr.size() > 1; ArrayList<Watcher> l0 = watches_.get(negated(cr._g(0))); if (l0 == null) { l0 = new ArrayList<>(); watches_.put(negated(cr._g(0)), l0); } ArrayList<Watcher> l1 = watches_.get(negated(cr._g(1))); if (l1 == null) { l1 = new ArrayList<>(); watches_.put(negated(cr._g(1)), l1); } l0.add(new Watcher(cr, cr._g(1))); l1.add(new Watcher(cr, cr._g(0))); } SatSolver(); }
SatSolver implements SatFactory { private void attachClause(Clause cr) { assert cr.size() > 1; ArrayList<Watcher> l0 = watches_.get(negated(cr._g(0))); if (l0 == null) { l0 = new ArrayList<>(); watches_.put(negated(cr._g(0)), l0); } ArrayList<Watcher> l1 = watches_.get(negated(cr._g(1))); if (l1 == null) { l1 = new ArrayList<>(); watches_.put(negated(cr._g(1)), l1); } l0.add(new Watcher(cr, cr._g(1))); l1.add(new Watcher(cr, cr._g(0))); } SatSolver(); @Override SatSolver _me(); int newVariable(); boolean addClause(TIntList ps); boolean learnClause(int... ps); boolean addClause(int l); void cancelUntil(int level); int trailMarker(); int nLearnt(); boolean propagateOneLiteral(int lit); void detachLearnt(int ci); static int makeLiteral(int var, boolean sign); static int negated(int l); static boolean sign(int l); static int var(int l); void copyFrom(SatSolver o); long nbclauses(); long numvars(); }
SatSolver implements SatFactory { private void attachClause(Clause cr) { assert cr.size() > 1; ArrayList<Watcher> l0 = watches_.get(negated(cr._g(0))); if (l0 == null) { l0 = new ArrayList<>(); watches_.put(negated(cr._g(0)), l0); } ArrayList<Watcher> l1 = watches_.get(negated(cr._g(1))); if (l1 == null) { l1 = new ArrayList<>(); watches_.put(negated(cr._g(1)), l1); } l0.add(new Watcher(cr, cr._g(1))); l1.add(new Watcher(cr, cr._g(0))); } SatSolver(); @Override SatSolver _me(); int newVariable(); boolean addClause(TIntList ps); boolean learnClause(int... ps); boolean addClause(int l); void cancelUntil(int level); int trailMarker(); int nLearnt(); boolean propagateOneLiteral(int lit); void detachLearnt(int ci); static int makeLiteral(int var, boolean sign); static int negated(int l); static boolean sign(int l); static int var(int l); void copyFrom(SatSolver o); long nbclauses(); long numvars(); public boolean ok_; public ArrayList<Clause> clauses; public ArrayList<Clause> learnts; public TIntObjectHashMap<TIntArrayList> implies_; public TIntArrayList touched_variables_; }