fslaborg / Graphoscope

A pragmatic approach to network science.
http://fslab.org/Graphoscope/
MIT License
14 stars 6 forks source link

Longest path algorithm #58

Closed nojaf closed 9 months ago

nojaf commented 12 months ago

Hello,

I picked up about the existence of this library during the Data Science in F# conference! There are two ways to determine the shortest path in a graph and I'd like to know if it would be difficult to get a longest path algorithm.

My use case is the following: recently, a new F# compiler flag was added (--test: GraphBasedChecking). This allows your files to be type-checked in parallel where possible. In short, a graph of a project is being constructed that lists all the dependencies (edges) between files. In the theoretical scenario that you have infinite cores for maximum paralyzation, the times it will take to type-check a code base would be the longest chain in the graph.

As I'm not quite familiar (and clever) enough to figure this out, I'm wondering if this could be added to this library by someone. I naively hope this isn't much work since the shortest path is already available. In return, I'd be happy to help out with something else. A blog post about the compiler flag comes to mind and there I could showcase this package and expose it outside the pure data science scene. Or anything else really.

Happy to hear your thoughts!

Cheers,

Florian

LibraChris commented 11 months ago

Hi @nojaf ,

Thank you for your interest in Graphoscope. I'm planning to implement the longest path algorithm for your project. However, I'm not certain if it's the best solution for your specific needs.

If I understand correctly, you want to represent file dependencies in your project as a graph and use the longest path to simulate the longest time constraint for typechecking. It's important to note that the longest path algorithm is only feasible in directed, acyclic graphs like the one shown below:

If your dependency graph resembles this example, the longest path algorithm is a suitable choice. If not, we may need to explore alternative solutions.

Could you please clarify whether your project's graph aligns with this example? Your response will help us determine the best way to proceed.

Thank you for your assistance.

Best regards,

Christopher

nojaf commented 11 months ago

Hello Christopher,

Tremendous thanks for this response. Much appreciated! I welcome your response to challenge if the longest path is the best algorithm to answer my question. Allow me to elaborate, I experimented a bit with this Graphoscope.fsproj as an example.

This project produced:

