Class FlowrAnalyzerBuilder Constructorsconstructor Parameters withDefaultPlugins : boolean = true Methodsamend Config amendConfig ( func : ( config : { abstractInterpretation : { dataFrame : { maxColNames : number ; readLoadedData : { maxReadLines : number ; readExternalFiles : boolean } ; } ; wideningThreshold : number ; } ; defaultEngine ?: "r-shell" | "tree-sitter" ; engines : (
| { rPath ?: string ; type : "r-shell" ; [ key : string ]: unknown } | { lax ?: boolean ; treeSitterWasmPath ?: string ; type : "tree-sitter" ; wasmPath ?: string ; [ key : string ]: unknown ; } )
[] ; ignoreSourceCalls : boolean ; project : { resolveUnknownPathsOnDisk : boolean } ; repl : { dfProcessorHeat : boolean ; quickStats : boolean } ; semantics : { environment : { overwriteBuiltIns : { definitions : (
| { assumePrimitive ?: boolean ; names : Identifier [] ; type : "constant" ; value : unknown ; } | { assumePrimitive ?: boolean ; config : { readIndices : boolean } ; names : Identifier [] ; suffixes : (
"<-" | "<<-" )
[] ; type : "replacement" ; } | { assumePrimitive ?: boolean ; config ?: | { forceFollow ?: (...)
| (...)
| (...)
; includeFunctionCall ?: (...)
| (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; } | { forceArgs ?: (...)
| (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; treatIndicesAsString : boolean ; } | { indexOfFunction ?: (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; nameOfFunctionArgument ?: (...)
| (...)
; resolveInEnvironment ?: (...)
| (...)
| (...)
; resolveValue ?: (...)
| (...)
| (...)
; unquoteFunction ?: (...)
| (...)
| (...)
; [ key : string ]: unknown ; } | { canBeReplacement ?: (...)
| (...)
| (...)
; forceArgs ?: (...)
| (...)
| (...)
; indicesCollection ?: (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; makeMaybe ?: (...)
| (...)
| (...)
; mayHaveMoreArgs ?: (...)
| (...)
| (...)
; quoteSource ?: (...)
| (...)
| (...)
; superAssignment ?: (...)
| (...)
| (...)
; swapSourceAndTarget ?: (...)
| (...)
| (...)
; targetVariable ?: (...)
| (...)
| (...)
; } | { canBeReplacement ?: (...)
| (...)
| (...)
; forceArgs ?: (...)
| (...)
| (...)
; indicesCollection ?: (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; makeMaybe ?: (...)
| (...)
| (...)
; mayHaveMoreArgs ?: (...)
| (...)
| (...)
; quoteSource ?: (...)
| (...)
| (...)
; source : { idx ?: ...
; name : ...
} ; superAssignment ?: (...)
| (...)
| (...)
; swapSourceAndTarget ?: (...)
| (...)
| (...)
; target : { idx ?: ...
; name : ...
} ; targetVariable ?: (...)
| (...)
| (...)
; } | { cfg ?: (...)
| (...)
; forceArgs ?: (...)
| (...)
| (...)
; hasUnknownSideEffects ?: (...)
| (...)
| (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; readAllArguments ?: (...)
| (...)
| (...)
; returnsNthArgument ?: (...)
| (...)
| (...)
; treatAsFnCall ?: (...)
| (...)
; useAsProcessor ?: (...)
| (...)
; } | { includeFunctionCall ?: (...)
| (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; } | { args ?: (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
} | { args : { env : ...
; expr : ...
} ; libFn ?: (...)
| (...)
| (...)
} | { forceArgs ?: (...)
| (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; quoteArgumentsWithIndex ?: (...)
| (...)
; } | { args : { add ?: ...
; after ?: ...
; expr : ...
} ; hook : OnFnExit ; libFn ?: (...)
| (...)
| (...)
; } | { activeIndices ?: (...)
| (...)
; assignmentOperator ?: (...)
| (...)
| (...)
; assignRootId ?: (...)
| (...)
; forceArgs ?: (...)
| (...)
| (...)
; libFn ?: (...)
| (...)
| (...)
; makeMaybe ?: (...)
| (...)
| (...)
; readIndices ?: (...)
| (...)
| (...)
; } | { args : { generic : ...
; object : ...
} ; libFn ?: (...)
| (...)
| (...)
; } | { evalRhsWhen : boolean ; forceArgs ?: (...)
| (...)
| (...)
; lazy : boolean ; libFn ?: (...)
| (...)
| (...)
; } | { block : string ; handlers : { error ?: ...
; finally ?: ...
} ; libFn ?: (...)
| (...)
| (...)
; } ; evalHandler ?: string ; names : Identifier [] ; processor : | Access | Apply | Assignment | AssignmentLike | Default | Eval | ExpressionList | ForLoop | FunctionDefinition | Get | IfThenElse | Library | List | Local | Pipe | Quote | RegisterHook | RepeatLoop | Replacement | Rm | S3Dispatch | Source | SpecialBinOp | StopIfNot | Try | Vector | WhileLoop ; type : "function" ; } )
[] ; loadDefaults ?: boolean ; } ; } ; } ; solver : { evalStrings : boolean ; instrument : { dataflowExtractors ?: ( extractor : DataflowProcessors < ParentInformation > , ctx : FlowrAnalyzerContext , ) => DataflowProcessors < ParentInformation > ; } ; pointerTracking : boolean | { maxIndexCount : number } ; resolveSource ?: { applyReplacements ?: { [ key : string ]: string } [] ; dropPaths : DropPathsOption ; ignoreCapitalization : boolean ; inferWorkingDirectory : InferWorkingDirectory ; repeatedSourceLimit ?: number ; searchPath : string [] ; [ key : string ]: unknown ; } ; slicer ?: { threshold ?: number } ; variables : VariableResolve ; } ; [ key : string ]: unknown ; } , ) => void | FlowrConfigOptions , ) : this Parameters func : ( config : { abstractInterpretation : { dataFrame : { maxColNames : number ; readLoadedData : { maxReadLines : number ; readExternalFiles : boolean } ; } ; wideningThreshold : number ; } ; defaultEngine ?: "r-shell" | "tree-sitter" ; engines : ( | { rPath ?: string ; type : "r-shell" ; [ key : string ]: unknown } | { lax ?: boolean ; treeSitterWasmPath ?: string ; type : "tree-sitter" ; wasmPath ?: string ; [ key : string ]: unknown ; } )[] ; ignoreSourceCalls : boolean ; project : { resolveUnknownPathsOnDisk : boolean } ; repl : { dfProcessorHeat : boolean ; quickStats : boolean } ; semantics : { environment : { overwriteBuiltIns : { definitions : ( | { assumePrimitive ?: boolean ; names : Identifier [] ; type : "constant" ; value : unknown ; } | { assumePrimitive ?: boolean ; config : { readIndices : boolean } ; names : Identifier [] ; suffixes : ("<-" | "<<-" )[] ; type : "replacement" ; } | { assumePrimitive ?: boolean ; config ?: | { forceFollow ?: (...) | (...) | (...); includeFunctionCall ?: (...) | (...) | (...); libFn ?: (...) | (...) | (...); } | { forceArgs ?: (...) | (...) | (...); libFn ?: (...) | (...) | (...); treatIndicesAsString : boolean ; } | { indexOfFunction ?: (...) | (...); libFn ?: (...) | (...) | (...); nameOfFunctionArgument ?: (...) | (...); resolveInEnvironment ?: (...) | (...) | (...); resolveValue ?: (...) | (...) | (...); unquoteFunction ?: (...) | (...) | (...); [ key : string ]: unknown ; } | { canBeReplacement ?: (...) | (...) | (...); forceArgs ?: (...) | (...) | (...); indicesCollection ?: (...) | (...); libFn ?: (...) | (...) | (...); makeMaybe ?: (...) | (...) | (...); mayHaveMoreArgs ?: (...) | (...) | (...); quoteSource ?: (...) | (...) | (...); superAssignment ?: (...) | (...) | (...); swapSourceAndTarget ?: (...) | (...) | (...); targetVariable ?: (...) | (...) | (...); } | { canBeReplacement ?: (...) | (...) | (...); forceArgs ?: (...) | (...) | (...); indicesCollection ?: (...) | (...); libFn ?: (...) | (...) | (...); makeMaybe ?: (...) | (...) | (...); mayHaveMoreArgs ?: (...) | (...) | (...); quoteSource ?: (...) | (...) | (...); source : { idx ?: ...; name : ... } ; superAssignment ?: (...) | (...) | (...); swapSourceAndTarget ?: (...) | (...) | (...); target : { idx ?: ...; name : ... } ; targetVariable ?: (...) | (...) | (...); } | { cfg ?: (...) | (...); forceArgs ?: (...) | (...) | (...); hasUnknownSideEffects ?: (...) | (...) | (...) | (...); libFn ?: (...) | (...) | (...); readAllArguments ?: (...) | (...) | (...); returnsNthArgument ?: (...) | (...) | (...); treatAsFnCall ?: (...) | (...); useAsProcessor ?: (...) | (...); } | { includeFunctionCall ?: (...) | (...) | (...); libFn ?: (...) | (...) | (...); } | { args ?: (...) | (...); libFn ?: (...) | (...) | (...) } | { args : { env : ...; expr : ... } ; libFn ?: (...) | (...) | (...) } | { forceArgs ?: (...) | (...) | (...); libFn ?: (...) | (...) | (...); quoteArgumentsWithIndex ?: (...) | (...); } | { args : { add ?: ...; after ?: ...; expr : ... } ; hook : OnFnExit ; libFn ?: (...) | (...) | (...); } | { activeIndices ?: (...) | (...); assignmentOperator ?: (...) | (...) | (...); assignRootId ?: (...) | (...); forceArgs ?: (...) | (...) | (...); libFn ?: (...) | (...) | (...); makeMaybe ?: (...) | (...) | (...); readIndices ?: (...) | (...) | (...); } | { args : { generic : ...; object : ... } ; libFn ?: (...) | (...) | (...); } | { evalRhsWhen : boolean ; forceArgs ?: (...) | (...) | (...); lazy : boolean ; libFn ?: (...) | (...) | (...); } | { block : string ; handlers : { error ?: ...; finally ?: ... } ; libFn ?: (...) | (...) | (...); } ; evalHandler ?: string ; names : Identifier [] ; processor : | Access | Apply | Assignment | AssignmentLike | Default | Eval | ExpressionList | ForLoop | FunctionDefinition | Get | IfThenElse | Library | List | Local | Pipe | Quote | RegisterHook | RepeatLoop | Replacement | Rm | S3Dispatch | Source | SpecialBinOp | StopIfNot | Try | Vector | WhileLoop ; type : "function" ; } )[] ; loadDefaults ?: boolean ; } ; } ; } ; solver : { evalStrings : boolean ; instrument : { dataflowExtractors ?: ( extractor : DataflowProcessors < ParentInformation > , ctx : FlowrAnalyzerContext , ) => DataflowProcessors < ParentInformation > ; } ; pointerTracking : boolean | { maxIndexCount : number } ; resolveSource ?: { applyReplacements ?: { [ key : string ]: string } [] ; dropPaths : DropPathsOption ; ignoreCapitalization : boolean ; inferWorkingDirectory : InferWorkingDirectory ; repeatedSourceLimit ?: number ; searchPath : string [] ; [ key : string ]: unknown ; } ; slicer ?: { threshold ?: number } ; variables : VariableResolve ; } ; [ key : string ]: unknown ; } , ) => void | FlowrConfigOptions Returns this set Engine setEngine ( engine : "r-shell" | "tree-sitter" ) : this Parameters engine : "r-shell" | "tree-sitter" Returns this unregister Plugins unregisterPlugins ( ... plugin : readonly (
string | FlowrAnalyzerPlugin < unknown , unknown > )
[] , ) : this
Builder for the FlowrAnalyzer, use it to configure all analysis aspects before creating the analyzer instance with
.build()or.buildSync().You can add new files and folders to analyze using the
.addRequest()method on the resulting analyzer.Example: Let's create an analyzer for a single R script file:
If you now want to get the dataflow information for the file, you can do this:
See
https://github.com/flowr-analysis/flowr/wiki/Analyzer