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

651 commits

Author SHA1 Message Date
Nikolaj Bjorner
f01da40e49 adding watches on Booleans
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-16 22:01:34 +01:00
Nikolaj Bjorner
689c5b4e12 generalize level
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-15 16:46:30 +01:00
Nikolaj Bjorner
3c8c8f5d40 update var dependency tracking
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-15 09:10:36 +01:00
Jakob Rath
4b3af1d0a4 Add notes from discussion 2021-09-14 15:45:17 +02:00
Jakob Rath
b90b888d0f add nicer way of adding inequalities with constants 2021-09-14 15:03:45 +02:00
Nikolaj Bjorner
ed200f4214
na (#5536)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-05 12:13:08 +02:00
Nikolaj Bjorner
ef297ced13 merge current master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-30 10:01:11 -07:00
Nikolaj Bjorner
39f50d46cc Merge branch 'master' of https://github.com/z3prover/z3 into polysat 2021-08-30 10:00:58 -07:00
Jamey Sharp
cd7a826083
bit_blaster unit tests for adder and multiplier (#5514)
These tests cover a mix of constant and non-constant input bits.
2021-08-27 14:19:12 -07:00
Jakob Rath
ebaea2159e
Polysat: use constraint_literal and begin move to core-based conflict representation (#5489)
* Rename solver_scope for fixplex tests

(otherwise the wrong constructor is called for polysat's solver_scope)

* Update conflict_core

* simplify

* Be clearer about constraint_literal lifetime

* remove old comment

* Remove status (positive/negative) from constraint

* Use constraint_literal in the solver

* Fix build (constraint -> get_constraint)
2021-08-18 11:02:46 -07:00
Nikolaj Bjorner
30e9f24fa3 dbg
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-15 00:48:36 -07:00
Nikolaj Bjorner
6af314c6d9 simplify inequality propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-14 23:36:51 -07:00
Nikolaj Bjorner
204b417396 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-14 22:33:41 -07:00
Nikolaj Bjorner
11a048d5f9 add auxiliary propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-14 17:55:48 -07:00
Nikolaj Bjorner
6ac7c2b942 fixplex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-13 23:18:52 -07:00
Nikolaj Bjorner
60dbfed69e scenario saving
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-13 11:01:07 -07:00
Nikolaj Bjorner
cdbd121b5e wip
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-12 17:08:59 -07:00
Nikolaj Bjorner
f1f5b9e311 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-11 21:40:23 -07:00
Nikolaj Bjorner
2b6308af74 testing fixplex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-11 08:33:19 -07:00
Nikolaj Bjorner
8d43d98710 prepare tests
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-11 04:23:05 -07:00
Nikolaj Bjorner
c1365b6ba8 add inequality propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-10 11:45:59 -07:00
Nikolaj Bjorner
7b3eaf75ce validate and fix fixed/diff
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-09 13:53:15 -07:00
Nikolaj Bjorner
d07b508ecd more unit testing and fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-09 10:50:30 -07:00
Nikolaj Bjorner
6a829f831d inequality propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-08 13:21:15 -07:00
Nikolaj Bjorner
f47930a4ff testing bounds strengthening code
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-06 17:05:54 -07:00
Nikolaj Bjorner
be9f172cc0 adding deps
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-04 14:02:32 -07:00
Jakob Rath
8a773d2bee
Polysat updates (#5444)
* Simplify adding lemmas

* Remove misleading constructor from tmp_assign.

The idea is that tmp_assign is only created on the stack and
short-lived.  Instead of having a convenience constructor that takes a
constraint_ref, it's clearer to have an explicit .get() at the call
site.

* Remove some log messages

* bugfix

* fix

* Add stub for conflict_core

* wip

* Add example by Clemens
2021-07-30 11:14:19 -07:00
Nikolaj Bjorner
ff717a9db1 test / fix wrap-around for mod-interval
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-03 10:49:22 -07:00
Nikolaj Bjorner
4a94d13c4d na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-03 09:34:53 -07:00
Nikolaj Bjorner
c3ac079272 include path
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-03 09:15:21 -07:00
Nikolaj Bjorner
674e030456 include paths, separate test for mod_interval
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-03 09:09:54 -07:00
Nikolaj Bjorner
05bcf0bed7 test sup
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-01 10:33:25 -07:00
Nikolaj Bjorner
7d5a1acb61 test sup
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-30 21:12:00 -07:00
Nikolaj Bjorner
b019477378 add cofactoring functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-30 09:11:42 -07:00
Jakob Rath
3436b52c4a
Polysat: refactor constraints (#5372)
* Refactor: remove sign and dep from constraint

* fix some bugs

* improve log messages

* Add missing premises to lemma

* Rename getter in an attempt to fix linux build
2021-06-25 11:04:25 -07:00
Jakob Rath
20a5baeb70
Polysat: expand conflict explanation rules (#5366)
* update example to match slides

* Add normalized view of inequalities

* workaround

* Add a conflict explanation rule

* unit clauses should be asserted at the base level

* Add src constraint to interval

* support non-strict case in first rule

* print conflict constraints only once

* update second rule

* update third rule as well
2021-06-23 10:12:39 -07:00
Jakob Rath
d7b8ea2f7f
Polysat: minor fixes (#5364)
* update include paths

* bdd fixes

* update/fix some tests

* work around assertion failure when constraint from clause becomes unit

* Remove old code

* use clause_builder

* Verify model when returning SAT

* log

* fix
2021-06-22 09:27:18 -07:00
Nikolaj Bjorner
2522c8b53d display statistics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-20 10:29:27 -07:00
Nikolaj Bjorner
4405fa1156 add handling of misc operations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-18 14:30:56 -07:00
Nikolaj Bjorner
3da37f4fb5 add unit test driver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-18 10:58:42 -07:00
Nikolaj Bjorner
d72724f7fd merge master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-18 10:04:38 -07:00
Jakob Rath
c4963f4381
Polysat: add two more prototype rules (#5355)
* Add try_div to PDDs

* x>y is false when x==y

* First version of the other two prototype rules

* More band-aid fixes...
2021-06-18 08:48:50 -07:00
Jakob Rath
1fe7dc40fe
Polysat: add simpler monotonicity unit test + minor changes (#5348)
* Add simpler versions of monotonicity puzzle

* band-aid fix to conflicts during revert_decision

* minor changes
2021-06-15 12:18:37 -05:00
Jakob Rath
9cc78ef98e
Polysat: unit testing minor changes (#5326)
* Use check instead of check_sat in tests

* First steps at standalone entry point
2021-06-01 10:12:51 -07:00
Nikolaj Bjorner
5ad486901e na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-21 18:03:05 -07:00
Jakob Rath
28996429df
Polysat disjunctive lemmas (WIP) (#5275)
* Extend search state by boolean literals

* Only resolve against positive equality

* mk_dep_ref

* Make clause non-owning

* scoped_clause

* Use scoped_clause

* minor

* scoped_ptr move assignment

* WIP: internal handling of disjunctive constraints

* leaf_value

* disjunctive constraints continued

* Fix bool_lit

* Actually add constraints to storage

* Some fixes

* more fixes

* constraint should have a bool_lit instead of a bool_var

* propagate(bool_lit)

* updates

* interface changes

* small fixes

* Make sat::dimacs_lit's constructor explicit

(otherwise, calling operator<< with sat::literal is ambiguous)

* Use sat::literal

* Print test name at the beginning

* Convention: constraint corresponds to the positive boolean literal

* Make constraint ownership more explicit

* clause stores literals
2021-05-21 13:50:25 -07:00
alexandernutz
49e9782238
Fixedpoint unit tests and transcribed bv puzzle (#5291)
* simple fixed point arithmetic tests

* transcribe puzzle
2021-05-21 09:24:25 -07:00
Nikolaj Bjorner
26893005c7 Merge branch 'master' of https://github.com/z3prover/z3 into polysat 2021-05-20 15:28:32 -07:00
Nikolaj Bjorner
03d2c5f3d0 consolidate literals 2021-05-20 12:58:27 -07:00
alexandernutz
8a5addd891
make the two monotonicity tests into one using push/pop; fix division modelling (#5220)
* make the two monotonicity tests into one using push/pop

* whitespace...

* proper division modelling for monotonicity test -- overflow checks still missing, though

* double bitwidth for overflow checking in monotonicity example
2021-05-20 10:00:13 -07:00