@@ -973,22 +973,32 @@ template<> inline bool can_cast_expr<binary_relation_exprt>(const exprt &base)
973973class multi_ary_exprt :public exprt
974974{
975975public:
976- DEPRECATED (" use multi_ary_exprt(id, type) instead" )
976+ DEPRECATED (" use multi_ary_exprt(id, op, type) instead" )
977977 multi_ary_exprt ()
978978 {
979979 }
980980
981- DEPRECATED (" use multi_ary_exprt(id, type) instead" )
981+ DEPRECATED (" use multi_ary_exprt(id, op, type) instead" )
982982 explicit multi_ary_exprt (const irep_idt &_id):exprt(_id)
983983 {
984984 }
985985
986+ DEPRECATED (" use multi_ary_exprt(id, op, type) instead" )
986987 multi_ary_exprt (
987988 const irep_idt &_id,
988989 const typet &_type):exprt(_id, _type)
989990 {
990991 }
991992
993+ multi_ary_exprt (
994+ const irep_idt &_id,
995+ operandst &&_operands,
996+ const typet &_type)
997+ : exprt(_id, _type)
998+ {
999+ operands () = std::move (_operands);
1000+ }
1001+
9921002 multi_ary_exprt (
9931003 const exprt &_lhs,
9941004 const irep_idt &_id,
@@ -4531,31 +4541,33 @@ inline void validate_expr(const function_application_exprt &value)
45314541 validate_operands (value, 2 , " Function application must have two operands" );
45324542}
45334543
4534-
45354544// / \brief Concatenation of bit-vector operands
45364545// /
45374546// / This expression takes any number of operands
4538- // / (a restriction to make this binary will happen in the future).
4539- // / The ordering of the operands is the same as in the _new_ SMT 1.x standard,
4547+ // / The ordering of the operands is the same as in the SMT-LIB 2 standard,
45404548// / i.e., most-significant operands come first.
4541- class concatenation_exprt : public exprt
4549+ class concatenation_exprt : public multi_ary_exprt
45424550{
45434551public:
4544- DEPRECATED (" use concatenation_exprt(op0, op1 , type) instead" )
4545- concatenation_exprt ():exprt (ID_concatenation)
4552+ DEPRECATED (" use concatenation_exprt(op , type) instead" )
4553+ concatenation_exprt () : multi_ary_exprt (ID_concatenation)
45464554 {
45474555 }
45484556
4549- DEPRECATED (" use concatenation_exprt(op0, op1 , type) instead" )
4550- explicit concatenation_exprt (const typet &_type):
4551- exprt (ID_concatenation, _type)
4557+ DEPRECATED (" use concatenation_exprt(op , type) instead" )
4558+ explicit concatenation_exprt (const typet &_type)
4559+ : multi_ary_exprt (ID_concatenation, _type)
45524560 {
45534561 }
45544562
45554563 concatenation_exprt (const exprt &_op0, const exprt &_op1, const typet &_type)
4556- : exprt(ID_concatenation, _type)
4564+ : multi_ary_exprt(_op0, ID_concatenation, _op1, _type)
4565+ {
4566+ }
4567+
4568+ concatenation_exprt (operandst &&_operands, const typet &_type)
4569+ : multi_ary_exprt(ID_concatenation, std::move(_operands), _type)
45574570 {
4558- add_to_operands (_op0, _op1);
45594571 }
45604572};
45614573
0 commit comments