3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00
Commit graph

1608 commits

Author SHA1 Message Date
Nikolaj Bjorner
dc879dc3fb merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-03 12:41:14 -07:00
Jakob Rath
f7e476a4a0
Polysat: fixes in solver, forbidden intervals for eq_constraint (#5240)
* Rename to neg_cond

* Add some logging utilities

* Implement case of forbidden interval covering the whole domain

* Implement diseq_narrow

* Do not activate constraint if we are in a conflict state

* comments

* Assert that lemma isn't undefined

* Update revert_decision to work in the case where narrowing causes propagation

* Fix case of non-disjunctive lemma from forbidden intervals

* Conflict should not leak outside user scope

* Add guard to decide(), some notes

* Add test case

* Add constraints to watchlist of unassigned variable during propagation

* Move common propagation functionality into base class

* Combine eq/diseq narrow

* Compute forbidden interval for equality constraints by considering them as p <=u 0 (or p >u 0 for disequalities)
2021-05-03 09:30:17 -07:00
Jakob Rath
0c4824f194
Polysat: forbidden intervals updates (#5230)
* Pop assign_eh

* Fix scoped_ptr_vector constructors, add detach()

* Need to copy the returned lemma

* Add test

* Basic inequality tests

* Return disjunctive lemma to caller
2021-04-30 08:41:50 -07:00
Nikolaj Bjorner
decbf4be11 fix undo record for lblset
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-29 14:06:18 -07:00
Nikolaj Bjorner
e5892e5e97 #5215
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-27 15:26:56 -07:00
Nikolaj Bjorner
c03fac8390 Investigating std::vector and #5178 2021-04-24 14:50:59 -07:00
Nikolaj Bjorner
36cd80748f working on pivot
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-20 17:42:01 -07:00
Nikolaj Bjorner
831edba1c8 fixplex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-20 12:03:28 -07:00
Nikolaj Bjorner
770c79a939 prepare for std::vector 2021-04-20 09:24:24 -07:00
Jakob Rath
4da1b7b03c
Add functionality for BDD vectors (#5198)
* Fix XOR over BDDs

* Add operator<< for find_int_t

* Add equality assertion macro that prints expression values on failure

* Adapt contains_int and find_int to take externally-defined bits

* Add more operations on BDD vectors

* Remove old functions

* Additional bddv functions

* Rename some things

* Make bddv a class and add operators

* Fix find_num/contains_num calls
2021-04-19 09:05:19 -07:00
Nuno Lopes
e67b9ebcf7 try to fix ARM32 build (#2776) 2021-04-17 16:14:05 +01:00
Jakob Rath
f72e30e539
Add BDD utilities; use them for narrowing/propagation of linear equality constraints (#5192)
* Add a few helper methods for encoding sets of integers as BDDs

* Use BDD functions in solver

* Add bdd::find_int

* Use bdd::find_int in solver

* Add narrowing for linear equality constraints

* Simplify code for linear propagation

* Add test for later

* Narrowing can only handle linear constraints with a single variable

* Need to push_cjust
2021-04-16 08:44:18 -07:00
Jakob Rath
feb31045f5
Add more logging to polysat (#5186)
* Add polysat logging support

* Don't really need the usual log levels

* Indent log headings

* Add display method to ptr_vector

* Add some logging to solver

* Use __FUNCSIG__ on MSVC
2021-04-15 08:35:57 -07:00
Jakob Rath
8a260d89cd
Small polysat fixes (#5183)
* Add some display functions

* Add new variables to free vars
2021-04-14 10:29:58 -07:00
Rolf Eike Beer
7f8e2a9f75
clean up CMake code (#5182)
* CMake: simplify FindGMP.cmake

Remove printing of all the different variables, and let FPHSA output the library
name. Add an imported target, which bundles the library and the include
directories for easier usage.

* fix build: vector::c_ptr() now is vector::data()

* CMake: use Threads::Threads imported module

Otherwise the setting of THREADS_PREFER_PTHREAD_FLAG has no effect.

* CMake: remove needless policy setting

The minimum required version is CMake 3.4, where these policies are already set
to new because they were introduced earlier.

* CMake: remove needless variable expansion
2021-04-14 10:29:15 -07:00
Jakob Rath
324d9ed461
Add more PDD utilities (div, pow) (#5180)
* Expose 'inv' on rationals to get reciprocal value

* Align parameter names with implementation

* Add cached operation that divides PDD by a constant

* Fix display for constant PDDs

* operator^ should probably call ^ instead of + (mk_xor instead of add)

* Add helper function 'pow' on PDDs
2021-04-14 04:48:42 -07:00
Nikolaj Bjorner
21baa2a70a Merge branch 'master' of https://github.com/z3prover/z3 into polysat 2021-04-14 03:51:12 -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
c2b213c049 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-12 11:20:38 -07:00
Nikolaj Bjorner
31baab49c8 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-12 11:20:37 -07:00
Nikolaj Bjorner
e89071d366 #5125 2021-03-26 14:58:24 -07:00
Luca Bruno
b918f121ef
zstring: fix encode rountrip for '\' as printable ASCII (#5120)
This fixes encode roundtripping for all printable ASCII characters.
In particular, this now leaves a plain '\' untouched by the
encoding logic, instead of converting it to escaped hex-digits.
It also adds unit testing covering this specific zstring encoding
property, in order to avoid future regressions.
2021-03-23 11:25:59 -07:00
Nikolaj Bjorner
2fef6dc502 more scaffolding 2021-03-21 11:31:14 -07:00
Nikolaj Bjorner
a1f484fa35 na 2021-03-19 16:42:45 -07:00
Nikolaj Bjorner
15a7621e27 remove template dependency for trail objects 2021-03-19 11:15:05 -07:00
Nikolaj Bjorner
857557ad93 deal with compiler warnings 2021-03-08 20:39:19 -08:00
Nikolaj Bjorner
f29a596070 deal with compiler warnings, from MacOS CI build 2021-03-08 17:14:09 -08:00
Nikolaj Bjorner
38737db802 fixes and more porting seq_eq_solver to self-contained module 2021-03-04 16:23:22 -08:00
Nuno Lopes
db04ccb137 scoped_timer: skip extra unneded heap allocation 2021-03-01 14:36:22 +00:00
Nikolaj Bjorner
830f314a3f fixes to dt_solver and related 2021-02-27 11:03:20 -08:00
Nikolaj Bjorner
c3b7fa941a fix #5048 2021-02-22 10:56:19 -08:00
Nikolaj Bjorner
9ae3339c33 fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-02-18 12:33:17 -08:00
Nuno Lopes
d396d46bd1 let's test if all the buildbots are happy with C++17
it's stil a bit too early for C++20
2021-02-18 18:13:10 +00:00
Nikolaj Bjorner
e63dc7efc2 more rewrite rules 2021-02-17 17:32:00 -08:00
Nikolaj Bjorner
96e7b811f9 fix #5029 2021-02-15 14:17:05 -08:00
Nikolaj Bjorner
6bd02e122b parse according to http://smtlib.cs.uiowa.edu/theories-UnicodeStrings.shtml
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-02-15 09:32:31 -08:00
Nikolaj Bjorner
c808f74591 fix multiplier base for #5022
add also some C++ API shorthands for retrieving numerals
2021-02-12 11:53:40 -08:00
Nikolaj Bjorner
a152bb1e80 remove template Context dependency in every trail object 2021-02-08 15:41:57 -08:00
Nikolaj Bjorner
4dfdabc80f na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-31 16:36:55 -08:00
Nikolaj Bjorner
6d99a8f0cc fixes for unicode 2021-01-31 14:55:52 -08:00
Nikolaj Bjorner
8fde6c207d set unicode to default 2021-01-31 07:22:51 -08:00
Nikolaj Bjorner
657ed4db7a fix relevancy bug for recfun
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-30 07:19:57 -08:00
Nikolaj Bjorner
520b24aab4 string escaping
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-30 04:58:58 -08:00
Nikolaj Bjorner
c99b805c14 mld
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-29 18:37:38 -08:00
Nikolaj Bjorner
ec1e3cc14a encoding disaster
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-29 16:25:24 -08:00
Nikolaj Bjorner
4857446cf6 change handling of escapes for #4708 2021-01-29 13:36:47 -08:00
Nikolaj Bjorner
5414030875 #4939 escape character
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-28 11:57:00 -08:00
Nikolaj Bjorner
20332c6d3e adding char decl plugin for separate theory treatment
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-26 16:28:44 -08:00
Nikolaj Bjorner
4b6d7ca097 working on mam 2021-01-25 17:54:53 -08:00
Nikolaj Bjorner
7d60d8462d patch for Sturm sequence bug #4961 2021-01-24 12:58:25 -08:00