cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
symex_set_return_value.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Symbolic Execution of ANSI-C
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
11
12
#include "
goto_symex.h
"
13
14
void
goto_symext::symex_set_return_value
(
15
statet
&state,
16
const
exprt
&return_value)
17
{
18
// we must be inside a function that was called
19
PRECONDITION
(!state.
call_stack
().empty());
20
21
framet
&frame = state.
call_stack
().
top
();
22
if
(frame.
return_value_symbol
.has_value())
23
{
24
symex_assign
(state, frame.
return_value_symbol
.value(), return_value);
25
}
26
}
call_stackt::top
framet & top()
Definition
call_stack.h:17
exprt
Base class for all expressions.
Definition
expr.h:57
framet
Stack frames – these are used for function calls and for exceptions.
Definition
solver_types.h:41
framet::return_value_symbol
std::optional< symbol_exprt > return_value_symbol
Definition
frame.h:39
goto_symex_statet::call_stack
call_stackt & call_stack()
Definition
goto_symex_state.h:147
goto_symext::statet
goto_symex_statet statet
A type abbreviation for goto_symex_statet.
Definition
goto_symex.h:41
goto_symext::symex_set_return_value
void symex_set_return_value(statet &state, const exprt &return_value)
Symbolically execute a SET_RETURN_VALUE instruction.
Definition
symex_set_return_value.cpp:14
goto_symext::symex_assign
void symex_assign(statet &state, const exprt &lhs, const exprt &rhs)
Symbolically execute an ASSIGN instruction or simulate such an execution for a synthetic assignment.
Definition
goto_symex.cpp:40
goto_symex.h
Symbolic Execution.
PRECONDITION
#define PRECONDITION(CONDITION)
Definition
invariant.h:463
goto-symex
symex_set_return_value.cpp
Generated by
1.17.0