CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
symex_assign.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Symbolic Execution
4
5Author: Romain Brenguier, romain.brenguier@diffblue.com
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_GOTO_SYMEX_SYMEX_ASSIGN_H
13#define CPROVER_GOTO_SYMEX_SYMEX_ASSIGN_H
14
15#include <util/expr.h>
16
17#include "shadow_memory.h"
18#include "symex_target.h"
19
21class expr_skeletont;
23class ssa_exprt;
24struct symex_configt;
25
28{
29public:
45
50 void assign_symbol(
51 const ssa_exprt &lhs, // L1
52 const expr_skeletont &full_lhs,
53 const exprt &rhs,
54 const exprt::operandst &guard);
55
56 void assign_rec(
57 const exprt &lhs,
58 const expr_skeletont &full_lhs,
59 const exprt &rhs,
61
62private:
63 std::optional<shadow_memoryt> shadow_memory;
66 const namespacet &ns;
69
71 const ssa_exprt &lhs, // L1
72 const expr_skeletont &full_lhs,
73 const struct_exprt &rhs,
74 const exprt::operandst &guard);
75
77 const ssa_exprt &lhs, // L1
78 const expr_skeletont &full_lhs,
79 const exprt &rhs,
80 const exprt::operandst &guard);
81
84 template <bool use_update>
85 void assign_array(
86 const index_exprt &lhs,
87 const expr_skeletont &full_lhs,
88 const exprt &rhs,
90
93 template <bool use_update>
95 const member_exprt &lhs,
96 const expr_skeletont &full_lhs,
97 const exprt &rhs,
99
100 void assign_if(
101 const if_exprt &lhs,
102 const expr_skeletont &full_lhs,
103 const exprt &rhs,
105
106 void assign_typecast(
107 const typecast_exprt &lhs,
108 const expr_skeletont &full_lhs,
109 const exprt &rhs,
111
113 const byte_extract_exprt &lhs,
114 const expr_skeletont &full_lhs,
115 const exprt &rhs,
117};
118
119#endif // CPROVER_GOTO_SYMEX_SYMEX_ASSIGN_H
static exprt guard(const exprt::operandst &guards, exprt cond)
Expression of type type extracted from some object op starting at position offset (given in number of...
Expression in which some part is missing and can be substituted for another expression.
Base class for all expressions.
Definition expr.h:56
std::vector< exprt > operandst
Definition expr.h:58
Central data structure: state.
The trinary if-then-else operator.
Definition std_expr.h:2497
Array index operator.
Definition std_expr.h:1470
Extract member of struct or union.
Definition std_expr.h:2971
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition namespace.h:91
Expression providing an SSA-renamed symbol of expressions.
Definition ssa_expr.h:17
Struct constructor from list of elements.
Definition std_expr.h:1877
Functor for symex assignment.
void assign_byte_extract(const byte_extract_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard)
void assign_if(const if_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard)
const symex_configt & symex_config
void assign_non_struct_symbol(const ssa_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, const exprt::operandst &guard)
goto_symex_statet & state
void assign_array(const index_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard)
symex_targett & target
void assign_rec(const exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard)
void assign_symbol(const ssa_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, const exprt::operandst &guard)
Record the assignment of value rhs to variable lhs in state and add the equation to target: lhs#{n+1}...
void assign_struct_member(const member_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard)
symex_targett::assignment_typet assignment_type
const namespacet & ns
void assign_from_struct(const ssa_exprt &lhs, const expr_skeletont &full_lhs, const struct_exprt &rhs, const exprt::operandst &guard)
Assign a struct expression to a symbol.
void assign_typecast(const typecast_exprt &lhs, const expr_skeletont &full_lhs, const exprt &rhs, exprt::operandst &guard)
std::optional< shadow_memoryt > shadow_memory
symex_assignt(std::optional< shadow_memoryt > shadow_memory, goto_symex_statet &state, symex_targett::assignment_typet assignment_type, const namespacet &ns, const symex_configt &symex_config, symex_targett &target)
The interface of the target container for symbolic execution to record its symbolic steps into.
Semantic type conversion.
Definition std_expr.h:2073
Symex Shadow Memory Instrumentation.
Configuration used for a symbolic execution.
Generate Equation using Symbolic Execution.