Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/239-feat-include-the-purity-anal…
Browse files Browse the repository at this point in the history
…ysis-into-the-run_api-command' into 239-feat-include-the-purity-analysis-into-the-run_api-command

# Conflicts:
#	src/library_analyzer/processing/api/purity_analysis/_resolve_references.py
  • Loading branch information
lukarade committed Mar 17, 2024
2 parents bf6bda9 + b8f2be5 commit 705a09e
Show file tree
Hide file tree
Showing 4 changed files with 682 additions and 613 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ def _test_cgn_for_cycles(

# If the current node is already in the path, a cycle is found.
if cgn.symbol.id in path:
# TODO: how to handle nested cycles? LARS
cut_path = path[path.index(cgn.symbol.id) :]
return {node_id: self.call_graph_forest.get_graph(node_id) for node_id in cut_path}

Expand Down Expand Up @@ -306,7 +305,7 @@ def _contract_cycle(self, cycle: dict[NodeID, CallGraphNode]) -> None:
return

# Find all other calls (calls that are not part of the cycle) and remove all nodes in the cycle from the forest.
for node in cycle.values(): # TODO: call _test_cgn_for_cycles recursively
for node in cycle.values():
for child in node.children.values():
if child.symbol.id not in cycle and not combined_cgn.has_child(child.symbol.id):
combined_cgn.add_child(child)
Expand Down
Loading

0 comments on commit 705a09e

Please sign in to comment.