@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
35 lines (34 loc) • 1.79 kB
TypeScript
import type { DataflowGraph, UnknownSideEffect } from '../../dataflow/graph/graph';
import type { DEFAULT_DATAFLOW_PIPELINE } from '../../core/steps/pipeline/default-pipelines';
import type { PipelineOutput } from '../../core/steps/pipeline/pipeline';
import type { KnownParser } from '../../r-bridge/parser';
import type { MermaidMarkdownMark } from '../../util/mermaid/info';
/**
* Visualizes the dataflow graph as a mermaid graph inside a markdown code block.
* Please use this only for documentation purposes, for programmatic usage use {@link graphToMermaid} directly.
*/
export declare function printDfGraph(graph: DataflowGraph, mark?: ReadonlySet<MermaidMarkdownMark>, simplified?: boolean): string;
/**
* Options for {@link printDfGraphForCode}.
*/
export interface PrintDataflowGraphOptions {
readonly mark?: ReadonlySet<MermaidMarkdownMark>;
readonly showCode?: boolean;
readonly codeOpen?: boolean;
readonly exposeResult?: boolean;
readonly switchCodeAndGraph?: boolean;
readonly simplified?: boolean;
readonly callGraph?: boolean;
}
/**
* Visualizes a side effect for documentation purposes.
*/
export declare function formatSideEffect(ef: UnknownSideEffect): string;
export declare function printDfGraphForCode(parser: KnownParser, code: string, options: PrintDataflowGraphOptions & {
exposeResult: true;
}): Promise<[string, PipelineOutput<typeof DEFAULT_DATAFLOW_PIPELINE>]>;
export declare function printDfGraphForCode(parser: KnownParser, code: string, options?: PrintDataflowGraphOptions & {
exposeResult?: false | undefined;
}): Promise<string>;
/** returns resolved expected df graph */
export declare function verifyExpectedSubgraph(parser: KnownParser, code: string, expectedSubgraph: DataflowGraph): Promise<DataflowGraph>;