Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Issue25 #26

Merged
merged 5 commits into from Oct 4, 2016
Merged

Issue25 #26

merged 5 commits into from Oct 4, 2016

Conversation

VijayKrishna
Copy link
Member

No description provided.

What: Source ICFG: Missing arbitrary edges b/w successive lines in a method

Why:
this was happening because edges were being created between nodes that
were not part of the graph. This would happen in case the node with a
certain label already existed and for we tried to create the node
with the same label, again; and since a node with the label already
existed the new node would be ignored by the graph. But, the edge was
getting created with the new node, not the original node.

Fix:
This fix ensures that if a node with a given lable already exsits,
then a new node is not created, and the existing/orignal node is
used instead, esp. for creating new edges.
What: This change avoids any self loops in the source ICFG, where
self loops are edges with the same source and target.

Why:
- This can happen if a source code statement (in Java) is
translated to two or more successive Jimple (or other IR) statements.
Thereby, resulting in the edges between the Jimple statements, which
belong to the same source statement, to get translated to an edge in
the soruce ICFG where the source and traget nodes are the same.
- Also having such statements is not particularly useful in the
source level ICFG

Fix: simply not adding an edge between two node if they are the same.
@jycamus90 jycamus90 merged commit 59a2087 into master Oct 4, 2016
@VijayKrishna VijayKrishna deleted the issue25 branch October 6, 2016 18:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants