CpgPass
Base class for CPG pass - a program, which receives an input graph and outputs a sequence of additive diff graphs. These diff graphs can be merged into the original graph ("applied"), they can be serialized into a binary format, and finally, they can be added to an existing cpg.bin.zip file.
A pass is provided by inheriting from this class and implementing run
, a method, which creates the sequence of
diff graphs from an input graph.
Overview of steps and their meaning:
- Create: A sequence of diff graphs is created from the source graph 2. Apply: Each diff graph can be applied to
the source graph 3. Serialize: After applying a diff graph, the diff graph can be serialized into a CPG overlay
- Store: The CPG overlay can be stored in a serialized CPG.
- Value Params
- cpg
the source CPG this pass traverses
- Deprecated
[Since version v1.3.508]
Please use SimpleCpgPass as a replacement.
Value members
Abstract methods
Concrete methods
Execute the pass and apply result to the underlying graph
Execute the pass and apply result to the underlying graph
- Definition Classes
Execute and create a serialized overlay
Execute and create a serialized overlay
- Value Params
- inverse
invert the diffgraph before serializing
Run a CPG pass to create diff graphs, apply diff graphs, create corresponding overlays and add them to the serialized CPG. The name of the overlay is derived from the class name of the pass.
Run a CPG pass to create diff graphs, apply diff graphs, create corresponding overlays and add them to the serialized CPG. The name of the overlay is derived from the class name of the pass.
- Value Params
- inverse
invert the diffgraph before serializing
- prefix
a prefix to add to the output name
- serializedCpg
the destination serialized CPG to add overlays to
- Definition Classes
Inherited methods
Name of the pass. By default it is inferred from the name of the class, override if needed.
Name of the pass. By default it is inferred from the name of the class, override if needed.
- Inherited from
- CpgPassBase
Wraps runWithBuilder with logging, and swallows raised exceptions. Use with caution -- API is unstable. A return value of -1 indicates failure, otherwise the return value of runWithBuilder is passed through.
Wraps runWithBuilder with logging, and swallows raised exceptions. Use with caution -- API is unstable. A return value of -1 indicates failure, otherwise the return value of runWithBuilder is passed through.
- Inherited from
- CpgPassBase