Add one or multiple files to the analyzer's context.
One or multiple file paths, file providers, or parse requests from file.
Add one or multiple requests to analyze.
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.
addFile - for adding files to the analyzer's context.
Calculate the call graph for the request.
Optionalforce: booleanReturns project context information. If you are a user that wants to inspect the context, prefer inspectContext instead. Please be aware that modifications to the context may break analyzer assumptions.
Get the control flow graph (CFG) for the request.
Optionalsimplifications: readonly (Simplification passes to be applied to the CFG.
Optionalforce: boolean
Do not use the cache, instead force new analyses.
ReadonlyFlowrAnalysisProvider#peekControlflow - to get the CFG if already available without triggering a new computation.
Get the dataflow graph for the request.
Optionalforce: boolean
Do not use the cache, instead force new analyses.
ReadonlyFlowrAnalysisProvider#peekDataflow - to get the dataflow graph if already available without triggering a new computation.
What flowR knows about the function name, whether that is one of its own built-ins, a package function
the signature database carries, or both; see fnInfo.
A string is read the way R source spells a name, so 'dplyr::lead' and 'dplyr:::internal' name the
package function rather than a symbol with a :: in it (pass an Identifier for that one).
The function to ask about, 'dplyr::lead' or Identifier.make('lead', 'dplyr') to pin the package down.
Optionalversion: string
The package version to answer for, the one the analysis assumes if omitted.
Returns a read-only version of the project context information. This is the preferred method for users that want to inspect the context.
Get the normalized abstract syntax tree for the request.
Optionalforce: boolean
Do not use the cache, instead force new analyses.
ReadonlyFlowrAnalysisProvider#peekNormalize - to get the normalized AST if already available without triggering a new computation.
Normalize standalone R code provided as a string or via the file:// protocol.
The R code to normalize, either as a string or as a file:// URL.
this method will always use the TreeSitterExecutor internally, make sure it is initialized!
Get the parse output for the request.
The parse result type depends on the KnownParser used by the analyzer.
Optionalforce: boolean
Do not use the cache, instead force a new parse.
ReadonlyFlowrAnalysisProvider#peekParse - to get the parse output if already available without triggering a new computation.
Returns a set of additional data and helper functions exposed by the underlying KnownParser, including the parser's BaseParserInformation.name and corresponding version information.
Parse standalone R code provided as a string or via the file:// protocol.
The R code to parse, either as a string or as a file:// URL.
this method will always use the TreeSitterExecutor internally, make sure it is initialized!
Peek at the call graph for the request, if it was already computed.
Peek at the control flow graph (CFG) for the request, if it was already computed.
Optionalsimplifications: readonly (Peek at the dataflow graph for the request, if it was already computed.
Peek at the normalized abstract syntax tree for the request, if it was already computed.
Peek at the parse output for the request, if it was already computed.
Access the query API for the request.
The list of queries.
Optionaloptions: FlowrAnalysisOptions
Bounds for this call, see FlowrAnalysisOptions.
Receive cache invalidation events from the cache and propagate them to the context and other relevant components.
Reset the analyzer state, including the context and the cache.
Discard every updateConfig override made so far and invalidate the cached analysis.
This executes all steps of the core analysis (parse, normalize, dataflow).
Optionalforce: boolean
Do not use the cache, instead force a new analysis.
Optionaloptions: FlowrAnalysisOptions
Bounds for this call, see FlowrAnalysisOptions.
Run a search on the current analysis.
The search to run.
Optionaloptions: FlowrAnalysisOptions
Bounds for this call, see FlowrAnalysisOptions.
Merge a runtime update into the base config and invalidate the derived config and cached analysis, so it takes effect.
Optional ReadonlyabstractInterpretation?: {Optional ReadonlydefaultEngine?: "r-shell" | "tree-sitter"The default engine to use. If undefined, an arbitrary one from engines is used.
Optional ReadonlydefaultPlugins?: (string | [(...)?, (...)?] | undefined)[]Optional Readonlyengines?: (Engines to use for interacting with R code (TreeSitterEngineConfig, RShellEngineConfig); empty means all available engines.
Optional Readonlygas?: {Resource-usage guard (gas) configuration; disabled by default (every feature factor 0), enable by setting a
feature's factor > 0. See FlowrGasConfig, ReadOnlyFlowrAnalyzerGasContext.
Optional ReadonlycountedCheckEvery?: numberHow many calls one accounting of an armed budget covers (default DefaultCountedCheckEvery). Trades how far
a run may overshoot a bound against what the guard costs per node: 1 counts exactly, larger counts coarsely.
Optional Readonlyfeatures?: { [key: ...]: ... }Per-feature sensitivity factors. Missing or 0 disables checking with zero overhead.
Optional ReadonlyheapProvider?: () => ...Custom heap statistics source (programmatic configs only), overriding the built-in v8/performance.memory detection. Return undefined to skip the memory check.
Optional Readonlythresholds?: { memory?: ...; steps?: ...; timeMs?: ...; vertices?: ...; [key: ...]: ... }Thresholds scaled by each feature factor before comparison, optionally bounded per feature (see GasThresholdSpec).
Optional Readonlymemory?: ...Heap-usage fraction thresholds (0-1, before factor scaling).
Optional Readonlysteps?: ...Processed-AST-node thresholds, counted rather than sampled. Only read by keys that arm a budget (i.e. GasFeatureKey.Dataflow); absent means unbounded.
Optional ReadonlytimeMs?: ...Elapsed analysis time thresholds in milliseconds (before factor scaling).
Optional Readonlyvertices?: ...Created-dataflow-vertex thresholds, counted like FlowrGasThresholds.steps.
Optional ReadonlyignoreLoadCalls?: booleanOptional ReadonlyignoreSourceCalls?: booleanOptional Readonlyincremental?: { alwaysIncremental?: boolean; parsing?: { activated?: ...; heuristics?: ... } }Optional ReadonlyinputSources?: {Teaches the InputSourcesQuery|input-sources analysis further frameworks; entries are added to what flowR knows already. Usually set per ProjectKind via specializeConfig. See InputClassifierConfig.
Optionalcmdline?: (...)[]Optionalconst?: (...)[]Optionaldconst?: (...)[]Optionalffi?: (...)[]Optionalfile?: (...)[]Optionalglob?: (...)[]Optionallang?: (...)[]OptionallinkedEntryPoints?: (...)[]Calls that hand a function to a framework, which then binds linkedObjects to its parameters by position.
OptionallinkedObjects?: (...)[]Objects provided by a framework rather than by the code itself, like shiny's input.
Optionalnarrowing?: (...)[]Functions whose result is bounded by one of their arguments (classified by that argument alone).
Optionalnet?: (...)[]Optionaloptions?: (...)[]Optionalparam?: (...)[]Optionalpure?: (...)[]Functions which are considered to be pure (i.e., deterministic, trusted, safe, idempotent on the lub of the input types)
Optionalrand?: (...)[]Optionalscope?: (...)[]Optionalsystem?: (...)[]Optionaltempfile?: (...)[]Optionalunknown?: (...)[]Optionaluser?: (...)[]Optional Readonlylinter?: { disabledRules?: (...)[] }Optional ReadonlylogLevel?: "debug" | "silly" | "trace" | "info" | "warn" | "error" | "fatal"Optional Readonlyproject?: {OptionalassumeImplicitEcho?: booleanWhether the top level's visible results count as an output (the print category); off by default for a ProjectKind.Package, whose top level runs at install time.
OptionalbasePackages?: (...)[]The packages considered part of R itself; if unset, flowR derives them (for the assumed R version) from the signature database via baseRPackages.
Optionalclassification?: {OptionalnotebookExtensions?: ...File extensions marking a notebook (default ipynb, rmd, rmarkdown, qmd, rnw).
OptionalshinyDescriptionTypes?: ...DESCRIPTION Type: values that mark a shiny app (default shiny, shiny-app, shinyapp).
OptionalshinyEntryFiles?: ...File names a shiny app is assembled from (default app.R, ui.R, server.R, global.R).
OptionalshinyUsagePattern?: ...Optionaldiscovery?: { full?: ...; ignore?: ...; perKind?: ... }OptionalfailOnInaccessiblePath?: booleanOptionalimplicitSources?: (...)[]OptionalresolveUnknownPathsOnDisk?: booleanOptionaluseProjectType?: ProjectKindOptional Readonlyrepl?: {OptionalautoUseFileProtocol?: booleanAutomatically use the file protocol for inputs that look like paths (default true)
OptionaldfProcessorHeat?: booleanOptionalhints?: booleanWhether to show dim inline hints (e.g. :help) on the empty prompt; automatically disabled on non-interactive terminals
Optionalplugins?: (...)[]OptionalqueryStats?: booleanWhether :query closes with the line stating how long the queries took (default true, :query* never prints it)
OptionalquickStats?: booleanOptionalshowPlugins?: booleanWhether :version grays out the plugins that did not activate during the last analysis (default false)
Optional Readonlysemantics?: { environment?: { overwriteBuiltIns?: ... } }Optional Readonlysolver?: {Optional ReadonlyassumeAttachedPackages?: (...)[]Optional ReadonlyevalStrings?: booleanOptional Readonlyinstrument?: { dataflowExtractors?: ... }OptionaldataflowExtractors?: ...Modify the dataflow processors used during analysis; keep every processor correctness requires present. May affect precision/performance arbitrarily -- prefer decorating existing processors over replacing them.
Optional ReadonlyresolveSource?: {Optional ReadonlyapplyReplacements?: ...Regex replacements to try against a sourced file's candidate name, tried in order alongside the original
name, e.g. { '.*\\.R$': 'main.R' } makes source("foo bar.R") also try main.R.
Optional ReadonlyassumeFilesExist?: ...Optional ReadonlydropPaths?: ...Optional ReadonlyignoreCapitalization?: ...Optional ReadonlyinferWorkingDirectory?: ...Optional ReadonlyrepeatedSourceLimit?: ...Optional ReadonlysearchPath?: ...Optional Readonlysigdb?: {Optional ReadonlyadditionalPaths?: ...Optional ReadonlyassumedRVersion?: ...R version assumed when resolving versioned (base-R) exports: a pin, or "auto" to detect the installed R
(falling back to DefaultAssumedRVersion if none, e.g. tree-sitter). See resolveAssumedRVersion.
Optional ReadonlyautoSync?: ...Optional ReadonlyblobCacheBudgetMb?: ...How many MiB of decoded package blobs every open bundle may hold together; a bigger budget re-reads and re-parses less, a smaller one keeps less in memory (default 16).
Optional ReadonlydownloadRepo?: ...Optional ReadonlyeagerlyLoad?: ...Optional ReadonlyeagerlyLoadExports?: ...Optional Readonlyenabled?: ...Optional ReadonlyinstalledLibrary?: ...Recovering a package no signature database knows (e.g. maptools) from its local install: DESCRIPTION
states the version, NAMESPACE the exports. Opt-in, since it reads outside the analyzed project.
Optional ReadonlylinkBaseR?: ...Eagerly attach base-R namespaces (from a signature database) so bare base calls resolve without library() (default false; changes every analysis; needs a base-R signature database).
Optional ReadonlylinkBaseRCalls?: ...Add a lightweight Reads edge from a bare base-R call to its signature-database function vertex (built-in:pkg:fn); base-R qualification stays edge-free unless this is on (default false; adds edges to every base call).
Optional ReadonlylinkDescriptionDependencies?: ...Eagerly attach the namespaces of the project's declared DESCRIPTION dependencies (Imports/Depends) so their exports resolve without an explicit library() (default false; changes every analysis; needs a signature database resolving the declared packages).
Optional ReadonlylinkPackageCalls?: ...Add a lightweight Reads edge from a resolved package call (pkg::fn/attached export) to its signature-database function vertex (default false).
Optional ReadonlyloadProjectDependencies?: ...Optional ReadonlyversionOverrides?: ...Force an exact version for specific packages (mapping a package name to a version), overriding both the project constraint and the versionSelection policy; a version missing from the database falls back with a warning (default {}).
Optional ReadonlyversionSelection?: ...Optional ReadonlywarmInBackground?: ...Decompress the hot shards (base + most-downloaded) in a background task on startup, so the first library() lookup is warm (default false; useful for long-running servers/REPLs, not one-shot runs).
Optionalslicer?: { autoExtend?: ...; threshold?: ... }Optional ReadonlytrackEnvironments?: booleanOptional ReadonlytransitiveSideEffectRounds?: numberOptional Readonlyvariables?: VariableResolveOptional ReadonlyversionManagement?: { linkedVersionGroups?: ... }Optional ReadonlyspecializeConfig?: {Overwrite (parts of) this configuration per ProjectKind; an entry may inherit another kind's
overwrite first (own keys win). Resolve with FlowrConfig.forKind.
Optionalnotebook?: {Optional ReadonlyabstractInterpretation?: ...Optional ReadonlydefaultEngine?: ...The default engine to use. If undefined, an arbitrary one from engines is used.
Optional ReadonlydefaultPlugins?: ...Optional Readonlyengines?: ...Engines to use for interacting with R code (TreeSitterEngineConfig, RShellEngineConfig); empty means all available engines.
Optional Readonlygas?: ...Resource-usage guard (gas) configuration; disabled by default (every feature factor 0), enable by setting a
feature's factor > 0. See FlowrGasConfig, ReadOnlyFlowrAnalyzerGasContext.
Optional ReadonlyignoreLoadCalls?: ...Optional ReadonlyignoreSourceCalls?: ...Optional Readonlyincremental?: ...Optional Readonlyinherit?: ...Optional ReadonlyinputSources?: ...Teaches the InputSourcesQuery|input-sources analysis further frameworks; entries are added to what flowR knows already. Usually set per ProjectKind via specializeConfig. See InputClassifierConfig.
Optional Readonlylinter?: ...Optional ReadonlylogLevel?: ...Optional Readonlyproject?: ...Optional Readonlyrepl?: ...Optional Readonlysemantics?: ...Optional Readonlysolver?: ...Optional ReadonlyspecializeConfig?: ...Overwrite (parts of) this configuration per ProjectKind; an entry may inherit another kind's
overwrite first (own keys win). Resolve with FlowrConfig.forKind.
Optionalpackage?: {Optional ReadonlyabstractInterpretation?: ...Optional ReadonlydefaultEngine?: ...The default engine to use. If undefined, an arbitrary one from engines is used.
Optional ReadonlydefaultPlugins?: ...Optional Readonlyengines?: ...Engines to use for interacting with R code (TreeSitterEngineConfig, RShellEngineConfig); empty means all available engines.
Optional Readonlygas?: ...Resource-usage guard (gas) configuration; disabled by default (every feature factor 0), enable by setting a
feature's factor > 0. See FlowrGasConfig, ReadOnlyFlowrAnalyzerGasContext.
Optional ReadonlyignoreLoadCalls?: ...Optional ReadonlyignoreSourceCalls?: ...Optional Readonlyincremental?: ...Optional Readonlyinherit?: ...Optional ReadonlyinputSources?: ...Teaches the InputSourcesQuery|input-sources analysis further frameworks; entries are added to what flowR knows already. Usually set per ProjectKind via specializeConfig. See InputClassifierConfig.
Optional Readonlylinter?: ...Optional ReadonlylogLevel?: ...Optional Readonlyproject?: ...Optional Readonlyrepl?: ...Optional Readonlysemantics?: ...Optional Readonlysolver?: ...Optional ReadonlyspecializeConfig?: ...Overwrite (parts of) this configuration per ProjectKind; an entry may inherit another kind's
overwrite first (own keys win). Resolve with FlowrConfig.forKind.
Optionalproject?: {Optional ReadonlyabstractInterpretation?: ...Optional ReadonlydefaultEngine?: ...The default engine to use. If undefined, an arbitrary one from engines is used.
Optional ReadonlydefaultPlugins?: ...Optional Readonlyengines?: ...Engines to use for interacting with R code (TreeSitterEngineConfig, RShellEngineConfig); empty means all available engines.
Optional Readonlygas?: ...Resource-usage guard (gas) configuration; disabled by default (every feature factor 0), enable by setting a
feature's factor > 0. See FlowrGasConfig, ReadOnlyFlowrAnalyzerGasContext.
Optional ReadonlyignoreLoadCalls?: ...Optional ReadonlyignoreSourceCalls?: ...Optional Readonlyincremental?: ...Optional Readonlyinherit?: ...Optional ReadonlyinputSources?: ...Teaches the InputSourcesQuery|input-sources analysis further frameworks; entries are added to what flowR knows already. Usually set per ProjectKind via specializeConfig. See InputClassifierConfig.
Optional Readonlylinter?: ...Optional ReadonlylogLevel?: ...Optional Readonlyproject?: ...Optional Readonlyrepl?: ...Optional Readonlysemantics?: ...Optional Readonlysolver?: ...Optional ReadonlyspecializeConfig?: ...Overwrite (parts of) this configuration per ProjectKind; an entry may inherit another kind's
overwrite first (own keys win). Resolve with FlowrConfig.forKind.
Optionalscript?: {Optional ReadonlyabstractInterpretation?: ...Optional ReadonlydefaultEngine?: ...The default engine to use. If undefined, an arbitrary one from engines is used.
Optional ReadonlydefaultPlugins?: ...Optional Readonlyengines?: ...Engines to use for interacting with R code (TreeSitterEngineConfig, RShellEngineConfig); empty means all available engines.
Optional Readonlygas?: ...Resource-usage guard (gas) configuration; disabled by default (every feature factor 0), enable by setting a
feature's factor > 0. See FlowrGasConfig, ReadOnlyFlowrAnalyzerGasContext.
Optional ReadonlyignoreLoadCalls?: ...Optional ReadonlyignoreSourceCalls?: ...Optional Readonlyincremental?: ...Optional Readonlyinherit?: ...Optional ReadonlyinputSources?: ...Teaches the InputSourcesQuery|input-sources analysis further frameworks; entries are added to what flowR knows already. Usually set per ProjectKind via specializeConfig. See InputClassifierConfig.
Optional Readonlylinter?: ...Optional ReadonlylogLevel?: ...Optional Readonlyproject?: ...Optional Readonlyrepl?: ...Optional Readonlysemantics?: ...Optional Readonlysolver?: ...Optional ReadonlyspecializeConfig?: ...Overwrite (parts of) this configuration per ProjectKind; an entry may inherit another kind's
overwrite first (own keys win). Resolve with FlowrConfig.forKind.
Optionalshiny-app?: {Optional ReadonlyabstractInterpretation?: ...Optional ReadonlydefaultEngine?: ...The default engine to use. If undefined, an arbitrary one from engines is used.
Optional ReadonlydefaultPlugins?: ...Optional Readonlyengines?: ...Engines to use for interacting with R code (TreeSitterEngineConfig, RShellEngineConfig); empty means all available engines.
Optional Readonlygas?: ...Resource-usage guard (gas) configuration; disabled by default (every feature factor 0), enable by setting a
feature's factor > 0. See FlowrGasConfig, ReadOnlyFlowrAnalyzerGasContext.
Optional ReadonlyignoreLoadCalls?: ...Optional ReadonlyignoreSourceCalls?: ...Optional Readonlyincremental?: ...Optional Readonlyinherit?: ...Optional ReadonlyinputSources?: ...Teaches the InputSourcesQuery|input-sources analysis further frameworks; entries are added to what flowR knows already. Usually set per ProjectKind via specializeConfig. See InputClassifierConfig.
Optional Readonlylinter?: ...Optional ReadonlylogLevel?: ...Optional Readonlyproject?: ...Optional Readonlyrepl?: ...Optional Readonlysemantics?: ...Optional Readonlysolver?: ...Optional ReadonlyspecializeConfig?: ...Overwrite (parts of) this configuration per ProjectKind; an entry may inherit another kind's
overwrite first (own keys win). Resolve with FlowrConfig.forKind.
Optionalunknown?: {Optional ReadonlyabstractInterpretation?: ...Optional ReadonlydefaultEngine?: ...The default engine to use. If undefined, an arbitrary one from engines is used.
Optional ReadonlydefaultPlugins?: ...Optional Readonlyengines?: ...Engines to use for interacting with R code (TreeSitterEngineConfig, RShellEngineConfig); empty means all available engines.
Optional Readonlygas?: ...Resource-usage guard (gas) configuration; disabled by default (every feature factor 0), enable by setting a
feature's factor > 0. See FlowrGasConfig, ReadOnlyFlowrAnalyzerGasContext.
Optional ReadonlyignoreLoadCalls?: ...Optional ReadonlyignoreSourceCalls?: ...Optional Readonlyincremental?: ...Optional Readonlyinherit?: ...Optional ReadonlyinputSources?: ...Teaches the InputSourcesQuery|input-sources analysis further frameworks; entries are added to what flowR knows already. Usually set per ProjectKind via specializeConfig. See InputClassifierConfig.
Optional Readonlylinter?: ...Optional ReadonlylogLevel?: ...Optional Readonlyproject?: ...Optional Readonlyrepl?: ...Optional Readonlysemantics?: ...Optional Readonlysolver?: ...Optional ReadonlyspecializeConfig?: ...Overwrite (parts of) this configuration per ProjectKind; an entry may inherit another kind's
overwrite first (own keys win). Resolve with FlowrConfig.forKind.
Extends the ReadonlyFlowrAnalysisProvider with methods that allow modifying the analyzer state.