Astrée has been extended to perform a precise and sound analysis of asynchronous programs. All possible interactions between parallel tasks are now considered. All potential data races and lock/unlock problems are detected. ARINC 653 and OSEK applications can be analyzed fully automatically taking the OS behavior into account.
TerminateTask()
on a task with unreleased resources)__astree_create_process
__astree_start_process
__astree_lock_mutex
__astree_unlock_mutex
warn-on-data-race=[yes|no]
warns about potential data races (enabled by default)log-parallel-iter=[yes|no]
prints extra progress information when iterating over asynchronous processesdump-data-dictionary=[yes|no]
prints the final ranges of global variables and statistics about shared memory usagedump-process-dataflow=[yes|no]
collects reads and writes of global variables and aggregates them per processSeveral directives have been replaced by analyzer-intrinsic functions. Semantically, they still correspond to directives, but are no longer listed as such in the analyzer log.
This modification
affects all built-in operations of the analyzer that are used solely
for implementing stub functions. Existing source files for stubbing
can still be used when including the astree.h
header file
and defining __ASTREE__
and __ASTREE_LEGACY_DIRECTIVES__
when preprocessing.
Affected old directive | New analyzer-intrinsic function |
---|---|
__ASTREE_bzero | __astree_bzero |
__ASTREE_double_exp_2 | __astree_double_exp_2 |
__ASTREE_double_extract_exponent | __astree_double_extract_exponent |
__ASTREE_double_sqrt | __astree_double_sqrt |
__ASTREE_exit | __astree_exit |
__ASTREE_huge_val | __astree_huge_val |
__ASTREE_huge_valf | __astree_huge_valf |
__ASTREE_huge_vall | __astree_huge_vall |
__ASTREE_malloc | __astree_malloc |
__ASTREE_memcpy | __astree_memcpy |
__ASTREE_va_start | __astree_va_start |
The GUI offers automatic conversion of old directives via the Tools menu.
unused-macro
.options
, abi
, and parser-ignore
now support importing settings from other DAX files. This is done using
the optional import=<file>
attribute.YES
and VAR
:
<dax version="1.1"> <files use-relative-paths="${YES}"> <file>${VAR}.c</file> </files> </dax>
<rulechecks>
section
as shown in the example below:
<dax version="1.1"> <options> <rulechecks>yes</rulechecks> </options> <rulechecks> <checks enable="all"> <array-index>no</array-index> </checks> <rules enable="none"> <M04>yes</M04> <M04.12.1>no</M04.12> </rules> </rulechecks> </dax>Additional values can be passed where needed using the following syntax:
<dax version="1.1"> <rulechecks> <rules enable="none"> <M2012.6.1 value="char;int">yes</M2012.6.1> </rules> </rulechecks> </dax>
<dax version="1.1"> <abi target="ia32"> <bitfield_sign>signed</bitfield_sign> </abi> </dax>If the target option is omitted, Astrée uses the analyzer default ABI settings that are specified in the user manual.
reference
option of the <annotations>
tag. Example:
<annotations file="annotations.aal" reference="reference.aalref"/>Note that the reference file is specific to the version of the Astrée server and the operating system it is running under. It may need to be re-generated when uploading it to a server with a different version number or running under a different OS.
IncludeFileSearchPath
and
SourceFileSearchPath
properties of the data dictionary.
Paths listed in IncludeFileSearchPath
are added to the list
of include paths for preprocessing, and C source files from paths listed
in SourceFileSearchPath
are added to the files to analyze.data_dictionary_toplevel_subsystems
in XTC,
<toplevel_subsystems>
in DAX, and
Code Generators → Import Data Dictionary in the GUI.keep-float-specials
NaN
.
If disabled (default), the analyzer behaves like in previous releases,
i.e. it warns about such values and discards them before continuing
with the analysis. If the option is enabled, the analyzer omits such
warnings and instead keeps the special values. This mode of operation
is useful for modeling targets on which floating point special values
do not raise exceptions, e.g. quiet instead of signaling NaN
.dynamic-smash-variables-threshold=n
automatic-partition=[yes|no]
partition=[yes|no]
.warn-read-of-never-written-variables
--export <archive>
.aaf
archive at the end of the analysis run.alignof_char_array
. The default value is 1
.warn-on-uninitialized
is now deprecated.
Warnings about accessing uninitialized variables with automatic storage
duration (local variables) are now always enabled. Such accesses are
reported as class A alarms./* stub function: returns a random character */ char random (void) { char c; return c; }This pattern will now always lead to a class A alarm. Stub functions of this kind should be rewritten as follows:
char random (void) { char c; __ASTREE_modify((c; [-128, 127])); return c }The modify directive acts like an assignment that initializes the variable with the specified range. The C stub library that is shipped with the tool has been corrected in this manner.
__ASTREE_assert
) that have
been inserted via AAL annotations..dax
or .opt
file when running the analysis in batch mode.interpolation=yes
.if((a < 0) == 0)
.unsigned char* rom[]; unsigned char* rom_end[]; __ASTREE_absolute_address((rom, 0x1000)); __ASTREE_absolute_address((rom_end, 0x2000)); size_t rom_size = rom_end - rom;
__ASTREE_alarm
for raising alarms
in stub functions. The directive can be used to raise any kind of alarm
with a freely configurable message text. Moreover, the alarm can be
optionally reported at the location where the stub function is called
rather than at the location where the directive is inserted. Here is
an example from the new OSEK stub library:
__ASTREE_alarm((raise_at_caller; invalid_usage_of_os_service; "invalid call to ReleaseResource (resource has not been acquired)"));
/* file1.c */ typedef int T; void f(T* p) { }
/* file2.c */ typedef int T[8]; void f(T*); void main (void) { int a; int* pa = &a; f(pa); }
struct S { int a; int b[]; };
struct S { int a; ; /* empty struct declaration */ int b; };
{ x: 42 }
, which behaves the same as { .x = 42 }
.dump-source
or the scenario builder. This fixes another
known issue from release 15.04.