UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

21 lines (20 loc) 1.33 kB
import type { DataflowInformation } from './info'; import { type DataflowProcessors } from './processor'; import type { NormalizedAst, ParentInformation } from '../r-bridge/lang-4.x/ast/model/processing/decorate'; import type { KnownParserType, Parser } from '../r-bridge/parser'; import type { ControlFlowInformation } from '../control-flow/control-flow-graph'; import type { FlowrAnalyzerContext } from '../project/context/flowr-analyzer-context'; /** * The best friend of {@link produceDataFlowGraph} and {@link processDataflowFor}. * Maps every {@link RType} in the normalized AST to a processor. */ export declare const processors: DataflowProcessors<ParentInformation>; /** * This is the main function to produce the dataflow graph from a given request and normalized AST. * Note, that this requires knowledge of the active parser in case the dataflow analysis uncovers other files that have to be parsed and integrated into the analysis * (e.g., in the event of a `source` call). * For the actual, canonical fold entry point, see {@link processDataflowFor}. */ export declare function produceDataFlowGraph<OtherInfo>(parser: Parser<KnownParserType>, completeAst: NormalizedAst<OtherInfo & ParentInformation>, ctx: FlowrAnalyzerContext): DataflowInformation & { cfgQuick: ControlFlowInformation | undefined; };