@eagleoutice/flowr - v2.10.2
    Preparing search index...

    Interface FlowrAnalysisProvider<Parser>

    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;
        callGraph(force?: boolean): Promise<CallGraph>;
        context(): FlowrAnalyzerContext;
        controlflow(
            simplifications?: readonly (
                | "unique-cf-sets"
                | "analyze-dead-code"
                | "remove-dead-code"
                | "to-basic-blocks"
            )[],
            kind?: CfgKind,
            force?: boolean,
        ): Promise<ControlFlowInformation<CfgVertex>>;
        dataflow(
            force?: boolean,
        ): Promise<DataflowInformation & PipelinePerStepMetaInformation>;
        flowrConfig: FlowrConfig;
        inspectContext(): ReadOnlyFlowrAnalyzerContext;
        normalize(
            force?: boolean,
        ): Promise<
            NormalizedAst<ParentInformation, RProject<ParentInformation>> & PipelinePerStepMetaInformation,
        >;
        normalizeStandalone(data: string | RParseRequest): NormalizedAst;
        parse(
            force?: boolean,
        ): Promise<NonNullable<AnalyzerCacheType<Parser>["parse"]>>;
        parserInformation(): KnownParserInformation;
        parseStandalone(data: string | RParseRequest): Tree;
        peekCallGraph(): CallGraph | undefined;
        peekControlflow(
            simplifications?: readonly (
                | "unique-cf-sets"
                | "analyze-dead-code"
                | "remove-dead-code"
                | "to-basic-blocks"
            )[],
            kind?: CfgKind,
        ): ControlFlowInformation<CfgVertex> | undefined;
        peekDataflow(): | DataflowInformation & PipelinePerStepMetaInformation
        | undefined;
        peekNormalize(): | NormalizedAst<
            ParentInformation,
            RProject<ParentInformation>,
        > & PipelinePerStepMetaInformation
        | undefined;
        peekParse(): NonNullable<AnalyzerCacheType<Parser>["parse"]> | undefined;
        query<
            Types extends
                | "search"
                | "origin"
                | "call-context"
                | "config"
                | "dataflow"
                | "does-call"
                | "call-graph"
                | "control-flow"
                | "dataflow-lens"
                | "files"
                | "df-shape"
                | "normalized-ast"
                | "id-map"
                | "dataflow-cluster"
                | "static-slice"
                | "dependencies"
                | "location-map"
                | "happens-before"
                | "inspect-exception"
                | "inspect-higher-order"
                | "inspect-recursion"
                | "resolve-value"
                | "project"
                | "linter"
                | "provenance"
                | "input-sources" = | "search"
            | "origin"
            | "call-context"
            | "config"
            | "dataflow"
            | "does-call"
            | "call-graph"
            | "control-flow"
            | "dataflow-lens"
            | "files"
            | "df-shape"
            | "normalized-ast"
            | "id-map"
            | "dataflow-cluster"
            | "static-slice"
            | "dependencies"
            | "location-map"
            | "happens-before"
            | "inspect-exception"
            | "inspect-higher-order"
            | "inspect-recursion"
            | "resolve-value"
            | "project"
            | "linter"
            | "provenance"
            | "input-sources",
        >(
            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
    Index

    Properties

    flowrConfig: FlowrConfig

    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.

    • 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.

      • Optionalkind: CfgKind

        The kind of CFG that is requested. By default, the CFG without dataflow information is returned.

      • Optionalforce: boolean

        Do not use the cache, instead force new analyses.

      Returns Promise<ControlFlowInformation<CfgVertex>>

      ReadonlyFlowrAnalysisProvider#peekControlflow - to get the CFG if already available without triggering a new computation.

    • Access the query API for the request.

      Type Parameters

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

      Parameters

      Returns Promise<QueryResults<Types>>