@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
18 lines (17 loc) • 1.05 kB
TypeScript
import type { DataflowGraph } from '../dataflow/graph/graph';
import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
import type { ControlFlowInformation } from './control-flow-graph';
import type { ReadOnlyFlowrAnalyzerContext } from '../project/context/flowr-analyzer-context';
import { BuiltInProcName } from '../dataflow/environments/built-in-proc-name';
export declare const loopyFunctions: Set<BuiltInProcName>;
/**
* Checks whether a loop only loops once
* @param loop - nodeid of the loop to analyse
* @param dataflow - dataflow graph
* @param controlflow - control flow graph
* @param ast - normalized ast
* @param ctx - current flowr analyzer context
* @returns true if the given loop only iterates once
*/
export declare function onlyLoopsOnce(loop: NodeId, dataflow: DataflowGraph, controlflow: ControlFlowInformation, ast: NormalizedAst, ctx: ReadOnlyFlowrAnalyzerContext): boolean | undefined;