Skip to content

Commit

Permalink
This commit addresses an issue where hypotheses are erroneously activ…
Browse files Browse the repository at this point in the history
…e outside of their intended scope.
  • Loading branch information
David VanDerWerf committed Apr 11, 2024
1 parent 45a7363 commit cb84471
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions mmverify.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,22 @@ def treat_normal_proof(self, proof: list[str]) -> list[Stmt]:
processed.
"""
stack: list[Stmt] = []
active_hypotheses = {label for frame in self.fs for labels in (frame.f_labels, frame.e_labels) for label in labels.values()}
for label in proof:
self.treat_step(self.labels[label], stack)
stmt_info = self.labels.get(label)
if stmt_info:
label_type = stmt_info[0]
if label_type in {'$e', '$f'}:
if label in active_hypotheses:
self.treat_step(stmt_info, stack)
else:
raise MMError(f"The label {label} is the label of a nonactive hypothesis.")
else:
self.treat_step(stmt_info, stack)
else:
raise MMError(f"No statement information found for label {label}")
return stack

def treat_compressed_proof(
self,
f_hyps: list[Fhyp],
Expand Down

0 comments on commit cb84471

Please sign in to comment.