UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

37 lines (36 loc) 2.08 kB
import { IntervalDomain } from './interval-domain'; import { Bottom, Top } from './lattice'; /** The Top element of the positive interval domain as interval [0, +∞] */ export declare const PosIntervalTop: PosIntervalValue; /** The type of the actual values of the positive interval domain as tuple of the lower and upper bound */ type PosIntervalValue = readonly [lower: number, upper: number]; /** The type of the Top element of the positive interval domain as interval [0, +∞] */ type PosIntervalTop = typeof PosIntervalTop; /** The type of the Bottom element of the positive interval domain as {@link Bottom} symbol */ type PosIntervalBottom = typeof Bottom; /** The type of the abstract values of the positive interval domain that are Top, Bottom, or actual values */ type PosIntervalLift = PosIntervalValue | 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); create(value: PosIntervalLift): this; static top(): PosIntervalDomain<PosIntervalTop>; static bottom(): PosIntervalDomain<PosIntervalBottom>; static abstract(concrete: ReadonlySet<number> | typeof Top): PosIntervalDomain; top(): this & PosIntervalDomain<PosIntervalTop>; bottom(): this & PosIntervalDomain<PosIntervalBottom>; widen(other: this): this; narrow(other: this): this; abstract(concrete: ReadonlySet<number> | typeof Top): this; subtract(other: this | PosIntervalLift): this; /** * Extends the lower bound of the current abstract value down to 0. */ widenDown(): this; isTop(): this is PosIntervalDomain<PosIntervalTop>; } export {};