@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
22 lines (21 loc) • 1.6 kB
TypeScript
import type { IdentifierReference } from './identifier';
import type { DataflowGraph } from '../graph/graph';
import type { ControlDependency } from '../info';
import type { REnvironmentInformation } from './environment';
/**
* Marks the reference as maybe (i.e., as controlled by a set of {@link IdentifierReference#cds|control dependencies}).
*/
export declare function makeReferenceMaybe(ref: IdentifierReference, graph: DataflowGraph, environments: REnvironmentInformation, includeDefs: boolean, defaultCd?: ControlDependency[] | undefined): IdentifierReference;
/**
* Marks all references as maybe (i.e., as controlled by a set of {@link IdentifierReference#cds|control dependencies}).
* @see {@link makeReferenceMaybe}
*/
export declare function makeAllMaybe(references: readonly IdentifierReference[] | undefined, graph: DataflowGraph, environments: REnvironmentInformation, includeDefs: boolean, applyCds?: ControlDependency[] | undefined): IdentifierReference[];
/**
* apply the given cds to all elements in the graph and also transform the given references similar to {@link makeAllMaybe}.
*/
export declare function applyCdsToAllInGraphButConstants(graph: DataflowGraph, references: readonly IdentifierReference[], cds: readonly ControlDependency[]): void;
/**
* apply the given cds to all given references, but not to the graph. This is useful if we want to mark the references as maybe without marking all other nodes in the graph as maybe.
*/
export declare function applyCdToReferences(references: readonly IdentifierReference[], cds: readonly ControlDependency[]): void;