Skip to content

Commit

Permalink
more reasonable path_length for MergedEdge
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevengre committed Aug 27, 2024
1 parent 9f54013 commit 4c44997
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyk/src/pyk/kcfg/kcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def path_length(_path: Iterable[KCFG.Successor]) -> int:
elif type(_path[0]) is KCFG.Edge:
return _path[0].depth + KCFG.path_length(_path[1:])
elif type(_path[0]) is KCFG.MergedEdge:
return sum(edge.depth for edge in _path[0].edges) + KCFG.path_length(_path[1:]) # todo: check this
return min(edge.depth for edge in _path[0].edges) + KCFG.path_length(_path[1:]) # todo: check this
raise ValueError(f'Cannot handle Successor type: {type(_path[0])}')

def extend(
Expand Down

0 comments on commit 4c44997

Please sign in to comment.