(instantiator, store, complexity_limit=INF, verbose=False)
| 66 | return new_results |
| 67 | |
| 68 | def process_stream_queue(instantiator, store, complexity_limit=INF, verbose=False): |
| 69 | instances = [] |
| 70 | results = [] |
| 71 | num_successes = 0 |
| 72 | while not store.is_terminated() and instantiator and (instantiator.min_complexity() <= complexity_limit): |
| 73 | instance = instantiator.pop_stream() |
| 74 | if instance.enumerated: |
| 75 | continue |
| 76 | instances.append(instance) |
| 77 | new_results = process_instance(instantiator, store, instance, verbose=verbose) |
| 78 | results.extend(new_results) |
| 79 | num_successes += bool(new_results) # TODO: max_results? |
| 80 | if verbose: |
| 81 | print('Eager Calls: {} | Successes: {} | Results: {} | Counts: {}'.format( |
| 82 | len(instances), num_successes, len(results), |
| 83 | str_from_object(Counter(instance.external.name for instance in instances)))) |
| 84 | return len(instances) |
| 85 | |
| 86 | # def retrace_stream_plan(store, domain, goal_expression): |
| 87 | # # TODO: retrace the stream plan that supports the plan to find the certificate |
no test coverage detected