@@ -166,4 +166,30 @@ make_byte_update(const exprt &_op, const exprt &_offset, const exprt &_value);
166166// / update expression.
167167bool has_byte_operator (const exprt &src);
168168
169+ // / Rewrite a byte extract expression to more fundamental operations.
170+ // / \param src: Byte extract expression
171+ // / \param ns: Namespace
172+ // / \return Semantically equivalent expression such that the top-level
173+ // / expression no longer is a \ref byte_extract_exprt or
174+ // / \ref byte_update_exprt. Use \ref lower_byte_operators to also remove all
175+ // / byte operators from any operands of \p src.
176+ exprt lower_byte_extract (const byte_extract_exprt &src, const namespacet &ns);
177+
178+ // / Rewrite a byte update expression to more fundamental operations.
179+ // / \param src: Byte update expression
180+ // / \param ns: Namespace
181+ // / \return Semantically equivalent expression such that the top-level
182+ // / expression no longer is a \ref byte_extract_exprt or
183+ // / \ref byte_update_exprt. Use \ref lower_byte_operators to also remove all
184+ // / byte operators from any operands of \p src.
185+ exprt lower_byte_update (const byte_update_exprt &src, const namespacet &ns);
186+
187+ // / Rewrite an expression possibly containing byte-extract or -update
188+ // / expressions to more fundamental operations.
189+ // / \param src: Input expression
190+ // / \param ns: Namespace
191+ // / \return Semantically equivalent expression that does not contain any \ref
192+ // / byte_extract_exprt or \ref byte_update_exprt.
193+ exprt lower_byte_operators (const exprt &src, const namespacet &ns);
194+
169195#endif // CPROVER_UTIL_BYTE_OPERATORS_H
0 commit comments