SPeCS Packages Documentation
    Preparing search index...
    Index

    Constructors

    • Creates a new instance of the CfgBuilder class

      Parameters

      • $jp: Statement
      • deterministicIds: boolean = false

        If true, uses deterministic ids for the graph ids (e.g. id_0, id_1...). Otherwise, uses $jp.astId whenever possible

      • options: {
            keepTemporaryScopeStmts: boolean;
            removeGotoNodes: boolean;
            removeLabelNodes: boolean;
            splitInstList: boolean;
        } = ...

        An object containing configuration options for the cfg

        • keepTemporaryScopeStmts: boolean

          If true, the temporary scope statements will be kept in the resulting graph

        • removeGotoNodes: boolean

          If true, the nodes that correspond to goto statements will be excluded from the resulting graph

        • removeLabelNodes: boolean

          If true, the nodes that correspond to label statements will be excluded from the resulting graph

        • splitInstList: boolean

          If true, statements of each instruction list must be split

      Returns CfgBuilder

    Methods

    • Builds the control flow graph

      Returns [Core, Map<string, NodeSingular>, NodeSingular, NodeSingular]

      An array that includes the built graph, the nodes, the start and end nodes