Skip to content

Commit 443441c

Browse files
Import Node Tag & Remove Points To (#1716)
* In Joern's new import resolution, descriptions of entities referred to by imports are described by `Tag` nodes. Since `Import` nodes cannot be tagged, their optional call node is tagged instead. Not all languages use call imports so this excludes languages like Java. This allows import nodes to be tagged to avoid this exclusion. * Removed the `POINTS_TO` edge as it is no longer used, this was initially brought in as an experimental alias analysis edge but realistically this would likely be done on-the-fly or via `Tag` nodes until a better motivation for this edge is given.
1 parent 99215ba commit 443441c

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

  • schema/src/main/scala/io/shiftleft/codepropertygraph/schema

schema/src/main/scala/io/shiftleft/codepropertygraph/schema/Hidden.scala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -260,21 +260,12 @@ object Hidden extends SchemaBase {
260260
.protoId(23664)
261261

262262
importNode.addOutEdge(edge = imports, inNode = dependency)
263+
importNode.addOutEdge(edge = taggedBy, inNode = tag)
263264
callNode.addOutEdge(edge = isCallForImport, inNode = importNode)
264265

265266
block.addOutEdge(edge = ast, inNode = importNode)
266267
file.addOutEdge(edge = ast, inNode = importNode)
267268
typeDecl.addOutEdge(edge = ast, inNode = importNode)
268-
269-
val pointsTo = builder
270-
.addEdgeType(
271-
name = "POINTS_TO",
272-
comment = """Used for calculating points-to sets for resolving object aliasing.
273-
|""".stripMargin
274-
)
275-
.protoId(12345)
276-
277-
cfgSchema.cfgNode.addOutEdge(edge = pointsTo, inNode = cfgSchema.cfgNode)
278269
}
279270

280271
}

0 commit comments

Comments
 (0)