Central class for conducting analyses with FlowR. Use the FlowrAnalyzerBuilder to create a new instance.

If you want the original pattern of creating a pipeline and running all steps, you can still do this with FlowrAnalyzer#runFull.

To inspect the context of the analyzer, use FlowrAnalyzer#inspectContext (if you are a plugin and need to modify it, use FlowrAnalyzer#context instead).

Type Parameters

Implements

Constructors

Properties

flowrConfig: FlowrConfigOptions

This is the config used for the analyzer

Methods

  • Close the parser if it was created by this builder. This is only required if you rely on an RShell/remote engine.

    Returns boolean | void

  • Get the control flow graph (CFG) for the request.

    Parameters

    • Optionalsimplifications: readonly (
          | "unique-cf-sets"
          | "analyze-dead-code"
          | "remove-dead-code"
          | "to-basic-blocks"
      )[]

      Simplification passes to be applied to the CFG.

    • OptionaluseDataflow: boolean

      Whether to use the dataflow graph for the creation of the CFG.

    • Optionalforce: boolean

      Do not use the cache, instead force new analyses.

    Returns Promise<ControlFlowInformation<CfgSimpleVertex>>

  • Access the query API for the request.

    Type Parameters

    • Types extends
          | "config"
          | "origin"
          | "dataflow"
          | "search"
          | "dependencies"
          | "call-context"
          | "control-flow"
          | "dataflow-lens"
          | "df-shape"
          | "normalized-ast"
          | "id-map"
          | "dataflow-cluster"
          | "static-slice"
          | "lineage"
          | "location-map"
          | "happens-before"
          | "resolve-value"
          | "project"
          | "linter" =
          | "config"
          | "origin"
          | "dataflow"
          | "search"
          | "dependencies"
          | "call-context"
          | "control-flow"
          | "dataflow-lens"
          | "df-shape"
          | "normalized-ast"
          | "id-map"
          | "dataflow-cluster"
          | "static-slice"
          | "lineage"
          | "location-map"
          | "happens-before"
          | "resolve-value"
          | "project"
          | "linter"

    Parameters

    Returns Promise<QueryResults<Types>>