Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6da167e
draft attempt at optimizing cube tree with resolvents. have not teste…
ilanashapiro Sep 30, 2025
0898813
adding comments
ilanashapiro Oct 1, 2025
279c7d4
fix bug about needing to bubble resolvent upwards to highest ancestor
ilanashapiro Oct 3, 2025
b42db21
fix bug where we need to cover the whole resolvent in the path when b…
ilanashapiro Oct 3, 2025
5143ba0
clean up comments
ilanashapiro Oct 3, 2025
3ce8aca
Bump actions/checkout from 4 to 5 (#7954)
dependabot[bot] Oct 4, 2025
f75d137
close entire tree when sibling resolvent is empty
ilanashapiro Oct 4, 2025
e2432b0
integrate asms directly into cube tree, remove separate tracking
ilanashapiro Oct 5, 2025
21422fa
try to fix bug about redundant resolutions, merging close and try_res…
ilanashapiro Oct 5, 2025
b9fb032
separate the logic again to avoid mutual recursion
ilanashapiro Oct 5, 2025
cd1ceb6
[WIP] Add a mutex to warning.cpp to ensure that warning messages from…
Copilot Oct 6, 2025
542e015
Remove unused variable 'first' in mpz.cpp
NikolajBjorner Oct 6, 2025
aa5645b
fixing the order
levnach Oct 6, 2025
5ae858f
fixing the order
levnach Oct 6, 2025
5a96632
fix the order of parameter evaluation
levnach Oct 6, 2025
e9a2766
remove AI slop
NikolajBjorner Oct 6, 2025
63bb367
param order
levnach Oct 6, 2025
77c70bf
param order
levnach Oct 6, 2025
c154b9d
param order evaluation
levnach Oct 7, 2025
00f1e6a
parameter eval order
levnach Oct 7, 2025
93ff8c7
parameter evaluation order
levnach Oct 7, 2025
6e52b95
param eval
levnach Oct 7, 2025
3a2bbf4
param eval order
levnach Oct 7, 2025
2b3068d
parameter eval order
levnach Oct 7, 2025
a41549e
parameter eval order
levnach Oct 7, 2025
40b9800
parameter eval order
levnach Oct 7, 2025
8ccf4cd
parameter eval order
levnach Oct 7, 2025
6a9520b
parameter eval order
levnach Oct 7, 2025
8af9a20
parameter eval order
levnach Oct 7, 2025
641741f
parameter eval order
levnach Oct 7, 2025
e669fbe
Bump github/codeql-action from 3 to 4 (#7971)
dependabot[bot] Oct 14, 2025
5163411
Update Z3_mk_datatype_sort API to accept array of sort parameters and…
Copilot Oct 15, 2025
3b565bb
trim parametric datatype test
NikolajBjorner Oct 15, 2025
1921260
restore single cell
levnach Oct 15, 2025
a179286
restore the method behavior
levnach Oct 15, 2025
193845c
setting up python tuning experiment, not done
ilanashapiro Oct 16, 2025
05ffc0a
Add finite_set_value_factory for creating finite set values in model …
Copilot Oct 16, 2025
62ee7cc
Revert "Add finite_set_value_factory for creating finite set values i…
NikolajBjorner Oct 16, 2025
fcc7e02
Update arith_rewriter.cpp
NikolajBjorner Oct 18, 2025
86d7790
update pythonnn prototyping experiment, need to add a couple more things
ilanashapiro Oct 19, 2025
d65c0fb
add explicit constructors for nightly mac build failure
NikolajBjorner Oct 19, 2025
aaaa32b
build fixes
NikolajBjorner Oct 19, 2025
8371f11
fixes
ilanashapiro Oct 19, 2025
629408b
fix some more things but now it hangs
ilanashapiro Oct 19, 2025
2480b5a
change multithread to multiprocess seems to have resolved current dea…
ilanashapiro Oct 19, 2025
da85ed8
fix some bugs, it seems to run now
ilanashapiro Oct 20, 2025
564ecec
fix logic about checking clauses individually, and add proof prefix c…
ilanashapiro Oct 20, 2025
f520e68
Merge branch 'Z3Prover:master' into param-tuning
ilanashapiro Oct 20, 2025
f2e7abb
disable manylinux until segfault is resolved
NikolajBjorner Oct 20, 2025
06ed96d
add the "noexcept" keyword to value_score=(value_score&&) declaration
levnach Oct 20, 2025
43197f5
expose a status flag for clauses but every single one is being coded …
ilanashapiro Oct 21, 2025
9a2867a
Add a fast-path to _coerce_exprs. (#7995)
nelhage Oct 21, 2025
68a7d1e
Bump actions/setup-node from 5 to 6 (#7994)
dependabot[bot] Oct 21, 2025
61f48ab
Merge branch 'Z3Prover:master' into param-tuning
ilanashapiro Oct 21, 2025
39ec676
Merge branch 'parallel' into param-tuning
ilanashapiro Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4

- name: Run CodeQL Query
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
with:
category: 'custom'
queries: ./codeql/custom-queries
2 changes: 1 addition & 1 deletion .github/workflows/wasm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: "lts/*"

Expand Down
Binary file removed a-tst.gcno
Binary file not shown.
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
pool:
vmImage: "ubuntu-latest"
container: "quay.io/pypa/manylinux2014_x86_64:latest"
condition: eq(0,1)
steps:
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz?rev=33c6e30e5ac64e6dba8f0431f2c35f1b&hash=9918A05BF47621B632C7A5C8D2BB438FB80A4480'
- script: mkdir -p /tmp/arm-toolchain/
Expand Down
90 changes: 90 additions & 0 deletions examples/c++/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,95 @@ void datatype_example() {

}

void polymorphic_datatype_example() {
std::cout << "polymorphic datatype example\n";
context ctx;

// Create type variables alpha and beta for polymorphic datatype using C API
Z3_symbol alpha_sym = Z3_mk_string_symbol(ctx, "alpha");
Z3_symbol beta_sym = Z3_mk_string_symbol(ctx, "beta");
sort alpha(ctx, Z3_mk_type_variable(ctx, alpha_sym));
sort beta(ctx, Z3_mk_type_variable(ctx, beta_sym));

std::cout << "Type variables: " << alpha << ", " << beta << "\n";

// Define parametric Pair datatype with constructor mk-pair(first: alpha, second: beta)
symbol pair_name = ctx.str_symbol("Pair");
symbol mk_pair_name = ctx.str_symbol("mk-pair");
symbol is_pair_name = ctx.str_symbol("is-pair");
symbol first_name = ctx.str_symbol("first");
symbol second_name = ctx.str_symbol("second");

symbol field_names[2] = {first_name, second_name};
sort field_sorts[2] = {alpha, beta}; // Use type variables

constructors cs(ctx);
cs.add(mk_pair_name, is_pair_name, 2, field_names, field_sorts);
sort pair = ctx.datatype(pair_name, cs);

std::cout << "Created parametric datatype: " << pair << "\n";

// Instantiate Pair with concrete types: (Pair Int Real)
sort_vector params_int_real(ctx);
params_int_real.push_back(ctx.int_sort());
params_int_real.push_back(ctx.real_sort());
sort pair_int_real = ctx.datatype_sort(pair_name, params_int_real);

std::cout << "Instantiated with Int and Real: " << pair_int_real << "\n";

// Instantiate Pair with concrete types: (Pair Real Int)
sort_vector params_real_int(ctx);
params_real_int.push_back(ctx.real_sort());
params_real_int.push_back(ctx.int_sort());
sort pair_real_int = ctx.datatype_sort(pair_name, params_real_int);

std::cout << "Instantiated with Real and Int: " << pair_real_int << "\n";

// Get constructors and accessors for (Pair Int Real) using C API
func_decl mk_pair_ir(ctx, Z3_get_datatype_sort_constructor(ctx, pair_int_real, 0));
func_decl first_ir(ctx, Z3_get_datatype_sort_constructor_accessor(ctx, pair_int_real, 0, 0));
func_decl second_ir(ctx, Z3_get_datatype_sort_constructor_accessor(ctx, pair_int_real, 0, 1));

std::cout << "Constructors and accessors for (Pair Int Real):\n";
std::cout << " Constructor: " << mk_pair_ir << "\n";
std::cout << " first accessor: " << first_ir << "\n";
std::cout << " second accessor: " << second_ir << "\n";

// Get constructors and accessors for (Pair Real Int) using C API
func_decl mk_pair_ri(ctx, Z3_get_datatype_sort_constructor(ctx, pair_real_int, 0));
func_decl first_ri(ctx, Z3_get_datatype_sort_constructor_accessor(ctx, pair_real_int, 0, 0));
func_decl second_ri(ctx, Z3_get_datatype_sort_constructor_accessor(ctx, pair_real_int, 0, 1));

std::cout << "Constructors and accessors for (Pair Real Int):\n";
std::cout << " Constructor: " << mk_pair_ri << "\n";
std::cout << " first accessor: " << first_ri << "\n";
std::cout << " second accessor: " << second_ri << "\n";

// Create constants of these types
expr p1 = ctx.constant("p1", pair_int_real);
expr p2 = ctx.constant("p2", pair_real_int);

std::cout << "Created constants: " << p1 << " : " << p1.get_sort() << "\n";
std::cout << " " << p2 << " : " << p2.get_sort() << "\n";

// Create expressions using accessors
expr first_p1 = first_ir(p1); // first(p1) has type Int
expr second_p2 = second_ri(p2); // second(p2) has type Int

std::cout << "first(p1) = " << first_p1 << " : " << first_p1.get_sort() << "\n";
std::cout << "second(p2) = " << second_p2 << " : " << second_p2.get_sort() << "\n";

// Create equality term: (= (first p1) (second p2))
expr eq = first_p1 == second_p2;
std::cout << "Equality term: " << eq << "\n";

// Verify both sides have the same type (Int)
assert(first_p1.get_sort().id() == ctx.int_sort().id());
assert(second_p2.get_sort().id() == ctx.int_sort().id());

std::cout << "Successfully created and verified polymorphic datatypes!\n";
}

void expr_vector_example() {
std::cout << "expr_vector example\n";
context c;
Expand Down Expand Up @@ -1394,6 +1483,7 @@ int main() {
enum_sort_example(); std::cout << "\n";
tuple_example(); std::cout << "\n";
datatype_example(); std::cout << "\n";
polymorphic_datatype_example(); std::cout << "\n";
expr_vector_example(); std::cout << "\n";
exists_expr_vector_example(); std::cout << "\n";
substitute_example(); std::cout << "\n";
Expand Down
Loading