Skip to content

Commit

Permalink
Support BitVectors in the TypeScript Optimize API (#7480)
Browse files Browse the repository at this point in the history
This is just a change in type declarations to allow calling minimize/maximize with BitVectors.
  • Loading branch information
dmitri-gb authored Dec 30, 2024
1 parent 19c95f8 commit f99e1ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/js/src/high-level/high-level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1524,11 +1524,11 @@ export function createApi(Z3: Z3Core): Z3HighLevel {
return new AstVectorImpl(check(Z3.optimize_get_assertions(contextPtr, this.ptr)));
}

maximize(expr: Arith<Name>) {
maximize(expr: Arith<Name> | BitVec<number, Name>) {
check(Z3.optimize_maximize(contextPtr, this.ptr, expr.ast));
}

minimize(expr: Arith<Name>) {
minimize(expr: Arith<Name> | BitVec<number, Name>) {
check(Z3.optimize_minimize(contextPtr, this.ptr, expr.ast));
}

Expand Down

0 comments on commit f99e1ee

Please sign in to comment.