File tree 1 file changed +15
-0
lines changed
schema/src/main/scala/io/shiftleft/codepropertygraph/schema
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1
1
package io .shiftleft .codepropertygraph .schema
2
2
3
3
import overflowdb .schema .EdgeType .Cardinality
4
+ import overflowdb .schema .Property .ValueType
4
5
import overflowdb .schema .{SchemaBuilder , SchemaInfo }
5
6
6
7
object Cfg extends SchemaBase {
@@ -101,6 +102,20 @@ object Cfg extends SchemaBase {
101
102
102
103
methodRef.addOutEdge(edge = cfg, inNode = methodReturn)
103
104
typeRef.addOutEdge(edge = cfg, inNode = methodReturn)
105
+
106
+ val depthFirstOrder = builder
107
+ .addProperty(
108
+ name = " DEPTH_FIRST_ORDER" ,
109
+ valueType = ValueType .Int ,
110
+ comment = s """ The depth first ordering number. This is the reverse of a post order numbering.
111
+ |Among other things this can be to detect retreating CFG edges and back edges
112
+ |in reducible CFGs """ .stripMargin
113
+ )
114
+ .mandatory(- 1 )
115
+ .protoId(17 )
116
+
117
+ cfgNode.addProperties(depthFirstOrder)
118
+
104
119
}
105
120
106
121
}
You can’t perform that action at this time.
0 commit comments