flowchart RL
    0["obj\Debug\netstandard2.0\.NETStandard,Version=v2.0.AssemblyAttributes.fs"]
    1["obj\Debug\netstandard2.0\Graphoscope.AssemblyInfo.fs"]
    2["Graph.fs"]
    3["DiGraph.fs"]
    4["AdjGraph.fs"]
    5["FGraph.fs"]
    6["Algorithms\BellmanFord.fs"]
    7["Algorithms\DFS.fs"]
    8["Algorithms\BFS.fs"]
    9["Algorithms\FloydWarshall.fs"]
    10["Algorithms/Dijkstra.fs"]
    11["Algorithms\Louvain.fs"]
    12["Algorithms\WedgeCount.fs"]
    13["Measures\Degree.fs"]
    14["Measures\OutDegree.fs"]
    15["Measures\InDegree.fs"]
    16["Measures/BetweennessCentrality.fs"]
    17["Measures\InformationEntropy.fs"]
    18["Measures\NetworkDensity.fs"]
    19["Measures\Loop.fs"]
    20["Measures\Volume.fs"]
    21["Measures\Size.fs"]
    22["Measures\ClusteringCoefficient.fs"]
    23["RandomModels/Gilbert.fs"]
    24["RandomModels\BollobasRiordan.fs"]
    25["RandomModels\ErdosRenyi.fs"]
    26["RandomModels\CompleteGraph.fs"]
    27["RandomModels\BarabasiAlbert.fs"]
    28["RandomModels\RegularRingLattice.fs"]
    29["RandomModels\WattsStrogatz.fs"]
    30["RandomModels/StarGraph.fs"]
    4 --> 3
    5 --> 3
    5 --> 4
    6 --> 3
    6 --> 4
    6 --> 5
    7 --> 3
    7 --> 4
    7 --> 5
    7 --> 6
    8 --> 3
    8 --> 4
    8 --> 5
    8 --> 6
    8 --> 7
    9 --> 3
    9 --> 4
    9 --> 5
    9 --> 6
    9 --> 7
    9 --> 8
    10 --> 3
    10 --> 4
    10 --> 5
    10 --> 6
    10 --> 7
    10 --> 8
    10 --> 9
    11 --> 3
    11 --> 4
    11 --> 5
    11 --> 6
    11 --> 7
    11 --> 8
    11 --> 9
    11 --> 10
    12 --> 3
    12 --> 4
    12 --> 5
    12 --> 6
    12 --> 7
    12 --> 8
    12 --> 9
    12 --> 10
    12 --> 11
    13 --> 2
    13 --> 3
    13 --> 4
    13 --> 5
    14 --> 3
    14 --> 4
    14 --> 5
    14 --> 13
    15 --> 3
    15 --> 4
    15 --> 5
    15 --> 13
    15 --> 14
    16 --> 13
    16 --> 14
    16 --> 15
    17 --> 3
    17 --> 4
    17 --> 5
    17 --> 13
    17 --> 14
    17 --> 15
    17 --> 16
    18 --> 3
    18 --> 4
    18 --> 5
    18 --> 13
    18 --> 14
    18 --> 15
    18 --> 16
    18 --> 17
    19 --> 3
    19 --> 4
    19 --> 5
    19 --> 13
    19 --> 14
    19 --> 15
    19 --> 16
    19 --> 17
    19 --> 18
    20 --> 3
    20 --> 4
    20 --> 5
    20 --> 13
    20 --> 14
    20 --> 15
    20 --> 16
    20 --> 17
    20 --> 18
    20 --> 19
    21 --> 3
    21 --> 4
    21 --> 5
    21 --> 13
    21 --> 14
    21 --> 15
    21 --> 16
    21 --> 17
    21 --> 18
    21 --> 19
    21 --> 20
    22 --> 2
    22 --> 3
    22 --> 4
    22 --> 5
    22 --> 13
    22 --> 14
    22 --> 15
    22 --> 16
    22 --> 17
    22 --> 18
    22 --> 19
    22 --> 20
    22 --> 21
    23 --> 2
    23 --> 3
    23 --> 4
    23 --> 5
    24 --> 3
    24 --> 4
    24 --> 5
    24 --> 23
    25 --> 2
    25 --> 23
    25 --> 24
    26 --> 2
    26 --> 3
    26 --> 4
    26 --> 5
    26 --> 23
    26 --> 24
    26 --> 25
    27 --> 2
    27 --> 3
    27 --> 4
    27 --> 5
    27 --> 23
    27 --> 24
    27 --> 25
    27 --> 26
    28 --> 2
    28 --> 3
    28 --> 4
    28 --> 5
    28 --> 23
    28 --> 24
    28 --> 25
    28 --> 26
    28 --> 27
    29 --> 2
    29 --> 23
    29 --> 24
    29 --> 25
    29 --> 26
    29 --> 27
    29 --> 28
    30 --> 3
    30 --> 4
    30 --> 5
    30 --> 23
    30 --> 24
    30 --> 25
    30 --> 26
    30 --> 27
    30 --> 28
    30 --> 29

(using compiler flags --test:GraphBasedChecking and --test:DumpCheckingGraph)

Each node represents a file in the project and has a certain processing time to type-check.

