-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support write MergedEdge during proof #4689
Conversation
…] directly, because these nodes are already deleted.
3eb8bbc
to
bf59d17
Compare
@@ -264,18 +264,36 @@ class MergedEdge(EdgeLike): | |||
edges: tuple[KCFG.Edge, ...] | |||
|
|||
def to_dict(self) -> dict[str, Any]: | |||
|
|||
def _merged_edge_to_dict(edge: KCFG.Edge) -> dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def _merged_edge_to_dict(edge: KCFG.Edge) -> dict[str, Any]: | |
def merged_edge_to_dict(edge: KCFG.Edge) -> dict[str, Any]: |
(The functions is only visible from to_dict
anyways.)
} | ||
|
||
@staticmethod | ||
def from_dict(dct: dict[str, Any], nodes: Mapping[int, KCFG.Node]) -> KCFG.Successor: | ||
|
||
def _merged_edge_from_dict(dct: dict[str, Any]) -> KCFG.Edge: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def _merged_edge_from_dict(dct: dict[str, Any]) -> KCFG.Edge: | |
def merged_edge_from_dict(dct: dict[str, Any]) -> KCFG.Edge: |
def _make_edge_dicts(*edges: Iterable) -> list[dict[str, Any]]: | ||
def _make_edge_dict(i: int, j: int, depth: int = 1, rules: tuple[str, ...] = ()) -> dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two functions can be on the same level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def _make_edge_dicts(*edges: Iterable) -> list[dict[str, Any]]: | |
def _make_edge_dict(i: int, j: int, depth: int = 1, rules: tuple[str, ...] = ()) -> dict[str, Any]: | |
def make_edge_dicts(*edges: Iterable) -> list[dict[str, Any]]: | |
def make_edge_dict(i: int, j: int, depth: int = 1, rules: tuple[str, ...] = ()) -> dict[str, Any]: |
to_dict
&from_dict
method forMergedEdge
to_dict_no_nodes
method to include merged edges.