DataFlowAnalysis / DataFlowAnalysis

Eclipse Public License 2.0
6 stars 1 forks source link

Resolve cyclic data flow graphs #157

Closed BenjaminArp closed 3 weeks ago

BenjaminArp commented 3 months ago

Pain Points:

Solution Idea: To handle cyclic graphs effectively, I propose a new import/mapping strategy that resolves cycles during the flow creation process. This approach ensures that we only deal with directed acyclic graphs (DAGs) when defining flows. The steps are as follows:

  1. Initial Vertex Assignment: Assign each vertex in the cyclic graph a unique order based on its position in the DAG.
  2. Flow Creation with Cycle Detection: As we create flows, we monitor for any cycles by checking if a vertex is revisited. This is identified by comparing the order of the current vertex with the vertices visited in the current flow.
  3. Cycle Resolution: If a cycle is detected (i.e., a flow revisits a vertex), we resolve it by:
    • Ending the Flow: Terminating the flow at the current vertex if revisiting it creates a cycle.
    • Redirecting to Higher-Order Vertex: Redirecting the flow to a vertex with a higher order, ensuring that the graph remains acyclic.

By implementing this strategy, we can effectively manage cyclic graphs by transforming them into DAGs, thusmaking it ppossible to analyze microsecends cyclic graphs without modifing the analysis.

BenjaminArp commented 3 months ago

This is going to be implemented in the Analysis Part and not as first thought in the Converter Part of the Data-Flow-Analysis

sebinside commented 2 months ago

Note from the meeting: The builder should take the finder to use, see the resource provider (optional parameter, default: cyclic finder)