Extends the ReadonlyFlowrAnalysisProvider with methods that allow modifying the analyzer state.

interface FlowrAnalysisProvider<Parser extends KnownParser = KnownParser> {
    addFile(
        ...f: (string | RParseRequestFromFile | FlowrFileProvider<string>)[],
    ): void;
    addRequest(...request: (string | RAnalysisRequest)[]): void;
    context(): FlowrAnalyzerContext;
    controlflow(
        simplifications?: readonly (
            | "unique-cf-sets"
            | "analyze-dead-code"
            | "remove-dead-code"
            | "to-basic-blocks"
        )[],
        kind?: CfgKind,
        force?: boolean,
    ): Promise<ControlFlowInformation<CfgSimpleVertex>>;
    dataflow(
        force?: boolean,
    ): Promise<DataflowInformation & PipelinePerStepMetaInformation>;
    flowrConfig: FlowrConfigOptions;
    inspectContext(): ReadOnlyFlowrAnalyzerContext;
    normalize(
        force?: boolean,
    ): Promise<
        NormalizedAst<ParentInformation, RProject<ParentInformation>> & PipelinePerStepMetaInformation,
    >;
    parse(
        force?: boolean,
    ): Promise<NonNullable<AnalyzerCacheType<Parser>["parse"]>>;
    parserInformation(): KnownParserInformation;
    peekControlflow(
        simplifications?: readonly (
            | "unique-cf-sets"
            | "analyze-dead-code"
            | "remove-dead-code"
            | "to-basic-blocks"
        )[],
        kind?: CfgKind,
    ): undefined | ControlFlowInformation<CfgSimpleVertex>;
    peekDataflow(): | undefined
    | DataflowInformation & PipelinePerStepMetaInformation;
    peekNormalize(): | undefined
    | NormalizedAst<ParentInformation, RProject<ParentInformation>> & PipelinePerStepMetaInformation;
    peekParse(): undefined | NonNullable<AnalyzerCacheType<Parser>["parse"]>;
    query<
        Types extends
            | "search"
            | "config"
            | "origin"
            | "dataflow"
            | "call-context"
            | "control-flow"
            | "dataflow-lens"
            | "df-shape"
            | "normalized-ast"
            | "id-map"
            | "dataflow-cluster"
            | "static-slice"
            | "dependencies"
            | "location-map"
            | "happens-before"
            | "inspect-higher-order"
            | "resolve-value"
            | "project"
            | "linter" = | "search"
        | "config"
        | "origin"
        | "dataflow"
        | "call-context"
        | "control-flow"
        | "dataflow-lens"
        | "df-shape"
        | "normalized-ast"
        | "id-map"
        | "dataflow-cluster"
        | "static-slice"
        | "dependencies"
        | "location-map"
        | "happens-before"
        | "inspect-higher-order"
        | "resolve-value"
        | "project"
        | "linter",
    >(
        query: Queries<Types>,
    ): Promise<QueryResults<Types>>;
    reset(): void;
    runFull(force?: boolean): Promise<void>;
    runSearch<Search extends FlowrSearchLike>(
        search: Search,
    ): Promise<GetSearchElements<SearchOutput<Search>>>;
}

Type Parameters

Hierarchy (View Summary)

Hierarchy-Diagram

UML class diagram of FlowrAnalysisProvider

Properties

flowrConfig: FlowrConfigOptions

This is the config used for the analyzer

Methods

  • Add one or multiple requests to analyze.

    Parameters

    • ...request: (string | RAnalysisRequest)[]

      One or multiple requests or a file path (with the file:// protocol). If you just enter a string without the fileProtocol, it will be interpreted as R code.

    Returns void

    addFile - for adding files to the analyzer's context.

  • Access the query API for the request.

    Type Parameters

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

    Parameters

    Returns Promise<QueryResults<Types>>