Skip to content

Commit

Permalink
Extract method sentences
Browse files Browse the repository at this point in the history
  • Loading branch information
tothtamas28 committed Dec 16, 2024
1 parent b4ddcd6 commit cf4c627
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyk/src/pyk/kore/syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -2211,9 +2211,13 @@ def write(self, output: IO[str]) -> None:
output.write('\n\n')
module.write(output)

@cached_property
def sentences(self) -> tuple[Sentence, ...]:
return tuple(sent for module in self.modules for sent in module)

@cached_property
def axioms(self) -> tuple[Axiom, ...]:
return tuple(sent for module in self.modules for sent in module if isinstance(sent, Axiom))
return tuple(sent for sent in self.sentences if isinstance(sent, Axiom))

def get_axiom_by_ordinal(self, ordinal: int) -> Axiom:
return self.axioms[ordinal]
Expand Down

0 comments on commit cf4c627

Please sign in to comment.