mirror of
https://github.com/Z3Prover/z3
synced 2025-06-02 04:11:21 +00:00
fixing interface and test'
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
103cd248f1
commit
c7eda4e687
2 changed files with 2 additions and 1 deletions
|
@ -110,7 +110,7 @@ describe('high-level', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('test loading a solver state from a string', async () => {
|
it('test loading a solver state from a string', async () => {
|
||||||
const { Solver } = api.Context('main');
|
const { Solver, Not, Int } = api.Context('main');
|
||||||
const solver = new Solver();
|
const solver = new Solver();
|
||||||
solver.fromString("(declare-const x Int) (assert (and (< x 2) (> x 0)))")
|
solver.fromString("(declare-const x Int) (assert (and (< x 2) (> x 0)))")
|
||||||
expect(await solver.check()).toStrictEqual('sat')
|
expect(await solver.check()).toStrictEqual('sat')
|
||||||
|
|
|
@ -398,6 +398,7 @@ export interface Solver<Name extends string = 'main'> {
|
||||||
add(...exprs: (Bool<Name> | AstVector<Name, Bool<Name>>)[]): void;
|
add(...exprs: (Bool<Name> | AstVector<Name, Bool<Name>>)[]): void;
|
||||||
addAndTrack(expr: Bool<Name>, constant: Bool<Name> | string): void;
|
addAndTrack(expr: Bool<Name>, constant: Bool<Name> | string): void;
|
||||||
assertions(): AstVector<Name, Bool<Name>>;
|
assertions(): AstVector<Name, Bool<Name>>;
|
||||||
|
from_string(s : string): void;
|
||||||
check(...exprs: (Bool<Name> | AstVector<Name, Bool<Name>>)[]): Promise<CheckSatResult>;
|
check(...exprs: (Bool<Name> | AstVector<Name, Bool<Name>>)[]): Promise<CheckSatResult>;
|
||||||
model(): Model<Name>;
|
model(): Model<Name>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue