3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

preparing niil files

Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
Lev 2018-08-08 15:17:57 +08:00 committed by Lev Nachmanson
parent c979c694f6
commit a5c62bfcc4
5 changed files with 100 additions and 8 deletions

View file

@ -21,6 +21,7 @@ z3_add_component(lp
lu.cpp
lp_utils.cpp
matrix.cpp
niil_solver.cpp
nra_solver.cpp
permutation_matrix.cpp
random_updater.cpp

View file

@ -6,7 +6,9 @@ def_module_params('lp',
('print_stats', BOOL, False, 'print statistic'),
('simplex_strategy', UINT, 0, 'simplex strategy for the solver'),
('enable_hnf', BOOL, True, 'enable hnf cuts'),
('bprop_on_pivoted_rows', BOOL, True, 'propagate bounds on rows changed by the pivot operation')
('bprop_on_pivoted_rows', BOOL, True, 'propagate bounds on rows changed by the pivot operation'),
('niil', BOOL, False, 'call nonlinear integer solver with incremental linearization')
))

View file

@ -0,0 +1,40 @@
/*++
Copyright (c) 2017 Microsoft Corporation
Module Name:
<name>
Abstract:
<abstract>
Author:
Nikolaj Bjorner (nbjorner)
Lev Nachmanson (levnach)
Revision History:
--*/
#include "util/lp/niil_solver.h"
#include "util/map.h"
namespace niil {
struct solver::imp {
imp(lp::lar_solver& s, reslimit& lim, params_ref const& p)
// :
// s(s),
// m_limit(lim),
// m_params(p)
{
}
};
void solver::add_monomial(lp::var_index v, unsigned sz, lp::var_index const* vs) {
std::cout << "called add_monomial\n";
}
solver::solver(lp::lar_solver& s, reslimit& lim, params_ref const& p) {
m_imp = alloc(imp, s, lim, p);
}
}

37
src/util/lp/niil_solver.h Normal file
View file

@ -0,0 +1,37 @@
/*++
Copyright (c) 2017 Microsoft Corporation
Module Name:
<name>
Abstract:
<abstract>
Author:
Nikolaj Bjorner (nbjorner)
Lev Nachmanson (levnach)
Revision History:
--*/
#pragma once
#include "util/vector.h"
#include "util/lp/lp_settings.h"
#include "util/rlimit.h"
#include "util/params.h"
#include "nlsat/nlsat_solver.h"
#include "util/lp/lar_solver.h"
namespace niil {
// nonlinear integer incremental linear solver
class solver {
public:
struct imp;
imp* m_imp;
void add_monomial(lp::var_index v, unsigned sz, lp::var_index const* vs);
solver(lp::lar_solver& s, reslimit& lim, params_ref const& p);
};
}