@@ -973,22 +973,32 @@ template<> inline bool can_cast_expr<binary_relation_exprt>(const exprt &base)
973
973
class multi_ary_exprt :public exprt
974
974
{
975
975
public:
976
- DEPRECATED (" use multi_ary_exprt(id, type) instead" )
976
+ DEPRECATED (" use multi_ary_exprt(id, op, type) instead" )
977
977
multi_ary_exprt ()
978
978
{
979
979
}
980
980
981
- DEPRECATED (" use multi_ary_exprt(id, type) instead" )
981
+ DEPRECATED (" use multi_ary_exprt(id, op, type) instead" )
982
982
explicit multi_ary_exprt (const irep_idt &_id):exprt(_id)
983
983
{
984
984
}
985
985
986
+ DEPRECATED (" use multi_ary_exprt(id, op, type) instead" )
986
987
multi_ary_exprt (
987
988
const irep_idt &_id,
988
989
const typet &_type):exprt(_id, _type)
989
990
{
990
991
}
991
992
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
+
992
1002
multi_ary_exprt (
993
1003
const exprt &_lhs,
994
1004
const irep_idt &_id,
@@ -4531,31 +4541,33 @@ inline void validate_expr(const function_application_exprt &value)
4531
4541
validate_operands (value, 2 , " Function application must have two operands" );
4532
4542
}
4533
4543
4534
-
4535
4544
// / \brief Concatenation of bit-vector operands
4536
4545
// /
4537
4546
// / 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,
4540
4548
// / i.e., most-significant operands come first.
4541
- class concatenation_exprt : public exprt
4549
+ class concatenation_exprt : public multi_ary_exprt
4542
4550
{
4543
4551
public:
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)
4546
4554
{
4547
4555
}
4548
4556
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)
4552
4560
{
4553
4561
}
4554
4562
4555
4563
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)
4557
4570
{
4558
- add_to_operands (_op0, _op1);
4559
4571
}
4560
4572
};
4561
4573
0 commit comments