diff --git a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/OverlayNode.kt b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/OverlayNode.kt index cd6a91b45a..6365abfe51 100644 --- a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/OverlayNode.kt +++ b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/OverlayNode.kt @@ -29,4 +29,7 @@ package de.fraunhofer.aisec.cpg.graph * Represents an extra node added to the CPG. These nodes can live next to the CPG, typically having * shared edges to extend the original CPG graph. */ -abstract class OverlayNode : Node() +abstract class OverlayNode : Node() { + /** All [OverlayNode]s nodes are connected to an original cpg [Node] by this. */ + abstract val underlayingNode: Node +} diff --git a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts/Concept.kt b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts/Concept.kt index d676a3c837..dad9976f81 100644 --- a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts/Concept.kt +++ b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts/Concept.kt @@ -25,7 +25,6 @@ */ package de.fraunhofer.aisec.cpg.graph.concepts -import de.fraunhofer.aisec.cpg.graph.Node import de.fraunhofer.aisec.cpg.graph.OverlayNode /** @@ -34,8 +33,6 @@ import de.fraunhofer.aisec.cpg.graph.OverlayNode * and stored in [ops]. */ abstract class Concept() : OverlayNode() { - /** All concept nodes are connected to an original cpg [Node] by this. */ - abstract val cpgNode: Node /** All [Operation]s belonging to this concept. */ abstract val ops: Set } diff --git a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts/Operation.kt b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts/Operation.kt index 9fa747e3dd..3944ef4dc4 100644 --- a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts/Operation.kt +++ b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/concepts/Operation.kt @@ -25,7 +25,6 @@ */ package de.fraunhofer.aisec.cpg.graph.concepts -import de.fraunhofer.aisec.cpg.graph.Node import de.fraunhofer.aisec.cpg.graph.OverlayNode /** @@ -33,8 +32,6 @@ import de.fraunhofer.aisec.cpg.graph.OverlayNode * `write` on a file or log object or an `execute` on a database. */ abstract class Operation : OverlayNode() { - /** All concept nodes are connected to an original cpg [Node] by this. */ - abstract val cpgNode: Node /** The [Concept] this operation belongs to. */ abstract val concept: Concept }