/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * Main authors: * Christian Schulte * * Copyright: * Christian Schulte, 2003 * * Last modified: * $Date: 2008-01-31 18:29:16 +0100 (Thu, 31 Jan 2008) $ by $Author: tack $ * $Revision: 6017 $ * * This file is part of Gecode, the generic constraint * development environment: * http://www.gecode.org * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #include "gecode/int/linear/int-noview.icc" namespace Gecode { namespace Int { namespace Linear { /** * \brief Test if only unit-coefficient arrays used * */ template forceinline bool isunit(ViewArray

&, ViewArray&) { return false; } template <> forceinline bool isunit(ViewArray&, ViewArray&) { return true; } template <> forceinline bool isunit(ViewArray&, ViewArray&) { return true; } template <> forceinline bool isunit(ViewArray&, ViewArray&) { return true; } /* * Linear propagators * */ template forceinline Lin::Lin(Space* home, ViewArray

& x0, ViewArray& y0, Val c0) : Propagator(home), x(x0), y(y0), c(c0) { x.subscribe(home,this,pc); y.subscribe(home,this,pc); } template forceinline Lin::Lin(Space* home, bool share, Lin& p) : Propagator(home,share,p), c(p.c) { x.update(home,share,p.x); y.update(home,share,p.y); } template PropCost Lin::cost(ModEventDelta) const { return cost_lo(x.size() + y.size(), PC_LINEAR_LO); } template forceinline size_t Lin::dispose(Space* home) { assert(!home->failed()); x.cancel(home,this,pc); y.cancel(home,this,pc); (void) Propagator::dispose(home); return sizeof(*this); } template Reflection::ActorSpec Lin::spec(const Space* home, Reflection::VarMap& m, const Support::Symbol& ati) const { Reflection::ActorSpec s(ati); return s << x.spec(home, m) << y.spec(home, m) << c; } /* * Reified linear propagators * */ template forceinline ReLin::ReLin (Space* home, ViewArray

& x, ViewArray& y, Val c, Ctrl b0) : Lin(home,x,y,c), b(b0) { b.subscribe(home,this,PC_INT_VAL); } template forceinline ReLin::ReLin (Space* home, bool share, ReLin& p) : Lin(home,share,p) { b.update(home,share,p.b); } template forceinline size_t ReLin::dispose(Space* home) { assert(!home->failed()); b.cancel(home,this,PC_BOOL_VAL); (void) Lin::dispose(home); return sizeof(*this); } template Reflection::ActorSpec ReLin::spec(const Space* home, Reflection::VarMap& m, const Support::Symbol& ati) const { Reflection::ActorSpec s(ati); return s << Lin::x.spec(home, m) << Lin::y.spec(home, m) << Lin::c << b.spec(home, m); } /* * Computing bounds * */ template void bounds_p(ModEventDelta med, ViewArray& x, Val& c, Val& sl, Val& su) { int n = x.size(); if (IntView::me(med) == ME_INT_VAL) { for (int i = n; i--; ) { Val m = x[i].min(); if (x[i].assigned()) { c -= m; x[i] = x[--n]; } else { sl -= m; su -= x[i].max(); } } x.size(n); } else { for (int i = n; i--; ) { sl -= x[i].min(); su -= x[i].max(); } } } template void bounds_n(ModEventDelta med, ViewArray& y, Val& c, Val& sl, Val& su) { int n = y.size(); if (IntView::me(med) == ME_INT_VAL) { for (int i = n; i--; ) { Val m = y[i].max(); if (y[i].assigned()) { c += m; y[i] = y[--n]; } else { sl += m; su += y[i].min(); } } y.size(n); } else { for (int i = n; i--; ) { sl += y[i].max(); su += y[i].min(); } } } template ExecStatus prop_bnd(Space* home, ModEventDelta med, Propagator* p, ViewArray

& x, ViewArray& y, Val& c) { // Eliminate singletons Val sl = 0; Val su = 0; bounds_p(med, x, c, sl, su); bounds_n(med, y, c, sl, su); if ((IntView::me(med) == ME_INT_VAL) && ((x.size() + y.size()) <= 1)) { if (x.size() == 1) { GECODE_ME_CHECK(x[0].eq(home,c)); return ES_SUBSUMED(p,sizeof(*p)); } if (y.size() == 1) { GECODE_ME_CHECK(y[0].eq(home,-c)); return ES_SUBSUMED(p,sizeof(*p)); } return (c == static_cast(0)) ? ES_SUBSUMED(p,sizeof(*p)) : ES_FAILED; } sl += c; su += c; const int mod_sl = 1; const int mod_su = 2; int mod = mod_sl | mod_su; do { if (mod & mod_sl) { mod -= mod_sl; // Propagate upper bound for positive variables for (int i = x.size(); i--; ) { const Val xi_max = x[i].max(); ModEvent me = x[i].lq(home,sl + x[i].min()); if (me_failed(me)) return ES_FAILED; if (me_modified(me)) { su += xi_max - x[i].max(); mod |= mod_su; } } // Propagate lower bound for negative variables for (int i = y.size(); i--; ) { const Val yi_min = y[i].min(); ModEvent me = y[i].gq(home,y[i].max() - sl); if (me_failed(me)) return ES_FAILED; if (me_modified(me)) { su += y[i].min() - yi_min; mod |= mod_su; } } } if (mod & mod_su) { mod -= mod_su; // Propagate lower bound for positive variables for (int i = x.size(); i--; ) { const Val xi_min = x[i].min(); ModEvent me = x[i].gq(home,su + x[i].max()); if (me_failed(me)) return ES_FAILED; if (me_modified(me)) { sl += xi_min - x[i].min(); mod |= mod_sl; } } // Propagate upper bound for negative variables for (int i = y.size(); i--; ) { const Val yi_max = y[i].max(); ModEvent me = y[i].lq(home,y[i].min() - su); if (me_failed(me)) return ES_FAILED; if (me_modified(me)) { sl += y[i].max() - yi_max; mod |= mod_sl; } } } } while (mod); return (sl == su) ? ES_SUBSUMED(p,sizeof(*p)) : ES_FIX; } /* * Bound consistent linear equation * */ template forceinline Eq::Eq(Space* home, ViewArray

& x, ViewArray& y, Val c) : Lin(home,x,y,c) {} template ExecStatus Eq::post(Space* home, ViewArray

& x, ViewArray& y, Val c) { ViewArray nva; if (y.size() == 0) { (void) new (home) Eq(home,x,nva,c); } else if (x.size() == 0) { (void) new (home) Eq(home,y,nva,-c); } else { (void) new (home) Eq(home,x,y,c); } return ES_OK; } template forceinline Eq::Eq(Space* home, bool share, Eq& p) : Lin(home,share,p) {} /** * \brief Rewriting of equality to binary propagators * */ template forceinline Actor* eqtobin(Space*, bool, Propagator&, ViewArray

&, ViewArray&, Val) { return NULL; } template forceinline Actor* eqtobin(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray&, Val c) { assert(x.size() == 2); return new (home) EqBin (home,share,p,x[0],x[1],c); } template forceinline Actor* eqtobin(Space* home, bool share, Propagator& p, ViewArray&, ViewArray& y, Val c) { assert(y.size() == 2); return new (home) EqBin (home,share,p,y[0],y[1],-c); } template forceinline Actor* eqtobin(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray& y, Val c) { if (x.size() == 2) return new (home) EqBin (home,share,p,x[0],x[1],c); if (x.size() == 1) return new (home) EqBin (home,share,p,x[0],y[0],c); return new (home) EqBin (home,share,p,y[0],y[1],-c); } /** * \brief Rewriting of equality to ternary propagators * */ template forceinline Actor* eqtoter(Space*, bool, Propagator&, ViewArray

&, ViewArray&, Val) { return NULL; } template forceinline Actor* eqtoter(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray&, Val c) { assert(x.size() == 3); return new (home) EqTer (home,share,p,x[0],x[1],x[2],c); } template forceinline Actor* eqtoter(Space* home, bool share, Propagator& p, ViewArray&, ViewArray& y, Val c) { assert(y.size() == 3); return new (home) EqTer (home,share,p,y[0],y[1],y[2],-c); } template forceinline Actor* eqtoter(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray& y, Val c) { if (x.size() == 3) return new (home) EqTer (home,share,p,x[0],x[1],x[2],c); if (x.size() == 2) return new (home) EqTer (home,share,p,x[0],x[1],y[0],c); if (x.size() == 1) return new (home) EqTer (home,share,p,y[0],y[1],x[0],-c); return new (home) EqTer (home,share,p,y[0],y[1],y[2],-c); } template Actor* Eq::copy(Space* home, bool share) { if (isunit(x,y)) { // Check whether rewriting is possible if (x.size() + y.size() == 2) return eqtobin(home,share,*this,x,y,c); if (x.size() + y.size() == 3) return eqtoter(home,share,*this,x,y,c); } return new (home) Eq(home,share,*this); } template inline Support::Symbol Eq::ati(void) { return Reflection::mangle("Gecode::Int::Linear::Eq"); } template Reflection::ActorSpec Eq::spec(const Space* home, Reflection::VarMap& m) const { return Lin::spec(home, m, ati()); } template void Eq::post(Space* home, Reflection::VarMap& vars, const Reflection::ActorSpec& spec) { spec.checkArity(3); ViewArray

x(home, vars, spec[0]); ViewArray y(home, vars, spec[1]); Val c = spec[2]->toInt(); (void) new (home) Eq(home, x, y, c); } template ExecStatus Eq::propagate(Space* home, ModEventDelta med) { return prop_bnd(home,med,this,x,y,c); } /* * Reified bound consistent linear equation * */ template forceinline ReEq::ReEq(Space* home, ViewArray

& x, ViewArray& y, Val c, Ctrl b) : ReLin(home,x,y,c,b) {} template ExecStatus ReEq::post(Space* home, ViewArray

& x, ViewArray& y, Val c, Ctrl b) { ViewArray nva; if (y.size() == 0) { (void) new (home) ReEq(home,x,nva,c,b); } else if (x.size() == 0) { (void) new (home) ReEq(home,y,nva,-c,b); } else { (void) new (home) ReEq(home,x,y,c,b); } return ES_OK; } template forceinline ReEq::ReEq(Space* home, bool share, ReEq& p) : ReLin(home,share,p) {} template Actor* ReEq::copy(Space* home, bool share) { return new (home) ReEq(home,share,*this); } template inline Support::Symbol ReEq::ati(void) { return Reflection::mangle("Gecode::Int::Linear::ReEq"); } template Reflection::ActorSpec ReEq::spec(const Space* home, Reflection::VarMap& m) const { return ReLin::spec(home, m, ati()); } template void ReEq::post(Space* home, Reflection::VarMap& vars, const Reflection::ActorSpec& spec) { spec.checkArity(4); ViewArray

x(home, vars, spec[0]); ViewArray y(home, vars, spec[1]); Val c = spec[2]->toInt(); Ctrl b(home, vars, spec[3]); (void) new (home) ReEq(home, x, y, c, b); } template ExecStatus ReEq::propagate(Space* home, ModEventDelta med) { if (b.zero()) GECODE_REWRITE(this,(Nq::post(home,x,y,c))); if (b.one()) GECODE_REWRITE(this,(Eq::post(home,x,y,c))); Val sl = 0; Val su = 0; bounds_p(med, x, c, sl, su); bounds_n(med, y, c, sl, su); if ((-sl == c) && (-su == c)) { GECODE_ME_CHECK(b.one_none(home)); return ES_SUBSUMED(this,sizeof(*this)); } if ((-sl > c) || (-su < c)) { GECODE_ME_CHECK(b.zero_none(home)); return ES_SUBSUMED(this,home); } return ES_FIX; } /* * Domain consistent linear disequation * */ template forceinline Nq::Nq(Space* home, ViewArray

& x, ViewArray& y, Val c) : Lin(home,x,y,c) {} template ExecStatus Nq::post(Space* home, ViewArray

& x, ViewArray& y, Val c) { ViewArray nva; if (y.size() == 0) { (void) new (home) Nq(home,x,nva,c); } else if (x.size() == 0) { (void) new (home) Nq(home,y,nva,-c); } else { (void) new (home) Nq(home,x,y,c); } return ES_OK; } template forceinline Nq::Nq(Space* home, bool share, Nq& p) : Lin(home,share,p) {} /** * \brief Rewriting of disequality to binary propagators * */ template forceinline Actor* nqtobin(Space*, bool, Propagator&, ViewArray

&, ViewArray&, Val) { return NULL; } template forceinline Actor* nqtobin(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray&, Val c) { assert(x.size() == 2); return new (home) NqBin (home,share,p,x[0],x[1],c); } template forceinline Actor* nqtobin(Space* home, bool share, Propagator& p, ViewArray&, ViewArray& y, Val c) { assert(y.size() == 2); return new (home) NqBin (home,share,p,y[0],y[1],-c); } template forceinline Actor* nqtobin(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray& y, Val c) { if (x.size() == 2) return new (home) NqBin (home,share,p,x[0],x[1],c); if (x.size() == 1) return new (home) NqBin (home,share,p,x[0],y[0],c); return new (home) NqBin (home,share,p,y[0],y[1],-c); } /** * \brief Rewriting of disequality to ternary propagators * */ template forceinline Actor* nqtoter(Space*, bool, Propagator&,ViewArray

&, ViewArray&, Val) { return NULL; } template forceinline Actor* nqtoter(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray&, Val c) { assert(x.size() == 3); return new (home) NqTer (home,share,p,x[0],x[1],x[2],c); } template forceinline Actor* nqtoter(Space* home, bool share, Propagator& p, ViewArray&, ViewArray& y, Val c) { assert(y.size() == 3); return new (home) NqTer (home,share,p,y[0],y[1],y[2],-c); } template forceinline Actor* nqtoter(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray& y, Val c) { if (x.size() == 3) return new (home) NqTer (home,share,p,x[0],x[1],x[2],c); if (x.size() == 2) return new (home) NqTer (home,share,p,x[0],x[1],y[0],c); if (x.size() == 1) return new (home) NqTer (home,share,p,y[0],y[1],x[0],-c); return new (home) NqTer (home,share,p,y[0],y[1],y[2],-c); } template Actor* Nq::copy(Space* home, bool share) { if (isunit(x,y)) { // Check whether rewriting is possible if (x.size() + y.size() == 2) return nqtobin(home,share,*this,x,y,c); if (x.size() + y.size() == 3) return nqtoter(home,share,*this,x,y,c); } return new (home) Nq(home,share,*this); } template Support::Symbol Nq::ati(void) { return Reflection::mangle("Gecode::Int::Linear::Nq"); } template Reflection::ActorSpec Nq::spec(const Space* home, Reflection::VarMap& m) const { return Lin::spec(home, m, ati()); } template void Nq::post(Space* home, Reflection::VarMap& vars, const Reflection::ActorSpec& spec) { spec.checkArity(3); ViewArray

x(home, vars, spec[0]); ViewArray y(home, vars, spec[1]); Val c = spec[2]->toInt(); (void) new (home) Nq(home, x, y, c); } template ExecStatus Nq::propagate(Space* home, ModEventDelta) { for (int i = x.size(); i--; ) if (x[i].assigned()) { c -= x[i].val(); x.move_lst(i); } for (int i = y.size(); i--; ) if (y[i].assigned()) { c += y[i].val(); y.move_lst(i); } if (x.size() + y.size() <= 1) { if (x.size() == 1) { GECODE_ME_CHECK(x[0].nq(home,c)); return ES_SUBSUMED(this,home); } if (y.size() == 1) { GECODE_ME_CHECK(y[0].nq(home,-c)); return ES_SUBSUMED(this,home); } return (c == static_cast(0)) ? ES_FAILED : ES_SUBSUMED(this,sizeof(*this)); } return ES_FIX; } /* * Bound consistent linear inequation * */ template forceinline Lq::Lq(Space* home, ViewArray

& x, ViewArray& y, Val c) : Lin(home,x,y,c) {} template ExecStatus Lq::post(Space* home, ViewArray

& x, ViewArray& y, Val c) { ViewArray nva; if (y.size() == 0) { (void) new (home) Lq(home,x,nva,c); } else if (x.size() == 0) { (void) new (home) Lq(home,nva,y,c); } else { (void) new (home) Lq(home,x,y,c); } return ES_OK; } template forceinline Lq::Lq(Space* home, bool share, Lq& p) : Lin(home,share,p) {} /** * \brief Rewriting of inequality to binary propagators * */ template forceinline Actor* lqtobin(Space*, bool, Propagator&,ViewArray

&, ViewArray&, Val) { return NULL; } template forceinline Actor* lqtobin(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray&, Val c) { assert(x.size() == 2); return new (home) LqBin (home,share,p,x[0],x[1],c); } template forceinline Actor* lqtobin(Space* home, bool share, Propagator& p, ViewArray&, ViewArray& y, Val c) { assert(y.size() == 2); return new (home) LqBin (home,share,p,y[0],y[1],c); } template forceinline Actor* lqtobin(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray& y, Val c) { if (x.size() == 2) return new (home) LqBin (home,share,p,x[0],x[1],c); if (x.size() == 1) return new (home) LqBin (home,share,p,x[0],y[0],c); return new (home) LqBin (home,share,p,y[0],y[1],c); } /** * \brief Rewriting of inequality to ternary propagators * */ template forceinline Actor* lqtoter(Space*, bool, Propagator&, ViewArray

&, ViewArray&, Val) { return NULL; } template forceinline Actor* lqtoter(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray&, Val c) { assert(x.size() == 3); return new (home) LqTer (home,share,p,x[0],x[1],x[2],c); } template forceinline Actor* lqtoter(Space* home, bool share, Propagator& p, ViewArray&, ViewArray& y, Val c) { assert(y.size() == 3); return new (home) LqTer (home,share,p,y[0],y[1],y[2],c); } template forceinline Actor* lqtoter(Space* home, bool share, Propagator& p, ViewArray& x, ViewArray& y, Val c) { if (x.size() == 3) return new (home) LqTer (home,share,p,x[0],x[1],x[2],c); if (x.size() == 2) return new (home) LqTer (home,share,p,x[0],x[1],y[0],c); if (x.size() == 1) return new (home) LqTer (home,share,p,x[0],y[0],y[1],c); return new (home) LqTer (home,share,p,y[0],y[1],y[2],c); } template Actor* Lq::copy(Space* home, bool share) { if (isunit(x,y)) { // Check whether rewriting is possible if (x.size() + y.size() == 2) return lqtobin(home,share,*this,x,y,c); if (x.size() + y.size() == 3) return lqtoter(home,share,*this,x,y,c); } return new (home) Lq(home,share,*this); } template inline Support::Symbol Lq::ati(void) { return Reflection::mangle("Gecode::Int::Linear::Lq"); } template Reflection::ActorSpec Lq::spec(const Space* home, Reflection::VarMap& m) const { return Lin::spec(home, m, ati()); } template void Lq::post(Space* home, Reflection::VarMap& vars, const Reflection::ActorSpec& spec) { spec.checkArity(3); ViewArray

x(home, vars, spec[0]); ViewArray y(home, vars, spec[1]); Val c = spec[2]->toInt(); (void) new (home) Lq(home, x, y, c); } template ExecStatus Lq::propagate(Space* home, ModEventDelta med) { // Eliminate singletons Val sl = 0; if (IntView::me(med) == ME_INT_VAL) { for (int i = x.size(); i--; ) { Val m = x[i].min(); if (x[i].assigned()) { c -= m; x.move_lst(i); } else { sl -= m; } } for (int i = y.size(); i--; ) { Val m = y[i].max(); if (y[i].assigned()) { c += m; y.move_lst(i); } else { sl += m; } } if ((x.size() + y.size()) <= 1) { if (x.size() == 1) { GECODE_ME_CHECK(x[0].lq(home,c)); return ES_SUBSUMED(this,home); } if (y.size() == 1) { GECODE_ME_CHECK(y[0].gq(home,-c)); return ES_SUBSUMED(this,home); } return (c >= static_cast(0)) ? ES_SUBSUMED(this,sizeof(*this)) : ES_FAILED; } } else { for (int i = x.size(); i--; ) sl -= x[i].min(); for (int i = y.size(); i--; ) sl += y[i].max(); } sl += c; ExecStatus es = ES_FIX; bool assigned = true; for (int i = x.size(); i--; ) { assert(!x[i].assigned()); Val slx = sl + x[i].min(); ModEvent me = x[i].lq(home,slx); if (me == ME_INT_FAILED) return ES_FAILED; if (me != ME_INT_VAL) assigned = false; if (me_modified(me) && (slx != x[i].max())) es = ES_NOFIX; } for (int i = y.size(); i--; ) { assert(!y[i].assigned()); Val sly = y[i].max() - sl; ModEvent me = y[i].gq(home,sly); if (me == ME_INT_FAILED) return ES_FAILED; if (me != ME_INT_VAL) assigned = false; if (me_modified(me) && (sly != y[i].min())) es = ES_NOFIX; } return assigned ? ES_SUBSUMED(this,sizeof(*this)) : es; } /* * Reified bound consistent linear inequation * */ template forceinline ReLq::ReLq (Space* home, ViewArray

& x, ViewArray& y, Val c, BoolView b) : ReLin(home,x,y,c,b) {} template ExecStatus ReLq::post (Space* home, ViewArray

& x, ViewArray& y, Val c, BoolView b) { ViewArray nva; if (y.size() == 0) { (void) new (home) ReLq(home,x,nva,c,b); } else if (x.size() == 0) { (void) new (home) ReLq(home,nva,y,c,b); } else { (void) new (home) ReLq(home,x,y,c,b); } return ES_OK; } template forceinline ReLq::ReLq(Space* home, bool share, ReLq& p) : ReLin(home,share,p) {} template Actor* ReLq::copy(Space* home, bool share) { return new (home) ReLq(home,share,*this); } template inline Support::Symbol ReLq::ati(void) { return Reflection::mangle("Gecode::Int::Linear::ReLq"); } template Reflection::ActorSpec ReLq::spec(const Space* home, Reflection::VarMap& m) const { return ReLin::spec(home, m, ati()); } template void ReLq::post(Space* home, Reflection::VarMap& vars, const Reflection::ActorSpec& spec) { ViewArray

x(home, vars, spec[0]); ViewArray y(home, vars, spec[1]); Val c = spec[2]->toInt(); BoolView b(home, vars, spec[3]); (void) new (home) ReLq(home, x, y, c, b); } template ExecStatus ReLq::propagate(Space* home, ModEventDelta med) { if (b.zero()) GECODE_REWRITE(this,(Lq::post(home,y,x,-c-1))); if (b.one()) GECODE_REWRITE(this,(Lq::post(home,x,y,c))); // Eliminate singletons Val sl = 0; Val su = 0; bounds_p(med,x,c,sl,su); bounds_n(med,y,c,sl,su); if (-sl > c) { GECODE_ME_CHECK(b.zero_none(home)); return ES_SUBSUMED(this,home); } if (-su <= c) { GECODE_ME_CHECK(b.one_none(home)); return ES_SUBSUMED(this,home); } return ES_FIX; } }}} // STATISTICS: int-prop