UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

24 lines (23 loc) 1.86 kB
import type { SliceResult } from './slicer-types'; import type { Fingerprint } from './fingerprint'; import { VisitingQueue } from './visiting-queue'; import type { NormalizedAst } from '../../r-bridge/lang-4.x/ast/model/processing/decorate'; import type { SlicingCriteria } from '../criterion/parse'; import type { REnvironmentInformation } from '../../dataflow/environments/environment'; import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id'; import { SliceDirection } from '../../core/steps/all/static-slicing/00-slice'; import type { DataflowInformation } from '../../dataflow/info'; export declare const slicerLogger: import("tslog").Logger<import("tslog").ILogObj>; /** * This returns the ids to include in the static slice of the given type, when slicing with the given seed id's (must be at least one). * <p> * The returned ids can be used to {@link reconstructToCode|reconstruct the slice to R code}. * * @param info - The dataflow information used for slicing. * @param criteria - The criteria to slice on. * @param direction - The direction to slice in. * @param threshold - The maximum number of nodes to visit in the graph. If the threshold is reached, the slice will side with inclusion and drop its minimal guarantee. The limit ensures that the algorithm halts. * @param cache - A cache to store the results of the slice. If provided, the slice may use this cache to speed up the slicing process. */ export declare function staticSlice(info: DataflowInformation, { idMap }: NormalizedAst, criteria: SlicingCriteria, direction: SliceDirection, threshold?: number, cache?: Map<Fingerprint, Set<NodeId>>): Readonly<SliceResult>; export declare function updatePotentialAddition(queue: VisitingQueue, id: NodeId, target: NodeId, baseEnvironment: REnvironmentInformation, envFingerprint: string): void;