File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -1728,6 +1728,22 @@ class array_list_exprt : public multi_ary_exprt
1728
1728
: multi_ary_exprt(ID_array_list, std::move(_operands), _type)
1729
1729
{
1730
1730
}
1731
+
1732
+ const array_typet &type () const
1733
+ {
1734
+ return static_cast <const array_typet &>(multi_ary_exprt::type ());
1735
+ }
1736
+
1737
+ array_typet &type ()
1738
+ {
1739
+ return static_cast <array_typet &>(multi_ary_exprt::type ());
1740
+ }
1741
+
1742
+ // / add an index/value pair
1743
+ void add (exprt index, exprt value)
1744
+ {
1745
+ add_to_operands (std::move (index), std::move (value));
1746
+ }
1731
1747
};
1732
1748
1733
1749
template <>
@@ -1741,6 +1757,22 @@ inline void validate_expr(const array_list_exprt &value)
1741
1757
PRECONDITION (value.operands ().size () % 2 == 0 );
1742
1758
}
1743
1759
1760
+ inline const array_list_exprt &to_array_list_expr (const exprt &expr)
1761
+ {
1762
+ PRECONDITION (can_cast_expr<array_list_exprt>(expr));
1763
+ auto &ret = static_cast <const array_list_exprt &>(expr);
1764
+ validate_expr (ret);
1765
+ return ret;
1766
+ }
1767
+
1768
+ inline array_list_exprt &to_array_list_expr (exprt &expr)
1769
+ {
1770
+ PRECONDITION (can_cast_expr<array_list_exprt>(expr));
1771
+ auto &ret = static_cast <array_list_exprt &>(expr);
1772
+ validate_expr (ret);
1773
+ return ret;
1774
+ }
1775
+
1744
1776
// / \brief Vector constructor from list of elements
1745
1777
class vector_exprt : public multi_ary_exprt
1746
1778
{
You can’t perform that action at this time.
0 commit comments