analysis: basic checks for acyclic property of TmfGraph
authorFrancis Giraldeau <francis.giraldeau@gmail.com>
Thu, 22 Oct 2015 01:23:57 +0000 (21:23 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Thu, 22 Oct 2015 23:29:21 +0000 (19:29 -0400)
commit732e074490307efdec2fb08a5eaaa19d6e7babe4
tree30aff2e7bbb2f185a40228f638faeb1fe313d131
parentea3e33e85d7bdd4dc35fd2897297707ae9e22280
analysis: basic checks for acyclic property of TmfGraph

The TmfGraph is Directed Acyclic Graph (DAG). This patch adds three
checks:

 * verify that a node is not linked to itself (this was possible because
the timestamp is greater or equal to itself).
 * assert that getHead() will terminate in the special case where the
tail points to the head indirectly.
 * fix infinite loop bug with TmfGraph.scanLineTraverse() with a
specific graph.

Change-Id: I68a3eaed2c1098df1547d1fba34c35bc1d038404
Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Reviewed-on: https://git.eclipse.org/r/58682
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
analysis/org.eclipse.tracecompass.analysis.graph.core.tests/src/org/eclipse/tracecompass/analysis/graph/core/tests/graph/TmfGraphTest.java
analysis/org.eclipse.tracecompass.analysis.graph.core/src/org/eclipse/tracecompass/analysis/graph/core/base/CycleDetectedException.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.graph.core/src/org/eclipse/tracecompass/analysis/graph/core/base/Messages.java
analysis/org.eclipse.tracecompass.analysis.graph.core/src/org/eclipse/tracecompass/analysis/graph/core/base/TmfGraph.java
analysis/org.eclipse.tracecompass.analysis.graph.core/src/org/eclipse/tracecompass/analysis/graph/core/base/TmfVertex.java
analysis/org.eclipse.tracecompass.analysis.graph.core/src/org/eclipse/tracecompass/analysis/graph/core/base/messages.properties
This page took 0.025109 seconds and 5 git commands to generate.