CheckDeclarations.CheckOneImplFile,07-32-39.5731,07-32-39.7493,000.1762,00-17e48d108f492d42fe6debbbcae5ab11-e3ca81d39edd70d7-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,"C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\obj\Debug\netstandard2.0\.NETStandard,Version=v2.0.AssemblyAttributes.fs",,".NETStandard,Version=v2.0.AssemblyAttributes",,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-39.5731,07-32-39.7493,000.1762,00-17e48d108f492d42fe6debbbcae5ab11-14d8d28231b995bb-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\obj\Debug\netstandard2.0\Graphoscope.AssemblyInfo.fs,,Graphoscope.AssemblyInfo,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-39.5731,07-32-40.0589,000.4857,00-17e48d108f492d42fe6debbbcae5ab11-bba1e9835c816aa1-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Graph.fs,,Graph,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-39.5732,07-32-40.0591,000.4859,00-17e48d108f492d42fe6debbbcae5ab11-da71561454aedfbf-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\DiGraph.fs,,DiGraph,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.0606,07-32-40.1628,000.1022,00-17e48d108f492d42fe6debbbcae5ab11-f55f487026dd2506-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\AdjGraph.fs,,AdjGraph,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.1642,07-32-40.3553,000.1911,00-17e48d108f492d42fe6debbbcae5ab11-e6eb439a0dfaf976-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\FGraph.fs,,FGraph,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.3884,07-32-40.4104,000.0220,00-17e48d108f492d42fe6debbbcae5ab11-498d2820b0ec95ca-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\RandomModels/Gilbert.fs,,Gilbert,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.3560,07-32-40.4191,000.0631,00-17e48d108f492d42fe6debbbcae5ab11-f38e5e8b3e5f719e-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\Degree.fs,,Degree,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.3558,07-32-40.4341,000.0783,00-17e48d108f492d42fe6debbbcae5ab11-cdef515055cdce74-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Algorithms\BellmanFord.fs,,BellmanFord,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4193,07-32-40.4409,000.0216,00-17e48d108f492d42fe6debbbcae5ab11-c90a00abf1c657b8-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\OutDegree.fs,,OutDegree,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4342,07-32-40.4424,000.0082,00-17e48d108f492d42fe6debbbcae5ab11-dc2a72d3785d813b-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Algorithms\DFS.fs,,DFS,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4106,07-32-40.4467,000.0361,00-17e48d108f492d42fe6debbbcae5ab11-86630faa679c4f3b-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\RandomModels\BollobasRiordan.fs,,BollobasRiordan,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4425,07-32-40.4525,000.0100,00-17e48d108f492d42fe6debbbcae5ab11-863b443f6747b71d-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Algorithms\BFS.fs,,BFS,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4411,07-32-40.4633,000.0222,00-17e48d108f492d42fe6debbbcae5ab11-edff9b03c2f44b20-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\InDegree.fs,,InDegree,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4526,07-32-40.4641,000.0115,00-17e48d108f492d42fe6debbbcae5ab11-35ce33d76635f22a-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Algorithms\FloydWarshall.fs,,FloydWarshall,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4635,07-32-40.4646,000.0012,00-17e48d108f492d42fe6debbbcae5ab11-03a8dd341aedeb8c-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures/BetweennessCentrality.fs,,BetweennessCentrality,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4468,07-32-40.4762,000.0294,00-17e48d108f492d42fe6debbbcae5ab11-0cb07622802bfc75-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\RandomModels\ErdosRenyi.fs,,ErdosRenyi,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4647,07-32-40.4769,000.0122,00-17e48d108f492d42fe6debbbcae5ab11-897bb7317cf7b574-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\InformationEntropy.fs,,InformationEntropy,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4763,07-32-40.4811,000.0048,00-17e48d108f492d42fe6debbbcae5ab11-2434b27567cdcb0c-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\RandomModels\CompleteGraph.fs,,CompleteGraph,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4770,07-32-40.4864,000.0093,00-17e48d108f492d42fe6debbbcae5ab11-85533209d88cd8f3-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\NetworkDensity.fs,,NetworkDensity,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4865,07-32-40.4953,000.0088,00-17e48d108f492d42fe6debbbcae5ab11-88143c2adb6267d9-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\Loop.fs,,Loop,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4642,07-32-40.4972,000.0330,00-17e48d108f492d42fe6debbbcae5ab11-582ec8b7ee59439d-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Algorithms/Dijkstra.fs,,Dijkstra,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4954,07-32-40.5005,000.0051,00-17e48d108f492d42fe6debbbcae5ab11-7b20860ccae1a749-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\Volume.fs,,Volume,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.5006,07-32-40.5058,000.0051,00-17e48d108f492d42fe6debbbcae5ab11-1e0ce87c881a9021-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\Size.fs,,Size,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4812,07-32-40.5153,000.0340,00-17e48d108f492d42fe6debbbcae5ab11-9410a97056e3ead9-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\RandomModels\BarabasiAlbert.fs,,BarabasiAlbert,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.5059,07-32-40.5209,000.0150,00-17e48d108f492d42fe6debbbcae5ab11-eb043040afc64afc-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Measures\ClusteringCoefficient.fs,,ClusteringCoefficient,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.5154,07-32-40.5210,000.0056,00-17e48d108f492d42fe6debbbcae5ab11-5caac71da2b26231-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\RandomModels\RegularRingLattice.fs,,RegularRingLattice,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.5211,07-32-40.5266,000.0056,00-17e48d108f492d42fe6debbbcae5ab11-cd0431cb58d2dee2-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\RandomModels\WattsStrogatz.fs,,WattsStrogatz,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.5268,07-32-40.5339,000.0072,00-17e48d108f492d42fe6debbbcae5ab11-8becaa64de18fd61-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\RandomModels/StarGraph.fs,,StarGraph,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.4973,07-32-40.5917,000.0944,00-17e48d108f492d42fe6debbbcae5ab11-9835248d3a6392af-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Algorithms\Louvain.fs,,Louvain,,,,,,,,,,
CheckDeclarations.CheckOneImplFile,07-32-40.5919,07-32-40.5989,000.0071,00-17e48d108f492d42fe6debbbcae5ab11-e862c9c57bff4208-00,00-17e48d108f492d42fe6debbbcae5ab11-41c5ff9c580deb09-00,17e48d108f492d42fe6debbbcae5ab11,C:\Users\nojaf\Projects\Graphoscope\src\Graphoscope\Algorithms\WedgeCount.fs,,WedgeCount,,,,,,,,,,

