3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-03 09:50:23 +00:00
Commit graph

110 commits

Author SHA1 Message Date
Nuno Lopes
3586b613f7 remove default destructors 2024-10-02 22:20:12 +01:00
Nuno Lopes
737c2208fa delete more default constructors
reduces code size by 0.1%
2024-09-23 12:59:04 +01:00
Nikolaj Bjorner
8fe357f1f2
Nlsat simplify (#7227)
* dev branch for simplification

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* bug fixes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* bugfixes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix factorization

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* separate out simplification functionality

* reorder initialization

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* reorder initialization

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* Update README.md

* initial warppers for seq-map/seq-fold

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* expose fold as well

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add C++ bindings for sequence operations

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add abs function to API

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add parameter validation to ternary and 4-ary functions for API #7219

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add pre-processing and reorder

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add pre-processing and reorder

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-14 22:19:33 -07:00
Nikolaj Bjorner
04c55c34e5 fix unsoundness bug
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-05-01 14:45:15 -07:00
Nikolaj Bjorner
39dc8861ee expose comparisons with polynomials, incremental way to extract variables 2024-04-30 16:59:50 -07:00
Nikolaj Bjorner
bc577b93ae refine precision before taking closest integral value. 2024-04-30 16:58:22 -07:00
Nikolaj Bjorner
bc70282a18 mute some compiler warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-02-03 15:42:06 -08:00
Nikolaj Bjorner
be7856c57d fix #7027
TODO: review old nlsat bugs for effect of this fix.
2024-01-23 14:56:15 -08:00
Nikolaj Bjorner
125a82bea5 improved diagnostics 2024-01-22 16:23:55 -08:00
Nikolaj Bjorner
910b3023c2 free memory the clean way
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-20 14:01:01 -08:00
Nikolaj Bjorner
d32dcfc4a4 free memory the clean way
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-20 13:54:50 -08:00
Nikolaj Bjorner
17545233e6 encapsulate anum functionality 2024-01-20 12:59:58 -08:00
Nikolaj Bjorner
3381fd2b52 spell check from https://github.com/microsoft/z3guide/pull/165
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-01-12 09:57:46 -08:00
Bruce Mitchener
50e0fd3ba6
Use noexcept more. (#7058) 2023-12-16 12:14:53 +00:00
Nikolaj Bjorner
ac105b7d8c remove unused code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-11-19 11:47:00 -08:00
Nikolaj Bjorner
35bc522dae #7003
minor tweaks to gomory and reset n3 within loop (but the entire function is dead code).
2023-11-19 09:59:44 -08:00
EyalBrilling
aa9c7912dc
fixed possible undefined variable assigment (#6985) 2023-11-10 11:36:24 +01:00
Nikolaj Bjorner
7b490543ca add missing simplification; handle nit #6952
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 10:00:15 -07:00
Duncan Ogilvie
e82c8e78ae
Fix a compilation error with clang-cl (VS2022) (#6489) 2022-12-12 22:12:31 +00:00
Nikolaj Bjorner
35986f3979 fix #6084
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-07 11:29:57 -07:00
Jan Vraný
bdf7de1703
Care for root index being undefine while calling Z3_algebraic_get_i() (#5888)
In some cases, Z3_algebraic_get_i() returned 0. For example, in the following
Python snippet, the last assert would fail:

    import z3
    x = z3.Real('x')
    s = z3.Solver()
    s.add( (x * x) - 2 == 0, x <= 0)
    s.check()
    val_x = s.model().get_interp(x)
    assert val_x.index() == 1

The problem was that `algebraic_numbers::manager:👿:get_i()` did not
check whether the root index was properly initialized.

This commit fixes this issue by checking whether root index is initialized
the same way various other routines do.

Fixes issue #5807.

Signed-off-by: Jan Vrany <jan.vrany@labware.com>
2022-03-16 19:28:03 -07:00
Nikolaj Bjorner
b1ff4bc24a no normalize
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-20 19:21:19 +01:00
Nikolaj Bjorner
75a81af426 fix #5786
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-20 19:18:23 +01:00
Henrich Lauko
96671cfc73
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings

* cmake: make missing non-virtual dtors error

* treewide: add missing virtual destructors

* cmake: add a few more checks

* api: add missing virtual destructor to user_propagator_base

* examples: compile cpp example with compiler warnings

* model: fix unused variable warnings

* rewriter: fix logical-op-parentheses warnings

* sat: fix unused variable warnings

* smt: fix unused variable warnings
2021-10-29 15:42:32 +02:00
Nikolaj Bjorner
22a76e4985 fix typos in comments 2021-04-26 15:15:27 -07:00
Nikolaj Bjorner
c03fac8390 Investigating std::vector and #5178 2021-04-24 14:50:59 -07:00
Nikolaj Bjorner
770c79a939 prepare for std::vector 2021-04-20 09:24:24 -07:00
Nikolaj Bjorner
4a6083836a call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
Nikolaj Bjorner
7d60d8462d patch for Sturm sequence bug #4961 2021-01-24 12:58:25 -08:00
Nikolaj Bjorner
89a6c7a349 fix #4883 2020-12-10 07:30:19 -08:00
Nikolaj Bjorner
c7704ef9af pass algebraic manager to arith-plugin mk-numeral because rational check may overwrite the argument using the current manager deals with crash as part of #4532
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-26 17:52:28 -07:00
Nikolaj Bjorner
d0e20e44ff booyah
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-04 15:56:30 -07:00
Nuno Lopes
d8cea7c8d5 fix a few warnings & simplify debug.h header 2020-05-26 13:49:13 +01:00
Nuno Lopes
903725314c fix gcc 9/10 warnings 2020-05-23 16:39:09 +01:00
Nikolaj Bjorner
b571e43f85 fix #4146 2020-04-28 13:28:46 -07:00
Nikolaj Bjorner
5434f3e31d fix #4105
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-26 22:59:19 -07:00
Nikolaj Bjorner
dc852a6f83 fix #4110 2020-04-26 14:13:58 -07:00
Nikolaj Bjorner
b889b110ee bool_vector, some spacer tidy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-05 12:59:04 -07:00
Nikolaj Bjorner
0fc8ebc8cc fix #3683
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-04 18:56:10 -07:00
Nikolaj Bjorner
69783db5e8 print roots as part of test
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-24 15:28:51 -07:00
Nikolaj Bjorner
af51d98a32 avoid unintialized value build warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-24 15:02:31 -07:00
Nikolaj Bjorner
a557913307 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-24 12:45:16 -07:00
Nikolaj Bjorner
a4f668eef0 add unit test for #2867
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-24 11:52:41 -07:00
Nikolaj Bjorner
55ebb236db add self-contained check for triangle inequality for #2867
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-17 15:39:30 -07:00
ahumenberger
de9bc930e9
Extract defining components of algebraic number via C and C++ API (#3321)
* First steps toward adding Julia bindings

* Simplifications

* Streamlining

* Friends of tactic and probe

* Add missing functions

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Changes for CxxWrap v0.9.0

* Wrap enumeration and tuple sort

* Wrap z3::fixedpoint

* Wrap z3::optimize

* Wrap missing functions

* Fix aux types

* Add some missing functions

* Revert "Update azure-pipelines.yml for Azure Pipelines"

This reverts commit 5aab9f9240.

* Revert "Update azure-pipelines.yml for Azure Pipelines"

This reverts commit cfccd7ca2c.

* Revert "Update azure-pipelines.yml for Azure Pipelines"

This reverts commit f24740c595.

* Revert "Update azure-pipelines.yml for Azure Pipelines"

This reverts commit 592499eaa0.

* Checkout current version of pipeline

* Build Julia bindings on macOS

* Extract components of algebraic number

* Add type to C API function name

* Remove blank line

* Typo in doc

* Return Z3_ast_vector containing coefficients
2020-03-17 09:09:02 -07:00
Nikolaj Bjorner
9179deb746 add get-interpolant command
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-01-20 16:22:38 -06:00
Nikolaj Bjorner
d3b105f9f8 move out sign
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-01-20 16:22:38 -06:00
Nikolaj Bjorner
64dd4e1c83 fix #2659
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-25 10:42:21 -07:00
Nikolaj Bjorner
d0cf1458e3 fix #2630
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-12 04:12:06 -07:00
Nikolaj Bjorner
7c10fb83a0 fix #2615
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-06 19:00:14 -07:00