Order of assumptions appears to make a huge difference on what lemmas
are discovered. Shuffling the assumptions ensures that the solver
is never stuck with any bad order.
pob_queue is a priority queue. Changing a pob while it is in the queue might change
the priority. This is a source of subtle bugs. The flag is ment to help defend
against this issues in the future.
As a side-effect, a pob that is already in the queue will be silently not added
to it, and a new version of a pob might be created if a version being looked
for is already in the queue.
Lemma inherits its weakness score from the pob. However,
pob's weakness might be reset or changed for some other reason.
To avoid affecting the lemma, the weakness is copied on
construction.
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
change in settings + random in adding terms to hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
add terms in hnf from the beginning
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
adjusting settings
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove non used determinant()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fixex in maximize_term
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
prepare for LIRA (#76)
* merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* simple mixed integer example
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Nikolaj's fixes in theory_lra.cpp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fixes in maximize_term, disable find_cube for mixed case
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix cube heuristic for the mixed case
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix the build
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix in find cube delta's calculation
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove a printout
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove a blank line
Signed-off-by: Lev Nachmanson <levnach@microsoft.com>
test credentials
Signed-off-by: Lev Nachmanson <levnach@microsoft.com>
avoid double checks to add terms in hnf_cutter
Signed-off-by: Lev Nachmanson <levnach@microsoft.com>
fixes in add terms to hnf_cutter
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove a variable used for debug only
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove a field
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove a warning and hide m_A_orig under debug
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
use var_register to deal with mapping between external and local variables
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
tighten the loop in explain_implied_bound
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fixes in theory_lra and relaxing debug checks in pop(), for the case when push() has been done from not fully initialized state
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
suppress hnf cutter when the numbers become too large
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove some debug code
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
adjusting hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
exit earlier on a large matrix in hnf_cutter
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
call hnf only for the boundary points
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix a bug in hnf_cutter initialization
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
initialize has_bounds in lar_solver::get_equality_for_term_on_corrent_x
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
initialize has_bounds in lar_solver::get_equality_for_term_on_corrent_x
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
initialize has_bounds in lar_solver::get_equality_for_term_on_corrent_x
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
initialize has_bounds in lar_solver::get_equality_for_term_on_corrent_x
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fixes in determinant_of_rectangular_matrix calculations
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
changes in debug code
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
init m_hnf_cut_period from globals settings
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix some warnings
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Lev2 (#66)
* log quantifiers only if present
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* merge and fix some warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
remove a comment
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
simplify gomory cut return's logic
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
simplify uniformly int_solver::check()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
making new arith solver default for LIA (#67)
* log quantifiers only if present
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* merge and fix some warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* set new arith as default for LIA
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
remove chase_cut_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove integer_domain
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
restore call for find_cube()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove a method
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove some debug code
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fill the matrix A in hnf_cutter
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fill the matrix A in hnf_cutter
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
first steps of hnf cutter
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
handle generated cases in hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
call hnf only for a full rank matrix
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
get (H reversed) * b
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
finding the cut row randomly, exiting if is not there
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
produce first cuts with hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
produce first cuts with hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
define by lp_settings if to avoid calling hnf_cutter when the solution is not on the boundary
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
revert to the previous version
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work in hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work in hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work in hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work in hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
prepare calculate U in hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
naive algorithm for HNF and m <= n
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
naive algorithm for HNF
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
introduces reverse matrix into Hermite Normal Form calculation
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on more efficient hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
use smarter templates in lu.h
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
the new lu scheme compiles
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
simple test passes with the modified lu
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix the build on windows
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
playing with the example from cutting the mix
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf, add extended_gcd_minimal_uv()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on extended_gcd_minimal_uv
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf, add extended_gcd_minimal_uv()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
more tests and bug fixes in hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf modulo version
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf modulo version, more tests pass
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
a rough version of hnf passed the tests
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix build in release
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fixes in determinant calculations
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on hnf
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
create a stub for hnf_cuts
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
create a stub for hnf_cuts
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
create a stub for hnf_cuts
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
general_matrix etc.
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
general_matrix etc.
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
rename cut_solver to chase_cut_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
rename cut_solver to chase_cut_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
hnf_cutter
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
use special bounds inf find_cube for x+y, x-y
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
bug fixes in column patching, add stats to patching, restructure int_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
comment out m_old_values from int_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
avoid calling pivot_fixed_vars_from_basis() in int_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix the return value from path_nbasic_columns
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix the return value from path_nbasic_columns
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work in patch_columns
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on int_solver check()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
exit from find_free_interval() when l >= u
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
experiment with branching on nbasic columns
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove m_old_values
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
add rounding to patch_columns
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
qflia
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
patch all columns, round non-patched, branch or basic columns
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
refactor int_solver::check()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
restore move_non_basic_columns_to_bounds() after a failure in find_cube()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
optimize gomory cuts search
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
produce gomory cuts without moving columns to bounds
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
call find_feasible_solution() after moving columns
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
alway move colums to bounds before gomory cut
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
merge from best branch
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
correction in the sign of gomory_cut
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix in the gomory cut sign
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
try using lemmas of cut_solver as cuts
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
add find_cube() proposed by Nikolaj
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
restore m_int_branch_cut_solver to 8
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
accept empty lar_terms in theory_lra and also do not create empty lar_terms/lemmas
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
qflia_tactic
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
call find_feasible solution to recover for a failure in find_cube
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
do not tighten unused terms
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
get rid of inf_int_set
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix a bug with an accidental solution in cube
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
get rid of inf_int_set
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
bug fix with has_int_var() for lar_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix in find_inf_int_base_column
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
detect slow propagations
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fiddle with the stop conditions
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
get rid of constraint->m_predecessors, fix a bug in push/pop with lemmas
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
clean detection of stale lemmas in pop
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
add constraints lazily to cut_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
refactor some of cut_solver classes into include files
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
prepare to index constraint from 0 to to n - 1, where n is the number of constraints
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
prepare for constraint priority
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
use priorities in active_set
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove unnecesessary parameters
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
speedup bound propagations
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
restore tactics
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
speedup bound propagation by avoiding some calls to propagate_constraint_only_one_unlim
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fixes by Nikolaj
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
fix print lp_core_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
work on gomory test, subs terms indices correctly
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
correct const_iterator for lar_term
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
improve static_matrix with iterators
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
make row_strip a struct
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
move row_strip outside of static_matrix
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
add const_iterator to row_strip
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
remove the hierarchy of iterators - use std::iterators
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
adding gcd_test stats and taking care of for iterators
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
restore qflia_tactic.cpp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
run gcd_test according to settings()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
experiment with picking a narrow or random branch
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>