| 103 | |
| 104 | template<class VX, class VY> |
| 105 | inline ExecStatus |
| 106 | ClauseTrue<VX,VY>::post(Home home, ViewArray<VX>& x, ViewArray<VY>& y) { |
| 107 | for (int i=x.size(); i--; ) |
| 108 | if (x[i].one()) |
| 109 | return ES_OK; |
| 110 | else if (x[i].zero()) |
| 111 | x.move_lst(i); |
| 112 | if (x.size() == 0) |
| 113 | return NaryOrTrue<VY>::post(home,y); |
| 114 | for (int i=y.size(); i--; ) |
| 115 | if (y[i].one()) |
| 116 | return ES_OK; |
| 117 | else if (y[i].zero()) |
| 118 | y.move_lst(i); |
| 119 | if (y.size() == 0) |
| 120 | return NaryOrTrue<VX>::post(home,x); |
| 121 | if ((x.size() == 1) && (y.size() == 1)) { |
| 122 | return BinOrTrue<VX,VY>::post(home,x[0],y[0]); |
| 123 | } else if (!shared(x,y)) { |
| 124 | (void) new (home) ClauseTrue(home,x,y); |
| 125 | } |
| 126 | return ES_OK; |
| 127 | } |
| 128 | |
| 129 | template<class VX, class VY> |
| 130 | forceinline size_t |