UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

25 lines (24 loc) 1.16 kB
import type { NodeToSlice, SliceResult } from './slicer-types'; import type { REnvironmentInformation } from '../../dataflow/environments/environment'; import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id'; export declare class VisitingQueue { private readonly threshold; private timesHitThreshold; private readonly seen; private readonly idThreshold; private readonly queue; potentialAdditions: Map<NodeId, [NodeId, NodeToSlice]>; constructor(threshold: number); /** * Adds a node to the queue if it has not been seen before. * @param target - the node to add * @param env - the environment the node is traversed in * @param envFingerprint - the fingerprint of the environment * @param onlyForSideEffects - whether the node is only used for its side effects */ add(target: NodeId, env: REnvironmentInformation, envFingerprint: string, onlyForSideEffects: boolean): void; next(): NodeToSlice; nonEmpty(): boolean; hasId(id: NodeId): boolean; status(): Readonly<Pick<SliceResult, 'timesHitThreshold' | 'result'>>; }