Skip to content

Commit

Permalink
Rename past configs
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdrozd committed Feb 2, 2024
1 parent 35200d2 commit 3567c82
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tm/prover.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ def try_rule(
state, tape, sig := tape.signature)) is not None:
return known_rule

if (states := self.configs.get(sig)) is None:
if (past_configs := self.configs.get(sig)) is None:
if self.config_count > 100_000: # no-cover
raise ConfigLimit

states = PastConfigs()
self.configs[sig] = states
past_configs = PastConfigs()
self.configs[sig] = past_configs

if (deltas := states.next_deltas(state, cycle)) is None:
if (deltas := past_configs.next_deltas(state, cycle)) is None:
return None

if any(delta > 90_000 for delta in deltas):
Expand All @@ -177,7 +177,7 @@ def try_rule(
if (rule := make_rule(tape.counts, *counts)) is None:
return None

states.delete_configs(state)
past_configs.delete_configs(state)

self.set_rule(
rule,
Expand Down

0 comments on commit 3567c82

Please sign in to comment.