-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add Z3_mk_polymorphic_datatypes API for mutually recursive polymorphic datatypes #8389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…c datatypes Co-authored-by: NikolajBjorner <[email protected]>
Co-authored-by: NikolajBjorner <[email protected]>
|
@copilot fix the build |
…rray class Co-authored-by: NikolajBjorner <[email protected]>
Fixed in commit 18ece37. The issue was in the C++ binding where |
|
@copilot - fix build |
… definitions Co-authored-by: NikolajBjorner <[email protected]>
Fixed in commit 3177557. The build was failing due to multiple |
✅ Complete: Expose API for Polymorphic Recursive Datatypes
Problem Solved
Z3's SMT2 format allows polymorphic datatypes to be defined recursively, but the C API only provided:
Z3_mk_polymorphic_datatype: Single polymorphic datatypeZ3_mk_datatypes: Mutually recursive non-polymorphic datatypesSolution: Added
Z3_mk_polymorphic_datatypesto create mutually recursive polymorphic datatypes.Changes Implemented
✅ Core API (
src/api/z3_api.h&src/api/api_datatype.cpp)Z3_mk_polymorphic_datatypes✅ C++ Bindings (
src/api/c++/z3++.h)datatypes()method with type parametersstd::unique_ptrfor non-copyablearrayclass✅ Tests (
src/test/parametric_datatype.cpp)Build Fixes
std::unique_ptrfor non-copyable arraysOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.