Skip to content

Commit

Permalink
updating the minimize_kcfg method to accept an optional heuristics …
Browse files Browse the repository at this point in the history
…parameter for merging node. (#4687)

This pull request includes changes to the
`pyk/src/pyk/kcfg/exploration.py` file to enhance the functionality of
the `minimize_kcfg` method by incorporating heuristics. The most
important changes include importing the `KCFGSemantics` module and
updating the `minimize_kcfg` method to accept an optional heuristics
parameter.
  • Loading branch information
Stevengre authored Nov 21, 2024
1 parent 469164a commit 75f108f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyk/src/pyk/kcfg/exploration.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing import Any

from pyk.kcfg.kcfg import NodeIdLike
from pyk.kcfg.semantics import KCFGSemantics


class KCFGExplorationNodeAttr(NodeAttr):
Expand Down Expand Up @@ -109,5 +110,5 @@ def to_dict(self) -> dict[str, Any]:
#

# Minimizing the KCFG
def minimize_kcfg(self, merge: bool = False) -> None:
KCFGMinimizer(self.kcfg).minimize(merge=merge)
def minimize_kcfg(self, heuristics: KCFGSemantics | None = None, merge: bool = False) -> None:
KCFGMinimizer(kcfg=self.kcfg, heuristics=heuristics).minimize(merge=merge)

0 comments on commit 75f108f

Please sign in to comment.