| 264 | } |
| 265 | |
| 266 | void WorkManager::updateTrue(Strategy s) { //called when s has a son who is a complete strategy |
| 267 | // cout<<" UT on "; |
| 268 | // vector<int> hihi = s.getPosition(); |
| 269 | // if (hihi.empty()) cout<<"empty"; |
| 270 | // for (int i=0;i< hihi.size();i++) cout<<hihi[i]<<" "; |
| 271 | // cout<<endl; |
| 272 | |
| 273 | |
| 274 | if (s.isComplete()) { |
| 275 | // cout<<" UT Complete "; |
| 276 | if (s.quantifier()) { |
| 277 | // cout<< " A "; |
| 278 | if (s.hasFather()) { |
| 279 | // cout<<" with father"<<endl; |
| 280 | updateTrue(s.getFather()); |
| 281 | } |
| 282 | else { |
| 283 | // cout<<" without father"<<endl; |
| 284 | } |
| 285 | } |
| 286 | else { |
| 287 | // cout<<" E "; |
| 288 | if (s.hasFather()) { |
| 289 | // cout<<" with father"<<endl; |
| 290 | Strategy father = s.getFather(); |
| 291 | while (father.degree() != 0) { |
| 292 | father.detach(father.degree()-1); |
| 293 | } |
| 294 | father.attach(s); |
| 295 | trashWorks(father.getPosition()); |
| 296 | updateTrue(father); |
| 297 | } |
| 298 | else { |
| 299 | // cout<<" without father"<<endl; |
| 300 | |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | else { |
| 305 | // cout<<" UT incomplete"<<endl; |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | void WorkManager::updateFalse(Strategy s) { // called when s is false |
| 310 | // cout<<" UF on "; |
nothing calls this directly
no test coverage detected