Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.shiftleft.codepropertygraph.schema

import overflowdb.schema.EdgeType.Cardinality
import overflowdb.schema.Property.ValueType
import overflowdb.schema.{SchemaBuilder, SchemaInfo}

object Cfg extends SchemaBase {
Expand Down Expand Up @@ -101,6 +102,20 @@ object Cfg extends SchemaBase {

methodRef.addOutEdge(edge = cfg, inNode = methodReturn)
typeRef.addOutEdge(edge = cfg, inNode = methodReturn)

val depthFirstOrder = builder
.addProperty(
name = "DEPTH_FIRST_ORDER",
valueType = ValueType.Int,
comment = s"""The depth first ordering number. This is the reverse of a post order numbering.
|Among other things this can be to detect retreating CFG edges and back edges
|in reducible CFGs""".stripMargin
)
.mandatory(-1)
.protoId(17)

cfgNode.addProperties(depthFirstOrder)

}

}