mirror of
https://github.com/Z3Prover/z3
synced 2025-05-08 08:15:47 +00:00
looking for more farkas rules in interpolation
This commit is contained in:
parent
d9c69f5294
commit
cf176af48e
2 changed files with 13 additions and 0 deletions
|
@ -489,11 +489,15 @@ void iz3mgr::get_farkas_coeffs(const ast &proof, std::vector<rational>& rats){
|
|||
symb s = sym(proof);
|
||||
int numps = s->get_num_parameters();
|
||||
rats.resize(numps-2);
|
||||
if(num_prems(proof) < numps-2){
|
||||
std::cout << "bad farkas rule: " << num_prems(proof) << " premises should be " << numps-2 << "\n";
|
||||
}
|
||||
for(int i = 2; i < numps; i++){
|
||||
rational r;
|
||||
bool ok = s->get_parameter(i).is_rational(r);
|
||||
if(!ok)
|
||||
throw "Bad Farkas coefficient";
|
||||
#if 0
|
||||
{
|
||||
ast con = conc(prem(proof,i-2));
|
||||
ast temp = make_real(r); // for debugging
|
||||
|
@ -501,6 +505,7 @@ void iz3mgr::get_farkas_coeffs(const ast &proof, std::vector<rational>& rats){
|
|||
if(is_not(con) ? (o == Leq || o == Lt) : (o == Geq || o == Gt))
|
||||
r = -r;
|
||||
}
|
||||
#endif
|
||||
rats[i-2] = r;
|
||||
}
|
||||
#if 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue