Skip to content

Commit

Permalink
even finer exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
adharshkamath committed Nov 12, 2023
1 parent f4328b8 commit a03dd4c
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions src/loopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,24 +1743,33 @@ def local_loopy(self, max_benchmarks=1, start_index=0, local_output=""):
}
)
else:
(
__success,
pruned_code,
num_frama_c_calls,
) = self.checker.houdini(
checker_input_with_annotations,
"one_loop_one_method",
use_json_dump_for_invariants=self.use_json_output,
)
completions.append(
{
"invariants": completion,
"success": __success,
"checker_message": checker_message,
"code_after_prune": pruned_code,
"success_after_prune": __success,
}
)
try:
(
__success,
pruned_code,
num_frama_c_calls,
) = self.checker.houdini(
checker_input_with_annotations,
"one_loop_one_method",
use_json_dump_for_invariants=self.use_json_output,
)
completions.append(
{
"invariants": completion,
"success": __success,
"checker_message": checker_message,
"code_after_prune": pruned_code,
"success_after_prune": __success,
}
)
except Exception as e:
completions.append(
{
"invariants": completion,
"success": __success,
"error": str(e),
}
)

instance_log_json["completions"] = completions

Expand Down

0 comments on commit a03dd4c

Please sign in to comment.