Skip to content

add mulit-ary constructor for xor_exprt, bitxor_exprt, bitand_exprt, … #8529

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 1 commit into from
Dec 16, 2024
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
15 changes: 15 additions & 0 deletions src/util/bitvector_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ class bitor_exprt : public multi_ary_exprt
: multi_ary_exprt(_op0, ID_bitor, std::move(_op1), _op0.type())
{
}

bitor_exprt(exprt::operandst _operands, typet _type)
: multi_ary_exprt(ID_bitor, std::move(_operands), std::move(_type))
{
}
};

template <>
Expand Down Expand Up @@ -163,6 +168,11 @@ class bitxor_exprt : public multi_ary_exprt
: multi_ary_exprt(std::move(_op0), ID_bitxor, std::move(_op1))
{
}

bitxor_exprt(exprt::operandst _operands, typet _type)
: multi_ary_exprt(ID_bitxor, std::move(_operands), std::move(_type))
{
}
};

template <>
Expand Down Expand Up @@ -233,6 +243,11 @@ class bitand_exprt : public multi_ary_exprt
: multi_ary_exprt(_op0, ID_bitand, std::move(_op1), _op0.type())
{
}

bitand_exprt(exprt::operandst _operands, typet _type)
: multi_ary_exprt(ID_bitand, std::move(_operands), std::move(_type))
{
}
};

template <>
Expand Down
5 changes: 5 additions & 0 deletions src/util/std_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,11 @@ class xor_exprt:public multi_ary_exprt
: multi_ary_exprt(std::move(_op0), ID_xor, std::move(_op1), bool_typet())
{
}

explicit xor_exprt(exprt::operandst _operands)
: multi_ary_exprt(ID_xor, std::move(_operands), bool_typet())
{
}
};

template <>
Expand Down
Loading