File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
schema/src/main/scala/io/shiftleft/codepropertygraph/schema Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 11package io .shiftleft .codepropertygraph .schema
22
33import overflowdb .schema .EdgeType .Cardinality
4+ import overflowdb .schema .Property .ValueType
45import overflowdb .schema .{SchemaBuilder , SchemaInfo }
56
67object Cfg extends SchemaBase {
@@ -101,6 +102,20 @@ object Cfg extends SchemaBase {
101102
102103 methodRef.addOutEdge(edge = cfg, inNode = methodReturn)
103104 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+
104119 }
105120
106121}
You can’t perform that action at this time.
0 commit comments