CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
call_stack.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Symbolic Execution
4
5Author: 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
14class call_stackt : public std::vector<framet>
15{
16public:
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
43 {
44 return *(--(--end()));
45 }
46};
47
48#endif // CPROVER_GOTO_SYMEX_CALL_STACK_H
static exprt guard(const exprt::operandst &guards, exprt cond)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
void pop()
Definition call_stack.h:36
const framet & top() const
Definition call_stack.h:23
framet & top()
Definition call_stack.h:17
framet & new_frame(symex_targett::sourcet calling_location, const guardt &guard)
Definition call_stack.h:30
const framet & previous_frame()
Definition call_stack.h:42
Stack frames – these are used for function calls and for exceptions.
Class for stack frames.
#define PRECONDITION(CONDITION)
Definition invariant.h:463
Identifies source in the context of symbolic execution.