CBMC
|
Statement List Language Type Checking. More...
#include "statement_list_typecheck.h"
#include <util/cprover_prefix.h>
#include <util/message.h>
#include <util/namespace.h>
#include <util/pointer_expr.h>
#include <util/simplify_expr.h>
#include <util/std_code.h>
#include <util/symbol_table_base.h>
#include <goto-programs/goto_instruction_code.h>
#include "converters/statement_list_types.h"
Go to the source code of this file.
Macros | |
#define | STATEMENT_LIST_PTR_WIDTH 64 |
Size of pointers in Siemens TIA. More... | |
#define | TYPECHECK_ERROR 0 |
#define | DATA_BLOCK_PARAMETER_NAME "data_block" |
Artificial name for the data block interface of a function block. More... | |
#define | DATA_BLOCK_TYPE_POSTFIX "_db" |
Postfix for the type of a data block. More... | |
#define | CPROVER_ASSERT CPROVER_PREFIX "assert" |
Name of the CBMC assert function. More... | |
#define | CPROVER_ASSUME CPROVER_PREFIX "assume" |
Name of the CBMC assume function. More... | |
#define | CPROVER_TEMP_RLO CPROVER_PREFIX "temp_rlo" |
Name of the RLO symbol used in some operations. More... | |
Functions | |
static code_typet::parametert | create_data_block_parameter (const struct_typet &data_block_type, const irep_idt &function_block_name) |
Creates the artificial data block parameter with a generic name and the specified type. More... | |
bool | statement_list_typecheck (const statement_list_parse_treet &parse_tree, symbol_table_baset &symbol_table, const std::string &module, message_handlert &message_handler) |
Create a new statement_list_typecheckt object and perform a type check to fill the symbol table. More... | |
Variables | |
static const std::vector< irep_idt > | logic_sequence_initializers |
static const std::vector< irep_idt > | logic_sequence_terminators |
Statement List Language Type Checking.
Definition in file statement_list_typecheck.cpp.
#define CPROVER_ASSERT CPROVER_PREFIX "assert" |
Name of the CBMC assert function.
Definition at line 35 of file statement_list_typecheck.cpp.
#define CPROVER_ASSUME CPROVER_PREFIX "assume" |
Name of the CBMC assume function.
Definition at line 37 of file statement_list_typecheck.cpp.
#define CPROVER_TEMP_RLO CPROVER_PREFIX "temp_rlo" |
Name of the RLO symbol used in some operations.
Definition at line 39 of file statement_list_typecheck.cpp.
#define DATA_BLOCK_PARAMETER_NAME "data_block" |
Artificial name for the data block interface of a function block.
Definition at line 31 of file statement_list_typecheck.cpp.
#define DATA_BLOCK_TYPE_POSTFIX "_db" |
Postfix for the type of a data block.
Definition at line 33 of file statement_list_typecheck.cpp.
#define STATEMENT_LIST_PTR_WIDTH 64 |
Size of pointers in Siemens TIA.
Definition at line 27 of file statement_list_typecheck.cpp.
#define TYPECHECK_ERROR 0 |
Definition at line 29 of file statement_list_typecheck.cpp.
|
static |
Creates the artificial data block parameter with a generic name and the specified type.
data_block_type | Type of the data block. |
function_block_name | Name of the function block to which this data block belongs. |
Definition at line 70 of file statement_list_typecheck.cpp.
bool statement_list_typecheck | ( | const statement_list_parse_treet & | parse_tree, |
symbol_table_baset & | symbol_table, | ||
const std::string & | module, | ||
message_handlert & | message_handler | ||
) |
Create a new statement_list_typecheckt object and perform a type check to fill the symbol table.
parse_tree | Parse tree generated by parsing a Statement List file. | |
[out] | symbol_table | Object that shall be filled by this function. If the symbol table is not empty when calling this function, its contents are merged with the new entries. |
module | Name of the file that has been parsed. | |
message_handler | Used to provide debug information and error messages. |
Definition at line 82 of file statement_list_typecheck.cpp.
|
static |
Definition at line 41 of file statement_list_typecheck.cpp.
|
static |
Definition at line 56 of file statement_list_typecheck.cpp.