(instantiator, instance, verbose=False)
| 32 | ################################################## |
| 33 | |
| 34 | def optimistic_process_instance(instantiator, instance, verbose=False): |
| 35 | for result in instance.next_optimistic(): |
| 36 | if verbose: |
| 37 | print(result) # TODO: make a debug tools that reports the optimistic streams |
| 38 | new_facts = False |
| 39 | complexity = instantiator.compute_complexity(instance) |
| 40 | for fact in result.get_certified(): |
| 41 | new_facts |= instantiator.add_atom(evaluation_from_fact(fact), complexity) |
| 42 | if isinstance(result, FunctionResult) or new_facts: |
| 43 | yield result |
| 44 | |
| 45 | def prune_high_effort_streams(streams, max_effort=INF, **effort_args): |
| 46 | # TODO: convert streams to test streams with extremely high effort |
no test coverage detected