74 int ls = ((l.n->
t == t) || (l.n->
t ==
NT_VAR)) ? l.n->
same : 1;
75 int rs = ((r.n->
t == t) || (r.n->
t ==
NT_VAR)) ? r.n->
same : 1;
112 #ifdef GECODE_HAS_SET_VARS
166 BoolExpr::NNF::operator
delete(
void*) {}
169 BoolExpr::NNF::operator
delete(
void*,
Region&) {}
172 BoolExpr::NNF::operator
new(
size_t s,
Region&
r) {
178 if ((t ==
NT_VAR) && !u.a.neg)
187 u.a.x->rl.post(home, b, !u.a.neg, icl);
189 #ifdef GECODE_HAS_SET_VARS
191 u.a.x->rs.post(home, b, !u.a.neg);
195 u.a.x->m->post(home, b, !u.a.neg, icl);
219 if (u.b.l->u.a.neg) n = !n;
221 l = u.b.l->expr(home,icl);
226 if (u.b.r->u.a.neg) n = !n;
228 r = u.b.r->expr(home,icl);
256 u.a.x->rl.post(home, b, !u.a.neg, icl);
260 #ifdef GECODE_HAS_SET_VARS
264 u.a.x->rs.post(home, b, !u.a.neg);
272 u.a.x->m->post(home, b, !u.a.neg, icl);
277 bp[ip++] =
expr(home, icl);
281 u.b.l->post(home, t, bp, bn, ip, in, icl);
282 u.b.r->post(home, t, bp, bn, ip, in, icl);
293 u.a.x->rl.post(home, !u.a.neg, icl);
295 #ifdef GECODE_HAS_SET_VARS
297 u.a.x->rs.post(home, !u.a.neg);
303 u.a.x->m->post(home, b,
false, icl);
307 u.b.l->rel(home, icl);
308 u.b.r->rel(home, icl);
320 u.b.r->u.a.x->rl.post(home, u.b.l->u.a.x->x,
321 u.b.l->u.a.neg==u.b.r->u.a.neg, icl);
323 u.b.l->u.a.x->rl.post(home, u.b.r->u.a.x->x,
324 u.b.l->u.a.neg==u.b.r->u.a.neg, icl);
325 }
else if (u.b.l->t==
NT_RLIN) {
326 u.b.l->u.a.x->rl.post(home, u.b.r->expr(home,icl),
327 !u.b.l->u.a.neg,icl);
328 }
else if (u.b.r->t==
NT_RLIN) {
329 u.b.r->u.a.x->rl.post(home, u.b.l->expr(home,icl),
330 !u.b.r->u.a.neg,icl);
331 #ifdef GECODE_HAS_SET_VARS
333 u.b.r->u.a.x->rs.post(home, u.b.l->u.a.x->x,
334 u.b.l->u.a.neg==u.b.r->u.a.neg);
336 u.b.l->u.a.x->rs.post(home, u.b.r->u.a.x->x,
337 u.b.l->u.a.neg==u.b.r->u.a.neg);
338 }
else if (u.b.l->t==
NT_RSET) {
339 u.b.l->u.a.x->rs.post(home, u.b.r->expr(home,icl),
341 }
else if (u.b.r->t==
NT_RSET) {
342 u.b.r->u.a.x->rs.post(home, u.b.l->expr(home,icl),
358 #ifdef GECODE_HAS_SET_VARS
363 x->
t = n->
t; x->
u.
a.neg =
neg; x->
u.
a.x = n;
372 return nnf(r,n->
l,!neg);
378 x->
u.
b.l = nnf(r,n->
l,neg);
379 x->
u.
b.r = nnf(r,n->
r,neg);
381 if ((x->
u.
b.l->t == t) || (x->
u.
b.l->t ==
NT_VAR)) {
382 p_l=x->
u.
b.l->p; n_l=x->
u.
b.l->n;
387 if ((x->
u.
b.r->t == t) || (x->
u.
b.r->t ==
NT_VAR)) {
388 p_r=x->
u.
b.r->p; n_r=x->
u.
b.r->n;
400 x->
u.
b.l = nnf(r,n->
l,neg);
401 x->
u.
b.r = nnf(r,n->
r,
false);
456 return e.
expr(home,icl);
463 if (home.
failed())
return;
514 for (
int i=b.
size();
i--;)