UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

41 lines (40 loc) 2.73 kB
import { Ternary } from '../../util/logic'; import { AbstractDomain } from './abstract-domain'; import { Bottom, Top } from './lattice'; import type { ValueDomain } from './value-abstract-domain'; /** The type of the actual values of the singleton domain as single value */ type SingletonValue<T> = T; /** The type of the Top element of the singleton domain as {@link Top} symbol */ type SingletonTop = typeof Top; /** The type of the Bottom element of the singleton domain as {@link Bottom} symbol */ type SingletonBottom = typeof Bottom; /** The type of the abstract values of the singleton domain that are Top, Bottom, or actual values */ type SingletonLift<T> = SingletonValue<T> | SingletonTop | SingletonBottom; /** * The singleton abstract domain as a single possible value. * The Bottom element is defined as {@link Bottom} symbol and the Top element is defined as {@link Top} symbol. * @template T - Type of the value in the abstract domain * @template Value - Type of the constraint in the abstract domain (Top, Bottom, or an actual value) */ export declare class SingletonDomain<T, Value extends SingletonLift<T> = SingletonLift<T>> extends AbstractDomain<SingletonValue<T>, SingletonTop, SingletonBottom, Value> implements ValueDomain<T> { create(value: SingletonLift<T>): this; from(...values: T[]): this; static top<T>(): SingletonDomain<T, SingletonTop>; static bottom<T>(): SingletonDomain<T, SingletonBottom>; static from<T>(...values: T[]): SingletonDomain<T>; top(): this & SingletonDomain<T, SingletonTop>; bottom(): this & SingletonDomain<T, SingletonBottom>; protected equalsValue(this: SingletonDomain<T, SingletonValue<T>>, other: SingletonDomain<T, SingletonValue<T>>): boolean; protected leqValue(this: SingletonDomain<T, SingletonValue<T>>, other: SingletonDomain<T, SingletonValue<T>>): boolean; protected joinValue(this: this & SingletonDomain<T, SingletonValue<T>>, other: this & SingletonDomain<T, SingletonValue<T>>): this; protected meetValue(this: this & SingletonDomain<T, SingletonValue<T>>, other: this & SingletonDomain<T, SingletonValue<T>>): this; protected widenValue(this: this & SingletonDomain<T, SingletonValue<T>>, other: this & SingletonDomain<T, SingletonValue<T>>): this; protected narrowValue(this: this & SingletonDomain<T, SingletonValue<T>>, other: this & SingletonDomain<T, SingletonValue<T>>): this; satisfies(value: T): Ternary; protected jsonify(): unknown; protected stringify(): string; isTop(): this is this & SingletonDomain<T, SingletonTop>; isBottom(): this is this & SingletonDomain<T, SingletonBottom>; isValue(): this is this & SingletonDomain<T, SingletonValue<T>>; } export {};