mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
fixing interface and test'
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
103cd248f1
commit
c7eda4e687
|
@ -110,7 +110,7 @@ describe('high-level', () => {
|
|||
});
|
||||
|
||||
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();
|
||||
solver.fromString("(declare-const x Int) (assert (and (< x 2) (> x 0)))")
|
||||
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;
|
||||
addAndTrack(expr: Bool<Name>, constant: Bool<Name> | string): void;
|
||||
assertions(): AstVector<Name, Bool<Name>>;
|
||||
from_string(s : string): void;
|
||||
check(...exprs: (Bool<Name> | AstVector<Name, Bool<Name>>)[]): Promise<CheckSatResult>;
|
||||
model(): Model<Name>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue