1
1
/* ******************************************************************\
2
2
3
- Module: Nondeterministic initialization of certain global scope
4
- variables
3
+ Module: Nondeterministically initializes global scope variables, except for
4
+ constants (such as string literals, final fields) and internal variables
5
+ (such as CPROVER and symex variables, language specific internal
6
+ variables).
5
7
6
8
Author: Daniel Kroening, Michael Tautschnig
7
9
@@ -10,7 +12,7 @@ Date: November 2011
10
12
\*******************************************************************/
11
13
12
14
// / \file
13
- // / Nondeterministic initialization of certain global scope variables
15
+ // / Nondeterministic initialization of global scope variables
14
16
15
17
#include " nondet_static.h"
16
18
@@ -50,7 +52,13 @@ bool is_nondet_initializable_static(
50
52
!is_constant_or_has_constant_components (ns.lookup (id).type , ns);
51
53
}
52
54
53
-
55
+ // / Nondeterministically initializes global scope variables in a goto-function.
56
+ // / Iterates over instructions in the specified function and replaces all values
57
+ // / assigned to nondet-initializable static variables with nondeterministic
58
+ // / values.
59
+ // / \param ns Namespace for resolving type information.
60
+ // / \param [out] goto_functions Existing goto-functions to be updated.
61
+ // / \param fct_name Name of the goto-function to be updated.
54
62
void nondet_static (
55
63
const namespacet &ns,
56
64
goto_functionst &goto_functions,
@@ -94,6 +102,10 @@ void nondet_static(
94
102
}
95
103
}
96
104
105
+ // / Nondeterministically initializes global scope variables in
106
+ // / CPROVER_initialize function.
107
+ // / \param ns Namespace for resolving type information.
108
+ // / \param [out] goto_functions Existing goto-functions to be updated.
97
109
void nondet_static (
98
110
const namespacet &ns,
99
111
goto_functionst &goto_functions)
@@ -104,6 +116,11 @@ void nondet_static(
104
116
goto_functions.update ();
105
117
}
106
118
119
+ // / Main entry point of the module. Nondeterministically initializes global
120
+ // / scope variables, except for constants (such as string literals, final
121
+ // / fields) and internal variables (such as CPROVER and symex variables,
122
+ // / language specific internal variables).
123
+ // / \param [out] goto_model Existing goto-model to be updated.
107
124
void nondet_static (goto_modelt &goto_model)
108
125
{
109
126
const namespacet ns (goto_model.symbol_table );
0 commit comments