@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
20 lines (19 loc) • 1.46 kB
TypeScript
import type { DataflowGraph } from '../../../dataflow/graph/graph';
import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
import type { RNode } from '../../../r-bridge/lang-4.x/ast/model/model';
import type { RAccess, RNamedAccess } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-access';
import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
import type { DataFrameOperations, DataFrameShapeInferenceVisitor } from '../shape-inference';
/**
* Maps a concrete data frame access operation to abstract data frame operations.
* @param node - The R node of the access
* @param inference - The data frame shape inference visitor
* @param dfg - The data flow graph for resolving the arguments
* @param ctx - The current flowR analyzer context
* @returns The mapped abstract data frame operations for the access operation, or `undefined` if the node does not represent a data frame access operation
*/
export declare function mapDataFrameAccess(node: RNode<ParentInformation>, inference: DataFrameShapeInferenceVisitor, dfg: DataflowGraph, ctx: ReadOnlyFlowrAnalyzerContext): DataFrameOperations;
/**
* Checks whether an access node represents a string-based access (`$` or `@`), and no index-based access (`[` or `[[`).
*/
export declare function isStringBasedAccess(access: RAccess<ParentInformation>): access is RNamedAccess<ParentInformation>;