Skip to content

Commit

Permalink
fixing interface and test'
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Aug 18, 2022
1 parent 103cd24 commit c7eda4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/js/src/high-level/high-level.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions src/api/js/src/high-level/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
}
Expand Down

0 comments on commit c7eda4e

Please sign in to comment.