From 60b1475fd5b05e6db5e1a0288140e375666230bd Mon Sep 17 00:00:00 2001 From: AlexShefY Date: Fri, 29 Nov 2024 11:18:49 +0100 Subject: [PATCH] fixes --- verified_cogen/main.py | 5 ++++- verified_cogen/runners/validating.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/verified_cogen/main.py b/verified_cogen/main.py index 2246c0a..840eaf6 100644 --- a/verified_cogen/main.py +++ b/verified_cogen/main.py @@ -131,7 +131,10 @@ def make_runner_cls( bench_type: str, extension: str, config: RunnerConfig ) -> Callable[[LLM, Logger, Verifier, Optional[Rewriter]], Runner]: def runner_cls( - llm: LLM, logger: Logger, verifier: Verifier, rewriter: Optional[Rewriter] + llm: LLM, + logger: Logger, + verifier: Verifier, + rewriter: Optional[Rewriter] = None, ): if bench_type == "invariants": return InvariantRunner(llm, logger, verifier, config) diff --git a/verified_cogen/runners/validating.py b/verified_cogen/runners/validating.py index d2bd8d1..4322891 100644 --- a/verified_cogen/runners/validating.py +++ b/verified_cogen/runners/validating.py @@ -11,7 +11,7 @@ class ValidatingRunner(Runner): wrapped_runner: Runner language: Language summarizer_llm: LLM - pure_non_helpers: [str] = [] + pure_non_helpers: [str] def __init__( self, @@ -32,6 +32,7 @@ def __init__( ) self.wrapped_runner = wrapping self.language = language + self.pure_non_helpers = [] def _add_validators(self, prg: str, inv_prg: str): validators = self.language.generate_validators(prg)