| 307 | } |
| 308 | |
| 309 | void WorkManager::updateFalse(Strategy s) { // called when s is false |
| 310 | // cout<<" UF on "; |
| 311 | // vector<int> hihi = s.getPosition(); |
| 312 | // if (hihi.empty()) cout<<"empty"; |
| 313 | // for (int i=0;i< hihi.size();i++) cout<<hihi[i]<<" "; |
| 314 | // cout<<endl; |
| 315 | |
| 316 | trashWorks(s.getPosition()); |
| 317 | if (s.isDummy()) { |
| 318 | return; |
| 319 | } |
| 320 | Strategy father=s.getFather(); |
| 321 | |
| 322 | if (s.quantifier()) { // if s is universal, its father is false |
| 323 | // cout<<" UF A"; |
| 324 | if (father.isDummy()) { // if father is dummy, it is the root of the strategy. We must cut all its children and ad a false node. |
| 325 | // cout<<" father root "<<endl; |
| 326 | while (father.degree() != 0) { |
| 327 | father.detach(father.degree()-1); |
| 328 | } |
| 329 | father.attach(Strategy::SFalse()); |
| 330 | } |
| 331 | // cout<<endl; |
| 332 | updateFalse(s.getFather()); |
| 333 | } |
| 334 | else { // if s is existential, it it detached from its father |
| 335 | // cout<<" UF E "; |
| 336 | father.detach(s); |
| 337 | if (father.degree() == 0) { |
| 338 | // cout<<" father false"<<endl; |
| 339 | updateFalse(father); |
| 340 | } |
| 341 | else { |
| 342 | // cout<<" father still not false"<<endl; |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | |
| 348 | void WorkManager::trashWorks(vector<int> prefix) { |
nothing calls this directly
no test coverage detected