summaryrefslogtreecommitdiff
path: root/src/preprocessing/passes
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2021-03-11 11:05:58 -0800
committerGitHub <noreply@github.com>2021-03-11 19:05:58 +0000
commitdc679ed380aabc62aadfbb4033c02c5a27ae903c (patch)
treeeae38a0bcbd56104c4e381e84d7f8c724104d365 /src/preprocessing/passes
parentc314b0162c7fa089c400e11bd72c4ca24a26c9d0 (diff)
Delete Expr layer. (#6117)
Diffstat (limited to 'src/preprocessing/passes')
-rw-r--r--src/preprocessing/passes/bv_to_int.cpp4
-rw-r--r--src/preprocessing/passes/int_to_bv.cpp15
-rw-r--r--src/preprocessing/passes/real_to_int.cpp8
3 files changed, 13 insertions, 14 deletions
diff --git a/src/preprocessing/passes/bv_to_int.cpp b/src/preprocessing/passes/bv_to_int.cpp
index 6174d381d..f5e81bb9c 100644
--- a/src/preprocessing/passes/bv_to_int.cpp
+++ b/src/preprocessing/passes/bv_to_int.cpp
@@ -646,8 +646,8 @@ Node BVToInt::translateWithChildren(Node original,
*/
if (childrenTypesChanged(original) && options::ufHo())
{
- throw TypeCheckingException(
- original.toExpr(),
+ throw TypeCheckingExceptionPrivate(
+ original,
string("Cannot translate to Int: ") + original.toString());
}
// Insert the translated application term to the cache
diff --git a/src/preprocessing/passes/int_to_bv.cpp b/src/preprocessing/passes/int_to_bv.cpp
index 152c096e0..e857b7b61 100644
--- a/src/preprocessing/passes/int_to_bv.cpp
+++ b/src/preprocessing/passes/int_to_bv.cpp
@@ -163,9 +163,9 @@ Node intToBV(TNode n, NodeMap& cache)
case kind::ITE: break;
default:
if (childrenTypesChanged(current, cache)) {
- throw TypeCheckingException(
- current.toExpr(),
- string("Cannot translate to BV: ") + current.toString());
+ throw TypeCheckingExceptionPrivate(
+ current,
+ string("Cannot translate to BV: ") + current.toString());
}
break;
}
@@ -225,8 +225,8 @@ Node intToBV(TNode n, NodeMap& cache)
BitVector bv(size, constant.getNumerator());
if (bv.toSignedInteger() != constant.getNumerator())
{
- throw TypeCheckingException(
- current.toExpr(),
+ throw TypeCheckingExceptionPrivate(
+ current,
string("Not enough bits for constant in intToBV: ")
+ current.toString());
}
@@ -239,9 +239,8 @@ Node intToBV(TNode n, NodeMap& cache)
}
else
{
- throw TypeCheckingException(
- current.toExpr(),
- string("Cannot translate to BV: ") + current.toString());
+ throw TypeCheckingExceptionPrivate(
+ current, string("Cannot translate to BV: ") + current.toString());
}
cache[current] = result;
}
diff --git a/src/preprocessing/passes/real_to_int.cpp b/src/preprocessing/passes/real_to_int.cpp
index c37ac9c20..9c58250e3 100644
--- a/src/preprocessing/passes/real_to_int.cpp
+++ b/src/preprocessing/passes/real_to_int.cpp
@@ -116,8 +116,8 @@ Node RealToInt::realToIntInternal(TNode n, NodeMap& cache, std::vector<Node>& va
}
else
{
- throw TypeCheckingException(
- v.toExpr(),
+ throw TypeCheckingExceptionPrivate(
+ v,
std::string("Cannot translate to Int: ") + v.toString());
}
}
@@ -171,8 +171,8 @@ Node RealToInt::realToIntInternal(TNode n, NodeMap& cache, std::vector<Node>& va
{
// cannot change the type of quantified variables, since this leads
// to incompleteness.
- throw TypeCheckingException(
- n.toExpr(),
+ throw TypeCheckingExceptionPrivate(
+ n,
std::string("Cannot translate bound variable to Int: ")
+ n.toString());
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback