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

638 commits

Author SHA1 Message Date
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
Nikolaj Bjorner
0d776ecf88 eliminate basic variables from new rows
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-12 15:58:35 -07:00
Nikolaj Bjorner
62b7719d5a separate into self-contained mod interval
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-11 11:22:55 -07:00
Nikolaj Bjorner
04c0db75bf test eqs1
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-10 21:21:50 -07:00
Nikolaj Bjorner
be7b964206 fix row pivot/del
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-10 19:53:34 -07:00
Nikolaj Bjorner
0b6c7cd7b4 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-09 20:13:33 -07:00
Nikolaj Bjorner
e3e2860198 move to interval arithmetic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-07 15:32:56 -07:00
Nikolaj Bjorner
d33b9f2698 a test
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-06 19:09:31 -07:00
Nikolaj Bjorner
b5d1b0336a na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-06 19:00:51 -07:00
Jakob Rath
fd1758ffab
Polysat: check test results, forbidden intervals for coefficient -1 (#5241)
* Use scoped_ptr for condition

* Check solver result in unit tests

* Add test for unusual cjust

* Add solver::get_value

* Broken assertion

* Support forbidden interval for coefficient -1
2021-05-04 09:33:55 -07:00
Nikolaj Bjorner
5791b41133 more testing of fixplex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-03 16:31:00 -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
Nikolaj Bjorner
57a7bef96b na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-01 13:58:34 -07:00
Nikolaj Bjorner
20277f4a3f test 1
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-01 13:10:34 -07:00