summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2020-10-20 15:06:10 -0700
committerGitHub <noreply@github.com>2020-10-20 17:06:10 -0500
commit020565a54621169437a237b0d14478f0c44936a0 (patch)
treedd822c79418af42d04d522753481eff585e96008 /src/theory
parent00583622160a91cc2aedc58d00a690bd57306bdc (diff)
Fix compiler warnings. (#5305)
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/rep_set.cpp2
-rw-r--r--src/theory/rep_set.h2
-rw-r--r--src/theory/uf/cardinality_extension.cpp21
3 files changed, 16 insertions, 9 deletions
diff --git a/src/theory/rep_set.cpp b/src/theory/rep_set.cpp
index df715675d..6c2901bd3 100644
--- a/src/theory/rep_set.cpp
+++ b/src/theory/rep_set.cpp
@@ -41,7 +41,7 @@ bool RepSet::hasRep(TypeNode tn, Node n) const
}
}
-unsigned RepSet::getNumRepresentatives(TypeNode tn) const
+size_t RepSet::getNumRepresentatives(TypeNode tn) const
{
const std::vector<Node>* reps = getTypeRepsOrNull(tn);
return (reps != nullptr) ? reps->size() : 0;
diff --git a/src/theory/rep_set.h b/src/theory/rep_set.h
index 6e1ed1227..acf214787 100644
--- a/src/theory/rep_set.h
+++ b/src/theory/rep_set.h
@@ -71,7 +71,7 @@ class RepSet {
/** does this set have representative n of type tn? */
bool hasRep(TypeNode tn, Node n) const;
/** get the number of representatives for type */
- unsigned getNumRepresentatives(TypeNode tn) const;
+ size_t getNumRepresentatives(TypeNode tn) const;
/** get representative at index */
Node getRepresentative(TypeNode tn, unsigned i) const;
/**
diff --git a/src/theory/uf/cardinality_extension.cpp b/src/theory/uf/cardinality_extension.cpp
index f24a058a3..b51e40a6c 100644
--- a/src/theory/uf/cardinality_extension.cpp
+++ b/src/theory/uf/cardinality_extension.cpp
@@ -887,9 +887,11 @@ void SortModel::assertCardinality(uint32_t c, bool val)
}
else
{
- if( c>d_maxNegCard.get() ){
- Trace("uf-ss-com-card-debug") << "Maximum negative cardinality for " << d_type << " is now " << c << std::endl;
- d_maxNegCard.set( c );
+ if (c > d_maxNegCard.get())
+ {
+ Trace("uf-ss-com-card-debug") << "Maximum negative cardinality for "
+ << d_type << " is now " << c << std::endl;
+ d_maxNegCard.set(c);
simpleCheckCardinality();
}
}
@@ -1139,8 +1141,11 @@ bool SortModel::checkLastCall()
size_t nReps = rs->getNumRepresentatives(d_type);
if (nReps != d_maxNegCard + 1)
{
- Trace("uf-ss-warn") << "WARNING : Model does not have same # representatives as cardinality for " << d_type << "." << std::endl;
- Trace("uf-ss-warn") << " Max neg cardinality : " << d_maxNegCard << std::endl;
+ Trace("uf-ss-warn") << "WARNING : Model does not have same # "
+ "representatives as cardinality for "
+ << d_type << "." << std::endl;
+ Trace("uf-ss-warn") << " Max neg cardinality : " << d_maxNegCard
+ << std::endl;
Trace("uf-ss-warn") << " # Reps : " << nReps << std::endl;
if (d_maxNegCard >= nReps)
{
@@ -1148,7 +1153,8 @@ bool SortModel::checkLastCall()
{
std::stringstream ss;
ss << "r_" << d_type << "_";
- Node nn = NodeManager::currentNM()->mkSkolem( ss.str(), d_type, "enumeration to meet negative card constraint" );
+ Node nn = NodeManager::currentNM()->mkSkolem(
+ ss.str(), d_type, "enumeration to meet negative card constraint");
d_fresh_aloc_reps.push_back( nn );
}
if (d_maxNegCard == 0)
@@ -1163,7 +1169,8 @@ bool SortModel::checkLastCall()
{
for (size_t j = (i + 1); j <= d_maxNegCard; j++)
{
- force_cl.push_back( d_fresh_aloc_reps[i].eqNode( d_fresh_aloc_reps[j] ).negate() );
+ force_cl.push_back(
+ d_fresh_aloc_reps[i].eqNode(d_fresh_aloc_reps[j]).negate());
}
}
Node cl = getCardinalityLiteral( d_maxNegCard );
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback