// Store the translated node
Node returnNode;
+ /**
+ * higher order logic allows comparing between functions
+ * The translation does not support this,
+ * as the translated functions may be different outside
+ * of the bounds that were relevant for the original
+ * bit-vectors.
+ */
+ if (childrenTypesChanged(original) && logicInfo().isHigherOrder())
+ {
+ throw OptionException("bv-to-int does not support higher order logic ");
+ }
// Translate according to the kind of the original node.
switch (oldKind)
{
}
case kind::APPLY_UF:
{
- /**
- * higher order logic allows comparing between functions
- * The translation does not support this,
- * as the translated functions may be different outside
- * of the bounds that were relevant for the original
- * bit-vectors.
- */
- if (childrenTypesChanged(original) && logicInfo().isHigherOrder())
- {
- throw OptionException("bv-to-int does not support higher order logic ");
- }
// Insert the translated application term to the cache
returnNode = d_nm->mkNode(kind::APPLY_UF, translated_children);
// Add range constraints if necessary.
bool result = false;
for (const Node& child : n)
{
- TypeNode originalType = child.getType();
- Assert(d_intblastCache.find(child) != d_intblastCache.end());
- TypeNode newType = d_intblastCache[child].get().getType();
- if (!newType.isSubtypeOf(originalType))
+ // the child's type has changed only if it has been
+ // processed already
+ if (d_intblastCache.find(child) != d_intblastCache.end())
{
- result = true;
- break;
+ TypeNode originalType = child.getType();
+ TypeNode newType = d_intblastCache[child].get().getType();
+ if (!newType.isSubtypeOf(originalType))
+ {
+ result = true;
+ break;
+ }
}
}
return result;
regress0/bv/bv2nat-ground-c.smt2
regress0/bv/bv2nat-simp-range.smt2
regress0/bv/bv_to_int1.smt2
+ regress0/bv/bv_to_int_415.smt2
regress0/bv/bv_to_int_5230_binary.smt2
regress0/bv/bv_to_int_5230_missing_op.smt2
regress0/bv/bv_to_int_5230_shift_const.smt2
--- /dev/null
+; EXPECT:
+; SCRUBBER: grep -v "higher.order"
+; EXIT: 1
+(set-option :solve-bv-as-int sum)
+(set-logic HO_ALL)
+(declare-const _x108 (Bag (_ BitVec 4)) )
+(declare-fun _x113 ((_ BitVec 4)) (_ BitVec 4))
+(assert (= (bag.map _x113 _x108) (as bag.empty (Bag (_ BitVec 4)))))
+(check-sat)