@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
27 lines (26 loc) • 1.57 kB
TypeScript
import { type ControlFlowInformation } from './control-flow-graph';
/**
* The collection of properties that can be checked on a control flow graph.
*/
declare const CfgProperties: {
readonly 'single-entry-and-exit': typeof checkSingleEntryAndExit;
readonly 'has-entry-and-exit': typeof hasEntryAndExit;
readonly 'entry-reaches-all': typeof checkEntryReachesAll;
readonly 'exit-reaches-all': typeof checkExitIsReachedByAll;
readonly 'no-direct-fd-cycles': (c: ControlFlowInformation<import("./control-flow-graph").CfgSimpleVertex>) => boolean;
readonly 'no-direct-cd-cycles': (c: ControlFlowInformation<import("./control-flow-graph").CfgSimpleVertex>) => boolean;
};
export type CfgProperty = keyof typeof CfgProperties;
declare function checkSingleEntryAndExit(cfg: ControlFlowInformation): boolean;
declare function hasEntryAndExit(cfg: ControlFlowInformation): boolean;
declare function checkExitIsReachedByAll(cfg: ControlFlowInformation): boolean;
declare function checkEntryReachesAll(cfg: ControlFlowInformation): boolean;
/** either returns true or the name of the property that is not satisfied */
export type PropertyReport = true | CfgProperty;
/**
* Check if the given CFG satisfies all properties.
* @param cfg - The control flow graph to check.
* @param excludeProperties - If provided, exclude the given properties, otherwise this checks all properties.
*/
export declare function assertCfgSatisfiesProperties(cfg: ControlFlowInformation, excludeProperties?: readonly CfgProperty[]): PropertyReport;
export {};