|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
Go to the source code of this file.
Functions | |
| bool | is_binary_arith (const expr2tc &expr) |
| The guards the IREP2 adjust arm tables dispatch on. | |
| bool | is_complex_unary (const expr2tc &expr) |
| -z and GNU ~z (conjugation) are the only unary operators clang leaves carrying a complex type. | |
| bool | is_arith_or_bitwise (const expr2tc &expr) |
| The operators clang_c_adjust routes through adjust_expr_binary_arithmetic. | |
| bool | is_shift (const expr2tc &expr) |
| The shifts clang_c_adjust routes through adjust_expr_shifts. | |
| bool | is_statement_with_condition (const expr2tc &expr) |
| The statements whose controlling expression clang_c_adjust converts to bool (adjust_ifthenelse, adjust_while, adjust_for). | |
| bool | is_relational (const expr2tc &expr) |
| The comparisons clang_c_adjust routes through adjust_expr_rel. | |
| bool | is_short_circuit (const expr2tc &expr) |
| The short-circuit operators, whose operands goto_convert's lowering rejects unless they are boolean. | |
| bool | is_reference_type (const type2tc &type) |
| A C++ reference: IREP2 spells one as a pointer carrying a reference kind (scope-clang-cpp-irep2.md §2.5), so a value of this type has to be read through before it is used as one. | |
| bool | is_increment_sideeffect (const expr2tc &expr) |
| x++, ++x, x--, --x. | |
| bool | is_alloc_sideeffect (const expr2tc &expr) |
| An allocation side effect: new, new[], delete, delete[]. | |
| bool | is_call_site (const expr2tc &expr) |
| Both spellings of a call: a bare f(x); statement is a sideeffect2t of kind function_call rather than a code_function_call2t. | |
| bool | is_promotable_unary (const expr2tc &expr) |
| The unary operators promote_unary_bool_operand claims: the complement of is_complex_unary within the family. | |
| bool | is_derived_to_base_cast (const expr2tc &expr) |
| A cast the frontend marked as a derived->base conversion it could not route through a "@base@" component, or the wrapper migrate_expr builds when the marker sat on a node that is not a cast (#7025). | |
| bool | is_base_to_derived_cast (const expr2tc &expr) |
| The mirror: a downcast whose operand points at a base subobject (#1866). | |
An allocation side effect: new, new[], delete, delete[].
Its arguments are carriage – the destructor call, a replaced operator new/delete – rather than program operands, because the legacy pass keeps them in named subs where no walk reaches them.
The operators clang_c_adjust routes through adjust_expr_binary_arithmetic.
The mirror: a downcast whose operand points at a base subobject (#1866).
The guards the IREP2 adjust arm tables dispatch on.
Shared rather than file-local because a second frontend's table names the same ones (docs/roadmap/scope-clang-cpp-irep2.md §3.1); they read only the node. The operators C admits over a complex operand: mod and the bitwise ones are not among them, and clang_c_adjust aborts rather than lowering those.
Both spellings of a call: a bare f(x); statement is a sideeffect2t of kind function_call rather than a code_function_call2t.
-z and GNU ~z (conjugation) are the only unary operators clang leaves carrying a complex type.
A cast the frontend marked as a derived->base conversion it could not route through a "@base@" component, or the wrapper migrate_expr builds when the marker sat on a node that is not a cast (#7025).
x++, ++x, x--, --x.
Its operand is updated in place, so a reference-typed one has to be read through first – clang_c_adjust adjusts references here for the same reason (scope-clang-cpp-irep2.md §3.16).
The unary operators promote_unary_bool_operand claims: the complement of is_complex_unary within the family.
The chain spelled this exclusion as the else of is_complex_unary, which is a strict subset of the same family; stating it as a predicate holds in both the rewriting and the declining case for the same reason, rather than relying on the first arm having mutated the node out of the second's reach.
A C++ reference: IREP2 spells one as a pointer carrying a reference kind (scope-clang-cpp-irep2.md §2.5), so a value of this type has to be read through before it is used as one.
The comparisons clang_c_adjust routes through adjust_expr_rel.
IREP2 already types these bool, so only the operand half of that arm ports.
The shifts clang_c_adjust routes through adjust_expr_shifts.
They are not in is_arith_or_bitwise: C11 6.5.7p3 promotes each operand on its own and takes the result type from the left, where the usual arithmetic conversions would bring the two to a common type.
The short-circuit operators, whose operands goto_convert's lowering rejects unless they are boolean.
The statements whose controlling expression clang_c_adjust converts to bool (adjust_ifthenelse, adjust_while, adjust_for).
switch is not among them: its selector is an integer.