Skip to content

Integrate Diophantine handler #7548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 147 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
0495204
add parameter to control calling diophantine equations
levnach Aug 13, 2024
7050589
prepare for calling diophantine equations
levnach Aug 13, 2024
66b778c
fix the build
levnach Aug 13, 2024
0b9b1c4
move some functionality from int_solver to int_solver::imp
levnach Aug 15, 2024
0eeef3b
fix the build
levnach Aug 15, 2024
484af98
crash
levnach Aug 16, 2024
c1e577e
fix the crash
levnach Aug 16, 2024
778db5e
use std::list
levnach Aug 20, 2024
876cbc5
in the middle
levnach Aug 21, 2024
53605d4
a version with less pointers: got a conflict
levnach Aug 22, 2024
0814fa4
create a conflict explanation
levnach Aug 22, 2024
5f71604
bug fix in init and getting explanations
levnach Aug 22, 2024
db899fd
fix in substitution of fresh variables, clean column.h
levnach Aug 23, 2024
1cb71b4
debug dio
levnach Aug 24, 2024
c29d04d
debug dio
levnach Aug 26, 2024
dcd80ac
fix term_o init
levnach Aug 26, 2024
178411a
dio passes regression\smt2 tests with limited functionality
levnach Aug 27, 2024
1a99fa5
handle zero rows correctly
levnach Aug 27, 2024
4fea425
fix the build
levnach Aug 27, 2024
7c9cb44
less eager dio
levnach Aug 29, 2024
9ec55de
optimize dio changes
levnach Aug 29, 2024
0c6dcfe
small optimization
levnach Aug 31, 2024
a75eff6
bug fix
levnach Aug 31, 2024
a1a9825
remove a throw
levnach Aug 31, 2024
b20566a
work on tighten_with_S
levnach Sep 4, 2024
e018512
use u_dependency in eprime_pair
levnach Sep 4, 2024
9118abe
cosmetics
levnach Sep 23, 2024
7d82126
handle sat with tightening
levnach Sep 23, 2024
8d8ee99
test tightening with S
levnach Sep 26, 2024
f05d1ab
debug dio
levnach Sep 26, 2024
2ca7b31
comment out global_max_change
levnach Sep 27, 2024
1769c60
fixed dio
levnach Sep 28, 2024
5f70eb0
do not eliminate fresh variables when tightening
levnach Sep 29, 2024
c30600c
fixes in dio
levnach Oct 1, 2024
4e38160
enable cuts from proofs
levnach Oct 2, 2024
110593f
use cuts from proofs, remove gcc warnings
levnach Oct 2, 2024
fa907c5
prepare using fresh vars in cuts
levnach Oct 7, 2024
2c7c708
fix ubuntu's build
levnach Oct 7, 2024
fdae46f
remove a warning
levnach Oct 7, 2024
5f00776
remove more warnings
levnach Oct 7, 2024
dc15dbf
remove disabling return
levnach Oct 8, 2024
60a38cd
do not use conflicts with fresh vars to create branches
levnach Oct 8, 2024
f3b3388
dio with static_matrix initial setup
levnach Oct 11, 2024
df577ee
unifying vectors into eprime_entry
levnach Oct 11, 2024
bc2c67c
debug dio with static matrix
levnach Oct 11, 2024
9434847
bug fixes
levnach Oct 11, 2024
9c2ec9b
bug fixes
levnach Oct 12, 2024
f5f4c84
bug fixes with tableau
levnach Oct 14, 2024
b0be4d5
vector access bugs
levnach Oct 14, 2024
4710260
handle empty rows in m_e_matrix
levnach Oct 15, 2024
282edcf
add a template instantiotion
levnach Oct 15, 2024
727ac14
change type of m_e_matrix
levnach Oct 15, 2024
2bda4d1
throttle dioph equalities
levnach Oct 16, 2024
a3b81b5
init m_e_matrix on terms instead of the tableau
levnach Oct 21, 2024
594fa74
fix the build
levnach Oct 21, 2024
09ec973
print output file name
levnach Oct 23, 2024
24aeaed
test that pivoting is correct in dioph_eq.cpp
levnach Oct 30, 2024
472306c
use fixed vars to explain tightening
levnach Nov 1, 2024
143f22e
fix the build
levnach Nov 1, 2024
1eecedf
add missing explanations
levnach Nov 2, 2024
0077a68
implement explain()
levnach Nov 2, 2024
bb77ff5
check feasibility immediately after tightening a bound
levnach Nov 2, 2024
2a81a1f
fixes in tigthening
levnach Nov 4, 2024
12ceb1e
take dependencies from open_ml
levnach Nov 4, 2024
b994395
remove redundant m_row_index from entry
levnach Nov 5, 2024
eb0aeab
remove a global debug variable
levnach Nov 5, 2024
cdb18ac
document dioph_eq
levnach Nov 5, 2024
b47a268
use var_register in dioph_eq
levnach Nov 7, 2024
08a1ddf
work on incremental version
levnach Nov 15, 2024
7f7dc87
solving regressions/smt2/b1.smt2
levnach Nov 17, 2024
6af8fbb
cancel bugs fixes
levnach Nov 18, 2024
ada3be2
remove dead code
levnach Nov 18, 2024
f336b0d
collect the explanation correctly
levnach Nov 19, 2024
781471a
passes z3test
levnach Nov 19, 2024
e32ebf1
fixes in dio branching
levnach Nov 19, 2024
b933a0d
fix the build
levnach Nov 19, 2024
28bafa3
fix the build
levnach Nov 19, 2024
44d75da
remove an assert
levnach Nov 19, 2024
7d8e192
change int_solver to call find_cube and hnf_cut, conditionally
levnach Nov 22, 2024
90dbc62
persist dio handler
levnach Nov 27, 2024
0958806
cosmetics
levnach Dec 16, 2024
c112df5
simplify column
levnach Dec 20, 2024
a737483
fix a bug in dio
levnach Dec 20, 2024
000fab6
fix a bug in dio
levnach Dec 20, 2024
f2b05af
test
levnach Dec 20, 2024
0d3abbb
test
levnach Dec 20, 2024
4dd701a
remove some warnings
levnach Dec 20, 2024
af85781
work on incremental dio
levnach Dec 24, 2024
b2964f8
cleanup
levnach Dec 24, 2024
5e23e77
work on incremental dio
levnach Dec 24, 2024
2c54192
use std_vector more and getting NOT_IMPLEMENTING in C:\dev\z3\src\mat…
levnach Dec 24, 2024
c263b15
track changed columns in dio\
levnach Dec 29, 2024
039ce4f
fix ubuntu build in dio
levnach Dec 29, 2024
c750edf
debug dio
levnach Jan 1, 2025
5cdcf3a
cleanup
levnach Jan 1, 2025
e8f806a
debug dio
levnach Jan 3, 2025
55c983d
introdure lar_term.ext_coeffs(), dio passes some tests
levnach Jan 4, 2025
21268f9
refine trail iterations with lar.m_terms
levnach Jan 6, 2025
8d72371
bug fixes
levnach Jan 6, 2025
3028465
debug dio
levnach Jan 17, 2025
f11dfc5
test dio
levnach Jan 20, 2025
16b4117
remove var_register_dio.h
levnach Jan 20, 2025
c73e99d
fix some warnings
levnach Jan 20, 2025
64d77d9
fix some warnings
levnach Jan 20, 2025
b208756
use entry_status for FRESH entries
levnach Jan 21, 2025
634e541
simplify dio handler by using bijection m_k2s
levnach Jan 23, 2025
ff6f7ed
substitute variables with a queue on the recalculated entries
levnach Jan 24, 2025
8e071bc
fix out of bounds bug
levnach Jan 24, 2025
f5ef569
remove recalculated entries from S
levnach Jan 24, 2025
a3747f5
cleanup
levnach Jan 25, 2025
43dc43e
don't store fresh definitions in m_e_matrix
levnach Jan 26, 2025
81bcb58
debug dio
levnach Jan 27, 2025
179e602
clean up fresh definitions on a pop
levnach Jan 29, 2025
3c4954d
make rewrite_eq boolean, and relax an ASSERT
levnach Jan 29, 2025
d8f332b
optimise rewrite_eqs to avoid fresh variables
levnach Jan 29, 2025
fb6d100
fix the debug build
levnach Jan 30, 2025
78694eb
use the trail to undo add_term
levnach Jan 30, 2025
49e3dd6
optimise l terms addition
levnach Feb 1, 2025
34eb121
remove struct entry
levnach Feb 3, 2025
bdfa6be
use m_chandedNterms to tighten terms
levnach Feb 3, 2025
2ed8cd0
out of bounds fixes
levnach Feb 3, 2025
993e12d
register m_added_terms in m_changed_terms
levnach Feb 3, 2025
a38c9be
make dio less aggressive, allow other cuts
levnach Feb 3, 2025
4a953eb
rebase with master
levnach Feb 4, 2025
f5150ec
call normalize_e_by_gcd() only when moving an entry from F to S
levnach Feb 4, 2025
e419e58
add stats on m_dio_branching_conflicts
levnach Feb 5, 2025
30064d4
disallow duplicates in a queue
levnach Feb 5, 2025
46a7ad6
avoid usisg indexed_vector for term operations
levnach Feb 6, 2025
78fea66
fix assert
levnach Feb 6, 2025
f64edb6
ignore large changed_columns
levnach Feb 6, 2025
28cc740
throttle the branching in dio
levnach Feb 6, 2025
df88e3a
stricter is_in_sync paying attenion to m_row2fresh_defs
levnach Feb 6, 2025
67318e2
comment change
levnach Feb 6, 2025
470ea5e
remove the fresh definition when removing its column
levnach Feb 7, 2025
c12625d
try sorting terms before tightening
levnach Feb 7, 2025
ac48ff5
try another sort in tightening
levnach Feb 8, 2025
9c4327a
test
levnach Feb 8, 2025
07a1a88
try markovich number
levnach Feb 8, 2025
86e39f3
try markovich number
levnach Feb 8, 2025
c79d470
revert the term sorting
levnach Feb 9, 2025
5f74fda
Revert "revert the term sorting"
levnach Feb 9, 2025
4bc14d7
more accurate work with Markovich number
levnach Feb 9, 2025
2c7509a
disabling dio handler by default, and fix a print out
levnach Feb 10, 2025
86b1f9e
fix the test build
levnach Feb 10, 2025
9acad96
address the review
levnach Feb 10, 2025
579f5ca
set arith.lp.dio_cuts_enable_gomory to False by default
levnach Feb 10, 2025
4622483
fixing the default parameters of dio and rename m_gomory_cuts to m_cuts
levnach Feb 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/math/lp/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 0
NamespaceIndentation: All
BreakBeforeBraces: Stroustrup
BreakBeforeBraces: Attach
1 change: 1 addition & 0 deletions src/math/lp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ z3_add_component(lp
SOURCES
core_solver_pretty_printer.cpp
dense_matrix.cpp
dioph_eq.cpp
emonics.cpp
factorization.cpp
factorization_factory_imp.cpp
Expand Down
25 changes: 3 additions & 22 deletions src/math/lp/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,10 @@ inline std::ostream& operator<<(std::ostream& out, lconstraint_kind k) {
return out << "??";
}

inline bool compare(const std::pair<mpq, lpvar> & a, const std::pair<mpq, lpvar> & b) {
return a.second < b.second;
}
class lar_term; // forward definition
class column {
u_dependency* m_lower_bound_witness = nullptr;
u_dependency* m_upper_bound_witness = nullptr;
bool m_associated_with_row = false;
lar_term* m_term = nullptr;
public:
lar_term* term() const { return m_term; }
Expand All @@ -53,26 +49,11 @@ class column {
u_dependency*& upper_bound_witness() { return m_upper_bound_witness; }
u_dependency* upper_bound_witness() const { return m_upper_bound_witness; }

// equality is used by stackedvector operations.
// this appears to be a low level reason

bool operator!=(const column & p) const {
return !(*this == p);
}

bool operator==(const column & p) const {
return m_lower_bound_witness == p.m_lower_bound_witness
&& m_upper_bound_witness == p.m_upper_bound_witness
&& m_associated_with_row == p.m_associated_with_row;
}
column() = delete;
column(bool) = delete;
column() {}


column(bool associated_with_row, lar_term* term) :
m_associated_with_row(associated_with_row), m_term(term) {}
column(lar_term* term) : m_term(term) {}

bool associated_with_row() const { return m_associated_with_row; }
bool associated_with_row() const { return m_term != nullptr; }
};

}
Loading
Loading