src/probagate.cpp
// The code is mostly copied from 'propagate.cpp' and specialized.  We only
// comment on the differences.  More explanations are in 'propagate.cpp'.
The code is mostly copied from 'propagate.cpp' and specialized.  We only
comment on the differences.  More explanations are in 'propagate.cpp'.
The code is mostly copied from ' propagate . cpp ' and specialized . We only comment on the differences . More explanations are in ' propagate . cpp ' .
inline void Internal::probe_assign (int lit, int parent) {
  assert (simplifying);
  int idx = vidx (lit);
  assert (!vals[idx]);
  assert (!flags (idx).eliminated () || !parent);
  assert (!parent || val (parent) > 0);
  Var & v = var (idx);
  v.level = level;
  v.trail = (int) trail.size ();
  const signed char tmp = sign (lit);
  v.parent = tmp < 0 ? -parent : parent;
  if (!level) learn_unit_clause (lit);
  else assert (level == 1);
  vals[idx] = tmp;
  vals[-idx] = -tmp;
  assert (val (lit) > 0);
  assert (val (-lit) < 0);
  propfixed (lit) = stats.all.fixed;
  trail.push_back (lit);
  if (parent) LOG ("assign %d parent %d", lit, parent);
  else if (level) LOG ("assign %d probe", lit);
  else LOG ("assign %d negated failed literal UIP", lit);
  assert (watches ());
  if (opts.prefetch)
    __builtin_prefetch (&*(watches (-lit).begin ()));
}
inline void Internal :: probe_assign ( int lit , int parent ) { assert ( simplifying ) ; int idx = vidx ( lit ) ; assert ( ! vals [ idx ] ) ; assert ( ! flags ( idx ) . eliminated ( ) || ! parent ) ; assert ( ! parent || val ( parent ) > 0 ) ; Var & v = var ( idx ) ; v . level = level ; v . trail = ( int ) trail . size ( ) ; const signed char tmp = sign ( lit ) ; v . parent = tmp < 0 ? - parent : parent ; if ( ! level ) learn_unit_clause ( lit ) ; else assert ( level == 1 ) ; vals [ idx ] = tmp ; vals [ - idx ] = - tmp ; assert ( val ( lit ) > 0 ) ; assert ( val ( - lit ) < 0 ) ; propfixed ( lit ) = stats . all . fixed ; trail . push_back ( lit ) ; if ( parent ) LOG ( " " , lit , parent ) ; else if ( level ) LOG ( " " , lit ) ; else LOG ( " " , lit ) ; assert ( watches ( ) ) ; if ( opts . prefetch ) __builtin_prefetch ( & * ( watches ( - lit ) . begin ( ) ) ) ; }
The code is mostly copied from 'propagate.cpp' and specialized.
The code is mostly copied from ' propagate . cpp ' and specialized .
// no phase saving here ...