Interface AstMap<Name, Key, Value>

Stores a mapping between different Ast objects

const map = new Map<Arith, Bool>();
const x = Int.const('x')
const y = Int.const('y')
map.set(x, Bool.val(true))
map.Set(y, Bool.val(false))

map.size
// 2
map.has(x)
// true
[...map.entries()]
// [[x, true], [y, false]]
map.clear()
map.size
// 0
interface AstMap<
    Name extends string = "main",
    Key extends Ast<Name> = AnyAst<Name>,
    Value extends Ast<Name> = AnyAst<Name>,
> {
    ctx: Context<Name>;
    ptr: Z3_ast_map;
    get size(): number;
    "[iterator]"(): Iterator<[Key, Value], any, any>;
    clear(): void;
    delete(key: Key): void;
    entries(): IterableIterator<[Key, Value], any, any>;
    get(key: Key): undefined | Value;
    has(key: Key): boolean;
    keys(): AstVector<Name, Key>;
    set(key: Key, value: Value): void;
    sexpr(): string;
    values(): IterableIterator<Value, any, any>;
}

Type Parameters

Hierarchy

Properties

ptr: Z3_ast_map

Accessors

Methods

  • Returns Iterator<[Key, Value], any, any>