summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.stanford.edu>2016-12-11 18:21:52 -0800
committerGitHub <noreply@github.com>2016-12-11 18:21:52 -0800
commit6cc03ca6e596846d3a42d080e50c22f582d70e87 (patch)
tree33de917c1c3670f94aba2ee1acf53e4f3fd78988 /src
parent41de627bbda41923f6b5115700b5b98ce06a281a (diff)
parent89be804959b82c68b69906c84d843a8ecc33056a (diff)
Merge branch 'master' into fix_order
Diffstat (limited to 'src')
-rw-r--r--src/theory/arith/normal_form.cpp7
-rw-r--r--src/theory/bv/theory_bv_rewrite_rules_simplification.h7
2 files changed, 5 insertions, 9 deletions
diff --git a/src/theory/arith/normal_form.cpp b/src/theory/arith/normal_form.cpp
index d7c580395..ec396b24e 100644
--- a/src/theory/arith/normal_form.cpp
+++ b/src/theory/arith/normal_form.cpp
@@ -528,14 +528,13 @@ Integer Polynomial::numeratorGCD() const {
Integer Polynomial::denominatorLCM() const {
Integer tmp(1);
- for(iterator i=begin(), e=end(); i!=e; ++i){
- const Constant& c = (*i).getConstant();
- tmp = tmp.lcm(c.getValue().getDenominator());
+ for (iterator i = begin(), e = end(); i != e; ++i) {
+ const Integer denominator = (*i).getConstant().getValue().getDenominator();
+ tmp = tmp.lcm(denominator);
}
return tmp;
}
-
Constant Polynomial::getCoefficient(const VarList& vl) const{
//TODO improve to binary search...
for(iterator iter=begin(), myend=end(); iter != myend; ++iter){
diff --git a/src/theory/bv/theory_bv_rewrite_rules_simplification.h b/src/theory/bv/theory_bv_rewrite_rules_simplification.h
index 6ef591760..871380467 100644
--- a/src/theory/bv/theory_bv_rewrite_rules_simplification.h
+++ b/src/theory/bv/theory_bv_rewrite_rules_simplification.h
@@ -1108,13 +1108,10 @@ Node RewriteRule<MergeSignExtend>::apply(TNode node) {
template<> inline
bool RewriteRule<MultSlice>::applies(TNode node) {
- if (node.getKind() != kind::BITVECTOR_MULT) {
+ if (node.getKind() != kind::BITVECTOR_MULT || node.getNumChildren() != 2) {
return false;
}
- if (utils::getSize(node[0]) % 2 != 0) {
- return false;
- }
- return true;
+ return utils::getSize(node[0]) % 2 == 0;
}
/**
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback