UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

42 lines (41 loc) 2.16 kB
import { AbstractDomain, type AnyAbstractDomain, type ConcreteDomain } from './abstract-domain'; import { Top } from './lattice'; /** The type of the concrete mapping of the concrete domain of a mapped abstract domain mapping keys to a concrete value in the concrete domain */ export type ConcreteMap<Key, Domain extends AnyAbstractDomain> = ReadonlyMap<Key, ConcreteDomain<Domain>>; /** * A mapped abstract domain as mapping of keys to abstract values of an abstract domain. * The Bottom element is defined as empty mapping and the Top element is defined as mapping every existing key to Top. * @template Key - Type of the keys of the mapping to abstract values * @template Domain - Type of the abstract domain to map the keys to */ export declare class MappedAbstractDomain<Key, Domain extends AnyAbstractDomain> extends AbstractDomain<ConcreteMap<Key, Domain>, ReadonlyMap<Key, Domain>, ReadonlyMap<Key, Domain>, ReadonlyMap<Key, Domain>> { constructor(value: ReadonlyMap<Key, Domain>); create(value: ReadonlyMap<Key, Domain>): this; get(key: Key): Domain | undefined; has(key: Key): boolean; protected set(key: Key, value: Domain): void; protected remove(key: Key): void; bottom(): this; top(): this; equals(other: this): boolean; leq(other: this): boolean; join(other: this): this; meet(other: this): this; widen(other: this): this; narrow(other: this): this; concretize(limit: number): ReadonlySet<ConcreteMap<Key, Domain>> | typeof Top; abstract(concrete: ReadonlySet<ConcreteMap<Key, Domain>> | typeof Top): this; toJson(): unknown; toString(): string; isTop(): this is this; isBottom(): this is this; isValue(): this is this; } /** * A mutable version of the {@link MappedAbstractDomain} with {@link MutableMappedAbstractDomain#set|`set`} and {@link MutableMappedAbstractDomain#remove|`remove`}. */ export declare class MutableMappedAbstractDomain<Key, Domain extends AnyAbstractDomain> extends MappedAbstractDomain<Key, Domain> { create(value: ReadonlyMap<Key, Domain>): this; set(key: Key, value: Domain): void; remove(key: Key): void; }