3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-24 12:07:52 +00:00
Commit graph

37 commits

Author SHA1 Message Date
Jakob Rath
f819c2bad8 conflict2 stub 2022-08-25 17:04:07 +02:00
Jakob Rath
e39e1dcc49 Extract inference_logger 2022-08-25 16:03:17 +02:00
Jakob Rath
bf1a7914cd Add clause simplification stub 2022-08-22 12:36:05 +02:00
Jakob Rath
48c6bea331 umul 2 2022-07-21 12:38:00 +02:00
Nikolaj Bjorner
afa7162ab1 add parameter class for polysat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-04-12 10:35:23 +02:00
Nikolaj Bjorner
1faccffd0d add smul over and underflow predicate
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-20 11:39:45 +02:00
Nikolaj Bjorner
8c9835bca6 smul no overflow
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-16 18:55:07 +02:00
Nikolaj Bjorner
89d6f1c191 update mk_project
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-02 18:04:52 -08:00
Nikolaj Bjorner
a2aa1170f9 rename to op-constraint to give space for other operations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-15 09:20:11 -08:00
Nikolaj Bjorner
06f7ba2e78 add stubs for shr 2021-12-14 14:35:08 -08:00
Nikolaj Bjorner
33d433d742 split out restart 2021-12-12 17:27:30 -08:00
Nikolaj Bjorner
30a2c32c3b add placeholder for simplification 2021-12-12 14:52:09 -08:00
Nikolaj Bjorner
0dcaf9b9f9 add ovfl constraint
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-09 09:05:23 -08:00
Nikolaj Bjorner
8db711bc3c retire deprecated functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-22 18:14:15 +01:00
Nikolaj Bjorner
0bec8520e1 adding new viable using forbidden intervals
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-10 08:23:45 -08:00
Nikolaj Bjorner
bb5ff8db24 rename conflict_core to conflict:
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-20 14:05:55 -07:00
Nikolaj Bjorner
b36bc11b85 remove eq constraint, fix gc for external constraints
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-11 20:09:28 +02:00
Jakob Rath
9f387f5738
Polysat: conflict resolution updates (#5534)
* variable elimination / saturation sketch

* conflict resolution updates
2021-09-03 10:17:06 -07:00
Jakob Rath
dc547510db
Polysat: conflict resolution wip (#5529)
* conflict_core doesn't need gc() anymore

* update comments, ensure_bvar for new constraints

* Make sure constraints can only be created through constraint_manager

* fix constraint::display if no boolean variable is assigned

* Move clause into separate file

* Add conflict_core binary resolution

* conflict_core additions

* reactivate conflict resolution outer loop

* wip

* seems commented includes break CI build
2021-09-01 09:10:10 -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
babb90832c initial u256
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-02 16:24:23 -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
Nikolaj Bjorner
01c81405af remove var-constraint alltogether
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-22 20:58:32 -07:00
Nikolaj Bjorner
6f93ed8dc2 moving out viable functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-21 15:50:04 -07:00
Jakob Rath
3e1cfcd538
Polysat: conflict explanation prototype (#5353)
* display constraint's extra info in one place

* Add stub for conflict explainer

* Add helper functions to check whether constraint is active at base level

* Add helper class tmp_assign

* Add clause_builder; it skips unnecessary literals during clause creation

* some fixes

* Use clause_builder for forbidden intervals

* remove old comments

* fixes/comments in solver

* print redundant clauses

* First pass at conflict_explainer

* remove unused model class

* Choose value for k

* also print min/max k
2021-06-17 10:35:32 -05: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
Nikolaj Bjorner
118dc0f3b4 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-14 10:25:42 -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
Jakob Rath
f83705bf9f
Polysat: first pass at forbidden intervals (not yet fully integrated into solver) (#5227)
* Add interval class

* Take dependency as const reference

* Compute forbidden intervals for ule-constraints

* Add class for evaluated interval

* We need the evaluated bounds as well

* Don't add constraint to cjust multiple times (hack, to be improved later)

* typo

* More interval helpers

* Add constraint::ult factory function

* Fix forbidden interval condition

* Add solver::has_viable

* Add conflict explanation using forbidden intervals (not yet fully integrated into solver)
2021-04-29 10:12:54 -07:00
Nikolaj Bjorner
831edba1c8 fixplex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-20 12:03:28 -07:00
Nikolaj Bjorner
9df7e9a029 add outline for ule constraints, change bit to var constraints
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-16 12:31:11 -07:00
Nikolaj Bjorner
af2376e9e4 fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-16 10:00:44 -07:00
Nikolaj Bjorner
2eadcd586a add new file for eq_constraint
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-15 14:34:01 -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
Nikolaj Bjorner
57486f0b3d split into parts, add stats
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-04-14 04:05:35 -07:00
Nikolaj Bjorner
731cf9b885 ensure compilation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-03-19 15:37:05 -07:00