(Using flag --times:data.csv)

In this graph, we can add a "virtual" root node and consider the weight of each edge to be the time it takes to type-check the destination node. The graph is acyclical as in F# file can only use other files that came before it.

In this concrete example, there are no files that took a long time to type-check but for some projects, there can really be a few bottlenecks.

In theory, assuming we have infinite parallel processing power, we can consider the longest world clock time to type-check the entire project to be the longest possible path.

I hope this helps, please ask any follow-up questions.

LibraChris commented 11 months ago

Thank you very much for this detailed example. The longest path algorithm is indeed an optimal choice for this kind of problem. I will be working on the implementation, depending on my workload finishing this or within the upcoming week.

nojaf commented 10 months ago

Hi @LibraChris, did you ever find some time to look into this?

LibraChris commented 10 months ago

Apologies for the delay on this – it's been a hectic few weeks. I'm carving out the next two weeks exclusively for Graphoscope. I've got the theory down and a plan in place; it's just been a time crunch on the implementation. I'm on it, though.

Thanks for your patience.

nojaf commented 10 months ago

Hi Chris, thank you for this update! I'm happy it is still on your radar!

LibraChris commented 10 months ago

@nojaf Just as a follow-up question: What do you think the return for this function should be? A tuple of the nodeKey and the longest Path distance, just the nodeKey, just the longest Path Distance or the complete path to the node?

I have completed a prototype for the longest path algorithm detection based on the FGraph structure. Depending on your answer I will adapt the output of the function to match the use case you think would work best.

nojaf commented 10 months ago

Hey Chris, I believe I would like to know the complete path and distance.

In my case, based on that information I would try and make the longest path shorter in subsequent runs, after tweaking the graph slightly.

LibraChris commented 10 months ago

Hey Chris, I believe I would like to know the complete path and distance.

In my case, based on that information I would try and make the longest path shorter in subsequent runs, after tweaking the graph slightly.

I've got a prototype of this on the longestPath branch of Graphoscope. I'm still working on adding more docs and tests, but you can already test the function using Measures.LongestPath if you want.

One thing to note is that this will only display one longest path. If there are multiple paths to the same node that are identical in length or there is another node with the same length this will not be displayed. While the first is a limitation set by the way the current algorithm works, the second is just a design choice and can easily be fixed. Please don't hesitate to comment on this.

Let me know if you run into any issues or if there's anything you think should be changed for convenience.

Cheers, Christopher

nojaf commented 10 months ago

Hi Christopher,

I started playing with this and I'm very happy with the initial results! I'm able to plug this into the graph-based checking results and the longest path!

LibraChris commented 9 months ago

I've added new functionality to the LongestPath, primarily incorporating a check for graph acyclicity. The standard compute functions now include a test for graph cyclicity, and they will fail if the graph is not acyclic. To bypass this test, you can use getLongestPathOfFGraphUnchecked instead. I've also introduced some initial tests, with plans to expand upon them in the future. This enhanced functionality will be merged into the developer branch today.

As we're currently undergoing a restructuring of the Graphoscope structure, a nuget release with the LongestPath feature will be scheduled after the completion of this remodelling. If you have any further thoughts or feedback on these changes @nojaf, please feel free to share them.

nojaf commented 9 months ago

Hi Chris, sounds good. Thanks for the update!