Skip to content
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
4 changes: 2 additions & 2 deletions src/util/expr_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ exprt expr_initializert<nondet>::expr_initializer_rec(
{
constant_exprt code_value(ID_nil, c.type());
code_value.add_source_location()=source_location;
value.copy_to_operands(code_value);
value.add_to_operands(std::move(code_value));
}
else
{
const exprt member = expr_initializer_rec(c.type(), source_location);
if(member.is_nil())
return nil_exprt();

value.copy_to_operands(member);
value.add_to_operands(std::move(member));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void guardt::add(const exprt &expr)
else if(id()!=ID_and)
{
and_exprt a;
a.copy_to_operands(*this);
a.add_to_operands(*this);
*this=a;
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/simplify_expr_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ bool simplify_exprt::simplify_index(exprt &expr)
simplify_node(final_offset);

exprt result(array.id(), expr.type());
result.copy_to_operands(array.op0(), final_offset);
result.add_to_operands(array.op0(), final_offset);
expr.swap(result);

simplify_rec(expr);
Expand Down
2 changes: 1 addition & 1 deletion src/util/simplify_expr_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ bool simplify_exprt::simplify_plus(exprt &expr)
exprt op0 = plus_expr.op0();

if(plus_expr.op0().op1().id() == ID_plus)
op0.op1().copy_to_operands(expr.op1());
op0.op1().add_to_operands(expr.op1());
else
op0.op1()=plus_exprt(op0.op1(), expr.op1());

Expand Down
24 changes: 11 additions & 13 deletions src/util/std_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class code_blockt:public codet

void add(const codet &code)
{
copy_to_operands(code);
add_to_operands(code);
}

void add(codet &&code)
Expand Down Expand Up @@ -219,7 +219,7 @@ class code_assignt:public codet

code_assignt(const exprt &lhs, const exprt &rhs):codet(ID_assign)
{
copy_to_operands(lhs, rhs);
add_to_operands(lhs, rhs);
}

exprt &lhs()
Expand Down Expand Up @@ -284,7 +284,7 @@ class code_declt:public codet

explicit code_declt(const exprt &symbol):codet(ID_decl)
{
copy_to_operands(symbol);
add_to_operands(symbol);
}

exprt &symbol()
Expand Down Expand Up @@ -400,7 +400,7 @@ class code_assumet:public codet

explicit code_assumet(const exprt &expr):codet(ID_assume)
{
copy_to_operands(expr);
add_to_operands(expr);
}

const exprt &assumption() const
Expand Down Expand Up @@ -447,7 +447,7 @@ class code_assertt:public codet

explicit code_assertt(const exprt &expr):codet(ID_assert)
{
copy_to_operands(expr);
add_to_operands(expr);
}

const exprt &assertion() const
Expand Down Expand Up @@ -1002,7 +1002,7 @@ class code_returnt:public codet

explicit code_returnt(const exprt &_op):codet(ID_return)
{
copy_to_operands(_op);
add_to_operands(_op);
}

const exprt &return_value() const
Expand Down Expand Up @@ -1126,7 +1126,7 @@ class code_switch_caset:public codet
code_switch_caset(
const exprt &_case_op, const codet &_code):codet(ID_switch_case)
{
copy_to_operands(_case_op, _code);
add_to_operands(_case_op, _code);
}

bool is_default() const
Expand Down Expand Up @@ -1256,7 +1256,7 @@ class code_asmt:public codet

explicit code_asmt(const exprt &expr):codet(ID_asm)
{
copy_to_operands(expr);
add_to_operands(expr);
}

const irep_idt &get_flavor() const
Expand Down Expand Up @@ -1303,7 +1303,7 @@ class code_expressiont:public codet

explicit code_expressiont(const exprt &expr):codet(ID_expression)
{
copy_to_operands(expr);
add_to_operands(expr);
}

const exprt &expression() const
Expand Down Expand Up @@ -1748,7 +1748,7 @@ class code_landingpadt:public codet
explicit code_landingpadt(const exprt &catch_expr):
codet(ID_exception_landingpad)
{
copy_to_operands(catch_expr);
add_to_operands(catch_expr);
}
const exprt &catch_expr() const
{
Expand Down Expand Up @@ -1825,9 +1825,7 @@ class code_try_catcht:public codet

void add_catch(const code_declt &to_catch, const codet &code_catch)
{
operands().reserve(operands().size()+2);
copy_to_operands(to_catch);
copy_to_operands(code_catch);
add_to_operands(to_catch, code_catch);
}
};

Expand Down
38 changes: 19 additions & 19 deletions src/util/std_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ternary_exprt : public exprt
const typet &_type)
: exprt(_id, _type)
{
copy_to_operands(_op0, _op1, _op2);
add_to_operands(_op0, _op1, _op2);
}

const exprt &op3() const = delete;
Expand Down Expand Up @@ -347,7 +347,7 @@ class unary_exprt:public exprt
const exprt &_op):
exprt(_id, _op.type())
{
copy_to_operands(_op);
add_to_operands(_op);
}

unary_exprt(
Expand All @@ -363,7 +363,7 @@ class unary_exprt:public exprt
const typet &_type):
exprt(_id, _type)
{
copy_to_operands(_op);
add_to_operands(_op);
}

const exprt &op() const
Expand Down Expand Up @@ -644,15 +644,15 @@ class predicate_exprt:public exprt
const irep_idt &_id,
const exprt &_op):exprt(_id, bool_typet())
{
copy_to_operands(_op);
add_to_operands(_op);
}

