(self, binding)
| 310 | ######################### |
| 311 | |
| 312 | def _process_binding(self, binding): |
| 313 | assert binding.calls <= binding.visits # TODO: global DEBUG mode |
| 314 | readd = is_new = False |
| 315 | if binding.is_dominated(): |
| 316 | return readd, is_new |
| 317 | if binding.is_fully_bound: |
| 318 | action_plan = binding.skeleton.bind_action_plan(binding.mapping) |
| 319 | self.store.add_plan(action_plan, binding.cost) |
| 320 | is_new = True |
| 321 | return readd, is_new |
| 322 | binding.visits += 1 |
| 323 | instance = binding.result.instance |
| 324 | if (REQUIRE_DOWNSTREAM and not binding.check_downstream()): # TODO: move check_complexity here |
| 325 | # TODO: causes redundant plan skeletons to be identified (along with complexity using visits instead of calls) |
| 326 | # Do I need to re-enable this stream in case another skeleton needs it? |
| 327 | # TODO: should I perform this when deciding to sample something new instead? |
| 328 | return STANDBY, is_new |
| 329 | #if not is_instance_ready(self.evaluations, instance): |
| 330 | # raise RuntimeError(instance) |
| 331 | if binding.up_to_date(): |
| 332 | new_results, _ = process_instance(self.store, self.domain, instance, disable=self.disable) |
| 333 | is_new = bool(new_results) |
| 334 | for new_binding in binding.update_bindings(): |
| 335 | self.push_binding(new_binding) |
| 336 | readd = not instance.enumerated |
| 337 | return readd, is_new |
| 338 | |
| 339 | ######################### |
| 340 |
no test coverage detected