src/probagate.cpp
// Compute a dominator of two literals in the binary implication tree.
Compute a dominator of two literals in the binary implication tree.
Compute a dominator of two literals in the binary implication tree .
int Internal::probe_dominator (int a, int b) {
  int l = a, k = b;
  Var * u = &var (l), * v = &var (k);
  assert (val (l) > 0), assert (val (k) > 0);
  assert (u->level == 1), assert (v->level == 1);
  while (l != k) {
    if (u->trail > v->trail) swap (l, k), swap (u, v);
    if (!u->parent) return l;
    int parent = v->parent;
    if (k < 0) parent = -parent;
    assert  (parent), assert (val (parent) > 0);
    v = &var (k = parent);
    assert (v->level == 1);
  }
  LOG ("dominator %d of %d and %d", l, a, b);
  assert (val (l) > 0);
  return l;
}
int Internal :: probe_dominator ( int a , int b ) { int l = a , k = b ; Var * u = & var ( l ) , * v = & var ( k ) ; assert ( val ( l ) > 0 ) , assert ( val ( k ) > 0 ) ; assert ( u -> level == 1 ) , assert ( v -> level == 1 ) ; while ( l != k ) { if ( u -> trail > v -> trail ) swap ( l , k ) , swap ( u , v ) ; if ( ! u -> parent ) return l ; int parent = v -> parent ; if ( k < 0 ) parent = - parent ; assert ( parent ) , assert ( val ( parent ) > 0 ) ; v = & var ( k = parent ) ; assert ( v -> level == 1 ) ; } LOG ( " " , l , a , b ) ; assert ( val ( l ) > 0 ) ; return l ; }
Compute a dominator of two literals in the binary implication tree.
Compute a dominator of two literals in the binary implication tree .