predicate_exprt(
const irep_idt &_id,
const exprt &_op0,
const exprt &_op1):exprt(_id, bool_typet())
{
copy_to_operands(_op0, _op1);
add_to_operands(_op0, _op1);
}
};

Expand Down Expand Up @@ -758,7 +758,7 @@ class binary_exprt:public exprt
const exprt &_rhs):
exprt(_id, _lhs.type())
{
copy_to_operands(_lhs, _rhs);
add_to_operands(_lhs, _rhs);
}

binary_exprt(
Expand All @@ -768,7 +768,7 @@ class binary_exprt:public exprt
const typet &_type):
exprt(_id, _type)
{
copy_to_operands(_lhs, _rhs);
add_to_operands(_lhs, _rhs);
}

const exprt &op2() const = delete;
Expand Down Expand Up @@ -926,7 +926,7 @@ class multi_ary_exprt:public exprt
const exprt &_rhs):
exprt(_id, _lhs.type())
{
copy_to_operands(_lhs, _rhs);
add_to_operands(_lhs, _rhs);
}

multi_ary_exprt(
Expand All @@ -936,7 +936,7 @@ class multi_ary_exprt:public exprt
const typet &_type):
exprt(_id, _type)
{
copy_to_operands(_lhs, _rhs);
add_to_operands(_lhs, _rhs);
}
};

Expand Down Expand Up @@ -2326,7 +2326,7 @@ class and_exprt:public multi_ary_exprt
and_exprt(const exprt &op0, const exprt &op1, const exprt &op2):
multi_ary_exprt(ID_and, bool_typet())
{
copy_to_operands(op0, op1, op2);
add_to_operands(op0, op1, op2);
}

and_exprt(
Expand Down Expand Up @@ -2448,7 +2448,7 @@ class or_exprt:public multi_ary_exprt
or_exprt(const exprt &op0, const exprt &op1, const exprt &op2):
multi_ary_exprt(ID_or, bool_typet())
{
copy_to_operands(op0, op1, op2);
add_to_operands(op0, op1, op2);
}

or_exprt(
Expand Down Expand Up @@ -2615,7 +2615,7 @@ class bitor_exprt:public multi_ary_exprt
bitor_exprt(const exprt &_op0, const exprt &_op1):
multi_ary_exprt(ID_bitor, _op0.type())
{
copy_to_operands(_op0, _op1);
add_to_operands(_op0, _op1);
}
};

Expand Down Expand Up @@ -2724,7 +2724,7 @@ class bitand_exprt:public multi_ary_exprt
bitand_exprt(const exprt &_op0, const exprt &_op1):
multi_ary_exprt(ID_bitand, _op0.type())
{
copy_to_operands(_op0, _op1);
add_to_operands(_op0, _op1);
}
};

Expand Down Expand Up @@ -3073,7 +3073,7 @@ class extractbits_exprt:public exprt
const exprt &_lower,
const typet &_type):exprt(ID_extractbits, _type)
{
copy_to_operands(_src, _upper, _lower);
add_to_operands(_src, _upper, _lower);
}

extractbits_exprt(
Expand Down Expand Up @@ -3417,7 +3417,7 @@ class with_exprt:public exprt
const exprt &_new_value):
exprt(ID_with, _old.type())
{
copy_to_operands(_old, _where, _new_value);
add_to_operands(_old, _where, _new_value);
}

DEPRECATED("use with_exprt(old, where, new_value) instead")
Expand Down Expand Up @@ -3501,7 +3501,7 @@ class index_designatort:public exprt
explicit index_designatort(const exprt &_index):
exprt(ID_index_designator)
{
copy_to_operands(_index);
add_to_operands(_index);
}

const exprt &index() const
Expand Down Expand Up @@ -3707,7 +3707,7 @@ class array_update_exprt:public exprt
const exprt &_new_value):
exprt(ID_array_update, _array.type())
{
copy_to_operands(_array, _index, _new_value);
add_to_operands(_array, _index, _new_value);
}

array_update_exprt():exprt(ID_array_update)
Expand Down Expand Up @@ -4184,7 +4184,7 @@ class ieee_float_op_exprt:public exprt
const exprt &_rm):
exprt(_id)
{
copy_to_operands(_lhs, _rhs, _rm);
add_to_operands(_lhs, _rhs, _rm);
}

exprt &lhs()
Expand Down Expand Up @@ -4464,7 +4464,7 @@ class concatenation_exprt:public exprt
const exprt &_op0, const exprt &_op1, const typet &_type):
exprt(ID_concatenation, _type)
{
copy_to_operands(_op0, _op1);
add_to_operands(_op0, _op1);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/util/string_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class refined_string_exprt : public struct_exprt,
const typet &type)
: struct_exprt(type)
{
copy_to_operands(_length, _content);
add_to_operands(_length, _content);
}

refined_string_exprt(const exprt &_length, const exprt &_content)
Expand Down