Remove Type from SolverInterface

This commit is contained in:
Leonardo Alt
2020-05-20 12:55:19 +02:00
parent 45eba27424
commit 7a91c9b971
3 changed files with 7 additions and 8 deletions
+2 -1
View File
@@ -1061,8 +1061,9 @@ void SMTEncoder::arrayIndexAssignment(Expression const& _expr, smtutil::Expressi
{
auto symbArray = dynamic_pointer_cast<smt::SymbolicArrayVariable>(m_context.expression(*base));
solAssert(symbArray, "");
auto baseType = base->annotation().type;
toStore = smtutil::Expression::tuple_constructor(
smtutil::Expression(base->annotation().type),
smtutil::Expression(make_shared<smtutil::SortSort>(smt::smtSort(*baseType)), baseType->toString(true)),
{smtutil::Expression::store(symbArray->elements(), expr(*indexAccess->indexExpression()), toStore), symbArray->length()}
);
indexAccess = base;
+4 -1
View File
@@ -385,7 +385,10 @@ smtutil::Expression zeroValue(frontend::TypePointer const& _type)
solAssert(false, "");
solAssert(zeroArray, "");
return smtutil::Expression::tuple_constructor(smtutil::Expression(_type), vector<smtutil::Expression>{*zeroArray, length});
return smtutil::Expression::tuple_constructor(
smtutil::Expression(std::make_shared<SortSort>(smtSort(*_type)), _type->toString(true)),
vector<smtutil::Expression>{*zeroArray, length}
);
}
solAssert(false, "");