CBMC
call_stack.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Symbolic Execution
4
5
Author: Romain Brenguier, romain.brenguier@diffblue.com
6
7
\*******************************************************************/
8
9
#ifndef CPROVER_GOTO_SYMEX_CALL_STACK_H
10
#define CPROVER_GOTO_SYMEX_CALL_STACK_H
11
12
#include "
frame.h
"
13
14
class
call_stackt
:
public
std::vector<framet>
15
{
16
public
:
17
framet
&
top
()
18
{
19
PRECONDITION
(!empty());
20
return
back();
21
}
22
23
const
framet
&
top
()
const
24
{
25
PRECONDITION
(!empty());
26
return
back();
27
}
28
29
framet
&
30
new_frame
(
symex_targett::sourcet
calling_location,
const
guardt
&guard)
31
{
32
emplace_back(calling_location, guard);
33
return
back();
34
}
35
36
void
pop
()
37
{
38
PRECONDITION
(!empty());
39
pop_back();
40
}
41
42
const
framet
&
previous_frame
()
43
{
44
return
*(--(--end()));
45
}
46
};
47
48
#endif // CPROVER_GOTO_SYMEX_CALL_STACK_H
guard_exprt
Definition:
guard_expr.h:23
call_stackt::pop
void pop()
Definition:
call_stack.h:36
call_stackt
Definition:
call_stack.h:14
call_stackt::new_frame
framet & new_frame(symex_targett::sourcet calling_location, const guardt &guard)
Definition:
call_stack.h:30
call_stackt::top
framet & top()
Definition:
call_stack.h:17
call_stackt::top
const framet & top() const
Definition:
call_stack.h:23
PRECONDITION
#define PRECONDITION(CONDITION)
Definition:
invariant.h:463
framet
Stack frames – these are used for function calls and for exceptions.
Definition:
frame.h:21
frame.h
call_stackt::previous_frame
const framet & previous_frame()
Definition:
call_stack.h:42
symex_targett::sourcet
Identifies source in the context of symbolic execution.
Definition:
symex_target.h:36
src
goto-symex
call_stack.h
Generated by
1.8.17