Skip to content

tests: pass enable_context_search to ContextManager, not ProofController - #15

Open
dingf3ng wants to merge 1 commit into
tests-config-fixturefrom
tests-context-search-kwarg
Open

tests: pass enable_context_search to ContextManager, not ProofController#15
dingf3ng wants to merge 1 commit into
tests-config-fixturefrom
tests-context-search-kwarg

Conversation

@dingf3ng

@dingf3ng dingf3ng commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Why

Three tests pass enable_context_search= to ProofController, which doesn't accept it. The flag belongs to ContextManager — which is where main.py passes it. ProofController takes max_context_search, a different knob.

All three die at construction:

TypeError: ProofController.__init__() got an unexpected keyword argument 'enable_context_search'

test_folder_batch is the batch runner over AutoRocq-bench — it could not prove a single file. And test_controller_prove hid the failure: the exception is caught, the function returns False, and pytest discards the return, so it reported a pass while proving nothing.

What changed

Moved the flag to the ContextManager call in all three, matching main.py. Nothing else.

Result

Driving the batch runner over the first five svcomp goals, which previously crashed 5/5:

True    16s  array_1-2/main_assert_reachability.v
True    59s  array_1-2/main_loop_invariant_2_preserved.v
False   80s  base_case/main_assert_reachability.v
False   60s  benchmark02_linear/..._inv_i_bounds_established.v
True    11s  benchmark02_linear/..._inv_i_bounds_preserved.v

@dingf3ng
dingf3ng force-pushed the tests-context-search-kwarg branch from 6cb58ee to 5fda0b5 Compare September 2, 2026 07:36
Three tests passed enable_context_search= to ProofController, which does
not take it -- the flag belongs to ContextManager, which is where main.py
passes it. ProofController takes max_context_search, a different knob.

Every one of them died at construction:

    TypeError: ProofController.__init__() got an unexpected keyword
    argument 'enable_context_search'

test_folder_batch is the batch runner over AutoRocq-bench, so it could
not prove a single file. test_controller_prove hid it: the exception is
caught, the function returns False, and pytest discards the return, so it
reported a pass while proving nothing.

Moving the flag to the ContextManager call, matching main.py, is enough.
Driving the batch runner over the first five svcomp goals afterwards:

    True    16s  array_1-2/main_assert_reachability.v
    True    59s  array_1-2/main_loop_invariant_2_preserved.v
    False   80s  base_case/main_assert_reachability.v
    False   60s  benchmark02_linear/..._inv_i_bounds_established.v
    True    11s  benchmark02_linear/..._inv_i_bounds_preserved.v

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dingf3ng
dingf3ng force-pushed the tests-context-search-kwarg branch from 5fda0b5 to f82ba88 Compare September 2, 2026 07:57
@dingf3ng
dingf3ng changed the base branch from always-scratch to tests-config-fixture September 2, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant