Maybe it just my mail client that's only showing my updated patch to address the test failure. This is my original comment to Kevin's email:

Hi Kevin, all,

I have found several places in DepthFirstAnalysis, Graph, Edge, and the
testcase that was using the wrong equality check.  The testcase is working
much better, but still not perfect.
I addressed the == comparison in my workspace and prepared a new patch. But I only changed the classes TestDepthFirstAnalysis, DepthFirstAnalysis, and Edge. What did you change in Graph?
I need some graphing expertise...  In the setup for graph 2 in the testcase,
there is a node that has an edge to itself (Node 3 with Integer 3 has an
edge to itself).  The question is whether this type of edge should be
classified as a Back edge or a Forward edge.  The testcase seems to expect
this type of edge to be a Forward edge, but the analysis of the graph is
determining this is a Back edge.  I'm not a graphing expert, what's the
expected type of edge in this case?
Single node loops are considered Back edges (Back edges can't occur during OpenJPA dependency management). For graph 2, the DFA should find:

2 Back edges: (3,3) and (3,2)
2 Forward edges: (2,4) and (1,4) [the edge (1,4) doesn't indicate a cycle]

This results is dependent on the first node chosen for the DFA analysis. This must must be node 2 for the above result. The starting point is determined by the order of the nodes in Graph._nodes.

Thanks everybody for looking into this and special thanks to Kevin!

Cheers,

-- markus.


Reply via email to