@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
28 lines (27 loc) • 1.1 kB
TypeScript
import type { RNodeWithParent } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
import type { Lift, Value, ValueSet } from './r-value';
import { Bottom, Top } from './r-value';
/**
* Takes n potentially lifted ops and returns `Top` or `Bottom` if any is `Top` or `Bottom`.
*/
export declare function bottomTopGuard(...a: Lift<unknown>[]): typeof Top | typeof Bottom | undefined;
/**
* Returns a value set, if a is not bottom or top, otherwise undefined.
* Useful when working with values returned by {@link resolveIdToValue}
*
* @param a - value set to check
* @returns value set if a is not top or bottom
*/
export declare function valueSetGuard(a: Lift<ValueSet<Value[]>>): ValueSet<Value[]> | undefined;
/**
* Constructs an Abstract Value from a normal TS value
* @param a - ts value
* @returns abstract value
*/
export declare function valueFromTsValue(a: unknown): Value;
/**
* Converts a constant from an RNode into an abstract value
* @param a - RNode constant
* @returns abstract value
*/
export declare function valueFromRNodeConstant(a: RNodeWithParent): Value;