3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 03:15:50 +00:00
Commit graph

91 commits

Author SHA1 Message Date
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
Nikolaj Bjorner
39edf73e78 fix #2613 fix #2612
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-05 16:57:51 -07:00
Nikolaj Bjorner
c8908e81aa fix #2609 fix #2610
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-02 16:59:35 -07:00
Nikolaj Bjorner
88f0e4a64c fix #2592 #2593 #2597 #2573 - duplicates, also fix #2603
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-10-01 13:14:12 -07:00
Nikolaj Bjorner
301209cda6 fix #2595
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-09-28 17:44:25 -07:00
Nikolaj Bjorner
98c3887460 fix #2595
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-09-28 17:43:48 -07:00
Nikolaj Bjorner
67c4777514 fix #2548 fix #2530
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-09-13 15:03:04 +02:00
Nikolaj Bjorner
e0d8cefde4 remove cooperate
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-12 20:15:46 -07:00
Nikolaj Bjorner
1ca3381390 fix #2319
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-06-05 09:42:19 -07:00
Nikolaj Bjorner
0acc042bf7 fix #2120 fix #2122
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-02-03 17:15:38 +01:00
Nikolaj Bjorner
9fde9fe3a2 fix #2122 for code that isn't exception safe
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-02-02 19:49:16 +01:00
Nikolaj Bjorner
b6bf299b8b update upolynmial test
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-12-17 17:41:50 -08:00
Nikolaj Bjorner
f4d03edf22 remove unreachable
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-12-16 15:54:30 -08:00
Bruce Mitchener
bcfa8045fa Sink some values into loops.
This removes some dead stores that happen prior to the loop and
ensure that no one is looking at the values outside of the
loop.
2018-11-30 23:12:21 +07:00
Bruce Mitchener
e570940662 Prefer using empty rather than size comparisons. 2018-11-27 21:42:04 +07:00
Florian Pigorsch
326bf401b9 Fix some spelling errors (mostly in comments). 2018-10-20 17:07:41 +02:00
Michał Janiszewski
cfd0486582 Catch exceptions by const-reference
Exceptions caught by value incur needless cost in C++, most of them can
be caught by const-reference, especially as nearly none are actually
used. This could allow compiler generate a slightly more efficient code.
2018-10-16 19:16:07 +02:00
Bruce Mitchener
a76397d3b8 Refer to macOS rather than Mac OS / OSX. 2018-10-02 17:38:09 +07:00
Nuno Lopes
009708ed07 remove unneeded creation of tmp mpz_manager 2018-07-09 10:52:27 +01:00
Bruce Mitchener
2fa304d8de Remove int64, uint64 typedefs in favor of int64_t / uint64_t. 2018-03-31 14:45:04 +07:00