|
CBMC
|
#include "expr2statement_list.h"#include <ansi-c/expr2c.h>#include <util/namespace.h>#include <util/std_expr.h>#include <util/suffix.h>#include <util/symbol.h>#include <cstring>#include <iostream>
Include dependency graph for expr2statement_list.cpp:Go to the source code of this file.
Macros | |
| #define | AND 'A' |
| STL code for an AND instruction. More... | |
| #define | OR 'O' |
| STL code for an OR instruction. More... | |
| #define | XOR 'X' |
| STL code for a XOR instruction. More... | |
| #define | NOT_POSTFIX 'N' |
| Postfix for any negated boolean instruction. More... | |
| #define | NOT "NOT" |
| STL code for a NOT instruction. More... | |
| #define | OPERAND_SEPARATOR ' ' |
| Separator between the instruction code and it's operand. More... | |
| #define | LINE_SEPARATOR ";\n" |
| Separator between the end of an instruction and the next one. More... | |
| #define | NESTING_OPEN_LINE_SEPARATOR "(;\n" |
| Separator for the end of an instruction that introduces a new layer of nesting. More... | |
| #define | NESTING_CLOSED_LINE_SEPARATOR ");\n" |
| Separator for the end of an instruction that closes a nesting layer. More... | |
| #define | REFERENCE_FLAG '#' |
| Prefix for the reference to any variable. More... | |
| #define | SCOPE_SEPARATOR "::" |
| CBMC-internal separator for variable scopes. More... | |
Functions | |
| static std::vector< exprt > | instrument_equal_operands (const exprt &lhs, const exprt &rhs) |
| Modifies the parameters of a binary equal expression with the help of its symmetry properties. More... | |
| static bool | is_not_bool (const exprt &expr) |
| Checks if the expression or one of its parameters is not of type bool. More... | |
| std::string | expr2stl (const exprt &expr, const namespacet &ns) |
| Converts a given expression to human-readable STL code. More... | |
| std::string | type2stl (const typet &type, const namespacet &ns) |
| Converts a given type to human-readable STL code. More... | |
| #define AND 'A' |
STL code for an AND instruction.
Definition at line 22 of file expr2statement_list.cpp.
| #define LINE_SEPARATOR ";\n" |
Separator between the end of an instruction and the next one.
Definition at line 40 of file expr2statement_list.cpp.
| #define NESTING_CLOSED_LINE_SEPARATOR ");\n" |
Separator for the end of an instruction that closes a nesting layer.
Also known as the NESTING CLOSED instruction.
Definition at line 48 of file expr2statement_list.cpp.
| #define NESTING_OPEN_LINE_SEPARATOR "(;\n" |
Separator for the end of an instruction that introduces a new layer of nesting.
Definition at line 44 of file expr2statement_list.cpp.
| #define NOT "NOT" |
STL code for a NOT instruction.
Definition at line 34 of file expr2statement_list.cpp.
| #define NOT_POSTFIX 'N' |
Postfix for any negated boolean instruction.
Definition at line 31 of file expr2statement_list.cpp.
| #define OPERAND_SEPARATOR ' ' |
Separator between the instruction code and it's operand.
Definition at line 37 of file expr2statement_list.cpp.
| #define OR 'O' |
STL code for an OR instruction.
Definition at line 25 of file expr2statement_list.cpp.
| #define REFERENCE_FLAG '#' |
Prefix for the reference to any variable.
Definition at line 51 of file expr2statement_list.cpp.
| #define SCOPE_SEPARATOR "::" |
CBMC-internal separator for variable scopes.
Definition at line 54 of file expr2statement_list.cpp.
| #define XOR 'X' |
STL code for a XOR instruction.
Definition at line 28 of file expr2statement_list.cpp.
| std::string expr2stl | ( | const exprt & | expr, |
| const namespacet & | ns | ||
| ) |
Converts a given expression to human-readable STL code.
| expr | Expression to be converted. |
| ns | Namespace of the TIA application. |
Definition at line 108 of file expr2statement_list.cpp.
Modifies the parameters of a binary equal expression with the help of its symmetry properties.
This function basically converts the operands to operands of a XOR expression so that the whole expression can be treated as such. This can reduce complexity in some cases.
| lhs | Left side of the binary expression. |
| rhs | Right side of the binary expression. |
Definition at line 64 of file expr2statement_list.cpp.
|
static |
Checks if the expression or one of its parameters is not of type bool.
| expr | Expression to verify. |
Definition at line 98 of file expr2statement_list.cpp.
| std::string type2stl | ( | const typet & | type, |
| const namespacet & | ns | ||
| ) |
Converts a given type to human-readable STL code.
| type | Type to be converted. |
| ns | Namespace of the TIA application. |
Definition at line 115 of file expr2statement_list.cpp.