|
7 | 7 | \*******************************************************************/
|
8 | 8 |
|
9 | 9 | /// \file
|
10 |
| -/// Interval Analysis |
| 10 | +/// Interval Analysis -- implements the functionality necessary for performing |
| 11 | +/// abstract interpretation over interval domain for goto programs. The result |
| 12 | +/// of the analysis is an instrumented program. |
11 | 13 |
|
12 | 14 | #include "interval_analysis.h"
|
13 | 15 |
|
14 | 16 | #include <util/find_symbols.h>
|
15 | 17 |
|
16 | 18 | #include "interval_domain.h"
|
17 | 19 |
|
| 20 | +/// Instruments all "post-branch" instructions with assumptions about variable |
| 21 | +/// intervals. For each such instruction, the function evaluates all variables |
| 22 | +/// referenced within the input goto_function as intervals, transforms these |
| 23 | +/// intervals into expressions and instruments the instruction with their |
| 24 | +/// conjunction. |
| 25 | +/// Example: interval [5,10] (for variable "x") translates into conjunction |
| 26 | +/// 5 <= x && x <= 10. |
| 27 | +/// \param interval_analysis Interval domain to be used for variable evaluation. |
| 28 | +/// \param goto_function [out] Goto function to be analysed and instrumented. |
18 | 29 | void instrument_intervals(
|
19 | 30 | const ait<interval_domaint> &interval_analysis,
|
20 | 31 | goto_functionst::goto_functiont &goto_function)
|
@@ -76,6 +87,9 @@ void instrument_intervals(
|
76 | 87 | }
|
77 | 88 | }
|
78 | 89 |
|
| 90 | +/// Initialises the abstract interpretation over interval domain and |
| 91 | +/// instruments instructions using interval assumptions. |
| 92 | +/// \param goto_model [out] Input code as goto_model. |
79 | 93 | void interval_analysis(goto_modelt &goto_model)
|
80 | 94 | {
|
81 | 95 | ait<interval_domaint> interval_analysis;
|
|
0 commit comments