Add missing array API functions and fix BitVec method typos #8132
+62
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implementation Plan for Missing API Functions
Based on GitHub discussion #8131, implementing high-priority missing API functions:
1. C++ API (z3++.h)
array_default()standalone function for accessing array default valuesarray_ext()standalone function for array extensionality witness2. TypeScript API (types.ts and high-level.ts)
subNoUndeflowtosubNoUnderflowin BitVec interfacemulNoUndeflowtomulNoUnderflowin BitVec interfacedefault()method to SMTArray interface for accessing array default valuesExt()function to Context for array extensionalityExt()function in Context implementation3. Testing
Summary of Changes
C++ API (
src/api/c++/z3++.h):array_default(expr const & a)functionarray_ext(expr const & a, expr const & b)functionTypeScript API (
src/api/js/src/high-level/types.tsandhigh-level.ts):subNoUndeflow→subNoUnderflowmulNoUndeflow→mulNoUnderflowdefault()method to SMTArray interface with JSDocExt()function to Context interface and implementation with JSDocdefault()method to both ArrayImpl and LambdaImpl classesAll changes follow existing patterns in the codebase and maintain API consistency across languages (Python, Java, C#, C++, TypeScript).
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.