Bound ASPIC property-test theories and pin the #102 argument budget - #103
Merged
Merged
Conversation
…dget The ASPIC strict/defeasible rule generators drew antecedents with replacement. A seed like ~q, ~q -> p, plus its positional transpositions, multiplied arguments to 18,850 (~306M attacks) on a 4-premise theory; once saved in a local Hypothesis database it replayed into the 600s timeout on every run. - Rule generators draw distinct antecedents in canonical order. - knowledge_base and well_defined_knowledge_base reject theories whose argument set (built without contrariness, an upper bound) exceeds 2,000, so no saved example can replay a blow-up. - The #102 theory is pinned with a deterministic operational contract (<= 200 arguments, <= 20,000 attack pairs counted from per-conclusion argument counts without compute_attacks), xfail(strict=True) until the production fix lands; it fails in about 0.5s instead of timing out. Refs #102 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4tAVyyKcs1sYcsEzL7Bzg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains test-only safeguards for #102 and makes no production change. The production fix, rule canonicalisation (option A in the investigation comment), is waiting on a semantic decision, so #102 stays open.
Problem
The ASPIC rule generators in
tests/structured/aspic/test_aspic.pydrew rule antecedents with replacement. One seed such as~q, ~q -> p, together with its positional transpositions(~p, ~q) -> qand(~q, ~p) -> q, multiplied a 4-premise theory into 18,850 arguments and roughly 306M attack pairs. Once Hypothesis saved that example in a local database, it replayed on every run: the test hit the 600s timeout, and pytest then raised a MemoryError while formatting the traceback.Changes
strict_rules,strict_seed_rulesanddefeasible_rulesnow draw distinct antecedents in canonical (sorted) order, using_distinct_antecedents.knowledge_baseandwell_defined_knowledge_basereject theories with more than 2,000 arguments, viaassume(...). The count is taken frombuild_argumentswith an empty contrariness function. Because the c-consistency filter only ever removes arguments, that count is an upper bound on the real argument set. As a result, any saved example, including an old one, is discarded rather than run throughcompute_attacks.tests/structured/aspic/test_aspic_argument_budget.pypins the ASPIC compute_attacks blows up on cyclic strict rules: 4 premises, 14 rules give 18,850 arguments and ~8.7M rebuttals #102 theory with a deterministic operational contract (AGENTS.md):compute_attacks.It is marked
xfail(strict=True)until option A lands. It fails in about 0.5s instead of timing out. A control confirms that a small theory with distinct antecedents stays within budget.Refs #102
🤖 Generated with Claude Code
https://claude.ai/code/session_01V4tAVyyKcs1sYcsEzL7Bzg