(instantiator, store, instance, verbose=False)
| 45 | ################################################## |
| 46 | |
| 47 | def process_instance(instantiator, store, instance, verbose=False): #, **complexity_args): |
| 48 | if instance.enumerated: |
| 49 | return [] |
| 50 | start_time = time.time() |
| 51 | new_results, new_facts = instance.next_results(verbose=verbose) |
| 52 | store.sample_time += elapsed_time(start_time) |
| 53 | |
| 54 | evaluations = store.evaluations |
| 55 | #remove_blocked(evaluations, instance, new_results) |
| 56 | for result in new_results: |
| 57 | complexity = result.compute_complexity(evaluations) |
| 58 | #complexity = instantiator.compute_complexity(instance) |
| 59 | for evaluation in add_certified(evaluations, result): |
| 60 | instantiator.add_atom(evaluation, complexity) |
| 61 | fact_complexity = 0 # TODO: record the instance or treat as initial? |
| 62 | for evaluation in add_facts(evaluations, new_facts, result=UNKNOWN_EVALUATION, complexity=fact_complexity): |
| 63 | instantiator.add_atom(evaluation, fact_complexity) |
| 64 | if not instance.enumerated: |
| 65 | instantiator.push_instance(instance) |
| 66 | return new_results |
| 67 | |
| 68 | def process_stream_queue(instantiator, store, complexity_limit=INF, verbose=False): |
| 69 | instances = [] |
no test coverage detected