-
Notifications
You must be signed in to change notification settings - Fork 18
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
Nonlin LA preds #790
base: master
Are you sure you want to change the base?
Nonlin LA preds #790
Conversation
d89fbf6
to
b1f40d9
Compare
b1f40d9
to
b300ed9
Compare
The code fails with this input
Here's the output:
|
c0605cd
to
78b01bc
Compare
For our limited form of axioms this might actually be just enough. One thing is missing before I can put this to our production: To be sure that we're running the correct version, I'd need to have the version information from opensmt. See issue #800 . |
46d12d9
to
8acd08a
Compare
2810c10
to
32f3743
Compare
Ok, I think generally PR is over Though, we definitely need some sort of error handling, LANonLinearException produces errors with different format under different complilers rn. Should it be a different issue though? |
2242775
to
3829c5c
Compare
|
dcfff4e
to
68062a8
Compare
f5e5502
to
00adce9
Compare
00adce9
to
c34e1ba
Compare
src/logics/ArithLogic.cc
Outdated
simp.simplify(getTimesLinForSort(returnSort), flatten_args, s_new, args); | ||
if (!isTimes(s_new)) return mkFun(s_new, std::move(args)); | ||
PTRef coef = PTRef_Undef; | ||
std::vector<PTRef> vars; | ||
// return mkFun(s_new, std::move(args)); | ||
// Splitting Multiplication into constant and variable subterms | ||
for (int i = 0; i < args.size(); i++) { | ||
if (isConstant(args[i])) { | ||
assert(coef == PTRef_Undef); | ||
coef = args[i]; | ||
continue; | ||
} | ||
vars.push_back(args[i]); | ||
} | ||
assert(!vars.empty()); | ||
PTRef tr; | ||
if (vars.size() > 1) { | ||
if (coef == PTRef_Undef) { | ||
tr = mkFun(getTimesNonlinForSort(returnSort), vars); | ||
} else { | ||
tr = mkFun(s_new, {coef, mkFun(getTimesNonlinForSort(returnSort), vars)}); | ||
} | ||
} else { | ||
tr = mkFun(s_new, {coef, vars[0]}); | ||
} | ||
return tr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself. It would be good if we can avoid this complicated piece of code. It feels like the code in simplify
should take care of most of this.
eca54b4
to
7e441a2
Compare
7e441a2
to
adaea42
Compare
Allows to create nonlin functions
Removed all of the constraints for the creation of nonlin predicates inside of the functions.
Only the assertions are checked for nonlinearity