@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
33 lines (32 loc) • 2.02 kB
TypeScript
import { IntervalDomain } from './interval-domain';
import { Bottom, Top } from './lattice';
/** The type of the actual values of the positive interval domain as tuple of the lower and upper bound */
export type PosIntervalValue = readonly [number, number];
/** The type of the Top element of the positive interval domain as interval [0, +∞] from 0 to +∞ */
export type PosIntervalTop = readonly [0, typeof Infinity];
/** The type of the Bottom element of the positive interval domain as {@link Bottom} symbol */
export type PosIntervalBottom = typeof Bottom;
/** The type of the abstract values of the positive interval domain that are Top, Bottom, or actual values */
export type PosIntervalLift = PosIntervalValue | PosIntervalTop | PosIntervalBottom;
/**
* The positive interval abstract domain as positive intervals with possibly zero lower bounds and infinite upper bounds representing possible numeric values.
* The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as the interval [0, +∞].
* @template Value - Type of the constraint in the abstract domain (Top, Bottom, or an actual value)
*/
export declare class PosIntervalDomain<Value extends PosIntervalLift = PosIntervalLift> extends IntervalDomain<Value> {
constructor(value: Value);
static top(): PosIntervalDomain<PosIntervalTop>;
static bottom(): PosIntervalDomain<PosIntervalBottom>;
static abstract(concrete: ReadonlySet<number> | typeof Top): PosIntervalDomain;
top(): PosIntervalDomain<PosIntervalTop>;
bottom(): PosIntervalDomain<PosIntervalBottom>;
widen(other: PosIntervalDomain): PosIntervalDomain;
narrow(other: PosIntervalDomain): PosIntervalDomain;
abstract(concrete: ReadonlySet<number> | typeof Top): PosIntervalDomain;
subtract(other: PosIntervalDomain): PosIntervalDomain;
/**
* Extends the lower bound of the current abstract value down to 0.
*/
extendDown(): PosIntervalDomain;
isTop(): this is PosIntervalDomain<PosIntervalTop>;
}