Skip to content

array_of_exprt API #4371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/solvers/flattening/boolbv_array_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bvt boolbvt::convert_array_of(const array_of_exprt &expr)
DATA_INVARIANT(
expr.type().id() == ID_array, "array_of expression shall have array type");

const array_typet &array_type=to_array_type(expr.type());
const array_typet &array_type = expr.type();

if(is_unbounded_array(array_type))
return conversion_failed(expr);
Expand Down
13 changes: 9 additions & 4 deletions src/util/std_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -1585,14 +1585,19 @@ inline index_exprt &to_index_expr(exprt &expr)
class array_of_exprt:public unary_exprt
{
public:
DEPRECATED(SINCE(2018, 9, 21, "use array_of_exprt(what, type) instead"))
array_of_exprt():unary_exprt(ID_array_of)
explicit array_of_exprt(exprt _what, array_typet _type)
: unary_exprt(ID_array_of, std::move(_what), std::move(_type))
{
}

explicit array_of_exprt(exprt _what, array_typet _type)
: unary_exprt(ID_array_of, std::move(_what), std::move(_type))
const array_typet &type() const
{
return static_cast<const array_typet &>(unary_exprt::type());
}

array_typet &type()
{
return static_cast<array_typet &>(unary_exprt::type());
}

exprt &what()
Expand Down