Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Core.Alarm
Alarms - issues found by the analyzer in a program
During the analysis, domains can perform checks to verify whether some property of interest is preserved. Domains declare the list of checks that they are responsible for in their header, and can generate 4 types of diagnostics for a given check and regarding a given location range:
Safe indicates that the property of interest is preserved for all execution paths reaching the check location.
Error represent issues that are proven true alarms for all execution paths.
Warning is used for potential alarms that maybe infeasible in some execution paths.
Unreachable indicates that the check location can't be reached in any execution path.
Checks
**********
Domains can add new checks by extending the type check and registering them using register_check. Note that checks should be simple variant constructs without any argument.
Alarms are issues related to a check in a given range and a given callstack. Domains can add new kinds of alarms to store information related to the issue, such suspect values that raised the alarm. Nevertheless, domains can use the generic alarm A_generic of check if they don't have addition static information to attach to the alarm.
Alarms are organized in a report that maps each range and each check to a diagnostic. A report also contains the set of soundness assumptions made by the domains.
add_alarm a r adds alarm a to a report r. If a diagnostic exists for the same range and the same check as a, join_diagnostic is used to join it with an error diagnostic containing a.
add_diagnostic d r adds diagnostic d to r. If a diagnostic exists for the same range and the same check as d, join_diagnostic is used to join it with d.