@eagleoutice/flowr-dev
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
17 lines (16 loc) • 1.19 kB
TypeScript
import type { DependencyInfo } from './dependencies-query-format';
import type { NormalizedAst } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
import type { DataflowInformation } from '../../../dataflow/info';
/**
* Names the file each visualization lands in, and the statements that build it.
*
* A device opener (`pdf("a.pdf")`) takes every plot until the device is closed (`dev.off()`), so those plots
* end up in its file instead of on screen; a plot outside any open device keeps the value it had. Every plot
* that lands in a file also reports the statements it takes to produce that file in
* {@link DependencyInfo#parts}: the addons drawn onto it, plus the device opener and closer around it.
* Closing a device ends the plot, so an addon after it builds whatever device is open then, not this file.
*
* Openers are the `write` entries that draw ({@link CallProp.Graphics}), closers the calls that end a device
* ({@link CallProp.Closes}), and the order is the one the source states.
*/
export declare function linkPlotsToDevices(written: readonly DependencyInfo[], plots: DependencyInfo[], dataflow: DataflowInformation, ast: NormalizedAst): void;