@@ -28,9 +28,10 @@ class symex_targett;
28
28
// / Note that field sensitivity is not applied as a single pass over the
29
29
// / whole goto program but instead applied as the symbolic execution unfolds.
30
30
// /
31
- // / On a high level, field sensitivity replaces member operators with atomic
32
- // / symbols representing a field when possible. In cases where this is not
33
- // / immediately possible, like struct assignments, some things need to be added.
31
+ // / On a high level, field sensitivity replaces member operators, and array
32
+ // / accesses with atomic symbols representing a field when possible.
33
+ // / In cases where this is not immediately possible, like struct assignments,
34
+ // / some things need to be added.
34
35
// / The possible cases are described below.
35
36
// /
36
37
// / ### Member access
@@ -52,6 +53,30 @@ class symex_targett;
52
53
// / `struct_expr..field_name1 = other_struct..field_name1;`
53
54
// / `struct_expr..field_name2 = other_struct..field_name2;` etc.
54
55
// / See \ref field_sensitivityt::field_assignments.
56
+ // /
57
+ // / ### Array access
58
+ // / An index expression `array[index]` when index is constant and array has
59
+ // / constant size is replaced by the symbol `array[[index]]`; note the use
60
+ // / of `[[` and `]]` to visually distinguish the symbol from the index
61
+ // / expression.
62
+ // / When `index` is not a constant, `array[index]` is replaced by
63
+ // / `{array[[0]]; array[[1]]; …index]`.
64
+ // / Note that this process does not apply to arrays whose size is not constant,
65
+ // / and arrays whose size exceed the bound \ref MAX_FIELD_SENSITIVITY_ARRAY_SIZE
66
+ // / See \ref field_sensitivityt::apply.
67
+ // /
68
+ // / ### Symbols representing arrays
69
+ // / In an rvalue, a symbol `array` which has array type will be replaced by
70
+ // / `{array[[0]]; array[[1]]; …}[index]`.
71
+ // / See \ref field_sensitivityt::get_fields.
72
+ // /
73
+ // / ### Assignment to an array
74
+ // / When the array symbol is on the left-hand-side, for instance for
75
+ // / an assignment `array = other_array`, the assignment is replaced by a
76
+ // / sequence of assignments:
77
+ // / `array[[0]] = other_array[[0]]`;
78
+ // / `array[[1]] = other_array[[1]]`; etc.
79
+ // / See \ref field_sensitivityt::field_assignments.
55
80
class field_sensitivityt
56
81
{
57
82
public:
0 commit comments