diff --git a/verified_cogen/args.py b/verified_cogen/args.py index c426b82..29d57b9 100644 --- a/verified_cogen/args.py +++ b/verified_cogen/args.py @@ -51,7 +51,9 @@ def get_default_parser(): "-s", "--output-style", choices=["stats", "full"], default="full" ) parser.add_argument("--filter-by-ext", help="filter by extension", default=None) - parser.add_argument("--log-tries", help="Save output of every try to given dir", default=None) + parser.add_argument( + "--log-tries", help="Save output of every try to given dir", default=None + ) return parser diff --git a/verified_cogen/main.py b/verified_cogen/main.py index a22f412..e01d63f 100644 --- a/verified_cogen/main.py +++ b/verified_cogen/main.py @@ -135,7 +135,7 @@ def main(): ), logger, verifier, - log_tries + log_tries, ) for file in files: with open(file) as f: diff --git a/verified_cogen/runners/__init__.py b/verified_cogen/runners/__init__.py index f3d29d1..2a21bb9 100644 --- a/verified_cogen/runners/__init__.py +++ b/verified_cogen/runners/__init__.py @@ -16,7 +16,13 @@ class Runner: verifier: Verifier log_tries: Optional[pathlib.Path] - def __init__(self, llm: LLM, logger: Logger, verifier: Verifier, log_tries: Optional[pathlib.Path] = None): + def __init__( + self, + llm: LLM, + logger: Logger, + verifier: Verifier, + log_tries: Optional[pathlib.Path] = None, + ): self.llm = llm self.logger = logger self.verifier = verifier @@ -83,7 +89,9 @@ def try_fixing( ) -> Optional[int]: tries = total_tries while tries > 0: - verification_result = self.verify_program(name, total_tries - tries + 1, inv_prg) + verification_result = self.verify_program( + name, total_tries - tries + 1, inv_prg + ) if verification_result is None: self.logger.info("Verification timed out") tries -= 1