Skip to content

AdaLang Analyzer 1.17.2

Choose a tag to compare

@github-actions github-actions released this 21 Nov 21:21
· 22 commits to main since this release

Downloads

Unpack the archive for your system and run
bin/adalang_analyzer (bin\adalang_analyzer.exe on Windows);
nothing needs to be installed beside it. The CVC5 and Z3
solvers that --verify runs are in the same bin
directory. Keep a GNAT toolchain on PATH (or installed by
Alire): the analyzer asks its gnatls where the Ada run-time
library's sources are.

Archive System
adalang_analyzer-1.17.2-linux-x86_64.tar.gz Linux on x86-64 with the GNU C library 2.35 or later (Ubuntu 22.04, Debian 12 and later)
adalang_analyzer-1.17.2-macos-arm64.tar.gz macOS 26 or later on Apple silicon
adalang_analyzer-1.17.2-windows-x86_64.zip Windows 10 or later on x86-64

On macOS, an archive a browser downloaded is quarantined:
xattr -dr com.apple.quarantine adalang_analyzer-1.17.2-macos-arm64
after unpacking it, or download it with curl -LO.
SHA256SUMS holds the archives' checksums; each archive's
THIRD-PARTY.md lists the libraries and solvers it contains
and their licenses.

Changes

The first release with binaries: archives of the analyzer and its solvers
for Linux, macOS and Windows, which need nothing built or installed beside
them but a GNAT toolchain, for the sources of the Ada run-time library.
And the fixes of what running it on 35 of the most used and most starred
crates of the Alire index showed: 121 of the 124 definite errors --verify
gave there were false, in eight shapes, now gone; the three that are right
were reported upstream with the other defects found.

What to expect: on the ten corpora, with every preset (run of 2026-11-21),
no finding is new and no definite error is new or gone, and the figures of
the gap ledger stand: --verify proves 12,034 of the 15,043 checks
GNATprove proves, 80.0%. 54 findings are gone, all of them false (read in
the sources): 17 Dead_Store, 14 Use_After_Free, 10
Uninitialized_Read, 8 Double_Free, 3 Overwritten_Assignment, one
Aliasing_Between_Parameters (CoAP-SPARK) and one Repeated_Statement
(Ada_Drivers_Library, a device register written twice), on gnatcoll-core,
AWS and the three others. 47 obligations that 1.17.1 raised where nothing
is read are gone (46 initialization checks and the range check of a
conversion), none of them paired with a check of GNATprove's; 339
initialization checks are new, at target names (AWS 335, CoAP-SPARK 4);
five that were unproved are proved (Tokeneer 2, AWS 3), and no proof is
lost. On the SPARK testsuite no obligation changes, and one
Aliasing_Between_Parameters finding is gone (FP-159). Each document
under benchmarks/ says what changed on its corpus.

Added

  • Release archives. A pushed version tag builds the analyzer on Linux
    (x86-64, on Ubuntu 22.04: GNU C library 2.35 or later), macOS (Apple
    silicon, macOS 26 or later) and Windows (x86-64), and attaches an archive
    for each, with their SHA-256 checksums, to a draft GitHub release that
    the CHANGELOG section introduces (.github/workflows/release.yml). An
    archive holds the executable, the CVC5 and Z3 solvers of the GNATprove
    distribution beside it, the README, CHANGELOG, LICENSE and NOTICE, the
    solvers' licenses, and a THIRD-PARTY.md listing each library linked in
    and its license as the Alire index gives it.
    .github/scripts/build-release.sh builds one: GMP is linked in from its
    static library, the build stops if the executable or a solver depends on
    any library outside the system, and the packaged analyzer is run with no
    toolchain, solver or home directory to find, and must run the solvers
    beside it. Started by hand, the workflow builds any branch or tag as a
    trial, or attaches the archives to an existing tag's release.
  • The configuration reference shows how to analyze the sources of Rational
    Apex and ApexAda views (unit.1.ada, unit.2.ada, child units and
    subunits with the dots of their names): a GPR project a view, with the
    Apex naming scheme and a with for each view it imports, or the sources
    named on the command line. Only with a project do the compiler checks
    find the units a source depends on. tests/run_apex_views.sh checks
    both ways on two views written for the purpose; no view that Apex saved
    has been tried. Apex's own files (a view's switches and imports) are not
    read.

Changed

  • cvc5 and z3 beside the analyzer's executable, where a release archive
    puts them, are used before those on PATH (and the GNATprove
    installation of Alire after both); ADALANG_CVC5 and ADALANG_Z3 still
    come first. A link to the executable is followed to find them. Before,
    solvers there were run only when PATH held none: a dependency appends
    the directory the analyzer was started from to its PATH.
    tests/run_solver_limits.sh checks the order.

  • Use_After_Free reports a dereference of the freed object, and of a
    local copy of its access value made before the Free; Double_Free, a
    Free of such a copy. A second Free of the same object, which the first
    sets to null (RM 13.11.2), is no longer reported, nor is a use the Free
    cannot reach: in the other branch, after a handler that frees and raises
    again, or in an iteration of a loop that declares the object anew
    (FP-156).

  • Aliasing_Between_Parameters follows SPARK RM 6.4.2: an object of a
    scalar type given to an in parameter and to an in out or out one is not
    reported (FP-159).

Fixed

What running AdaLang Analyzer on 35 of the most used and most starred
crates of the Alire index showed (FP-150 to FP-161, in
quality/known_analysis_issues.tsv). Of the 124 definite errors
--verify gave there, 121 were false, in these shapes:

  • The item of T'Read and the object of T'Asm_Output hold a value
    after the call; neither is read (FP-150: gid, Zip-Ada, wisitoken,
    simple_components, HiRTOS, rp2040_hal).
  • The out actuals of a call through an access value are not read
    (FP-151: utilada, OpenGLAda), nor is the object of a view conversion
    given as an out actual (FP-152: sdlada, stephes_ada_library).
  • An object that is imported, or whose access value or address is given
    away, is not known to have no value; only a pragma that evaluates an
    expression reads the objects it names (FP-153: clic, simple_components,
    powerjoular, utilada). An imported object is seen outside, as a volatile
    one is: Repeated_Statement, Overwritten_Assignment and Dead_Store do not
    report its writes (a device register written twice, Ada_Drivers_Library).
  • The renaming of an object reads no value of it (that of what a function
    call or a dereference gives still reads what the call or the
    dereference reads), and Uninitialized_Output does not report an out
    parameter the body renames (FP-154).
  • pragma Assert (False) after a call is unproved, not a definite error
    nor a Known_Assertion_Failure (FP-155: HiRTOS).

The three that are right are in simple_components, and were reported
upstream with the other defects found there
(alire-project/dak_simple_components#9). And in the other checks:

  • Repeated_Statement does not report an assignment repeated whose value
    reads its target or calls a function that may change state, one whose
    effects are not known or that writes an object outside it (FP-157);
    Duplicate_Condition, a
    condition the same as an earlier one where a call between them changes
    what it reads (FP-158); Overwritten_Assignment and Dead_Store, the
    value, a status, that a call of an imported function or of one that may
    change state returns (FP-160).
  • A target name, @, reads the target of its assignment.
    Overwritten_Assignment and Dead_Store reported the value it reads
    (T := X * 3; T := @ + 1;, AWS), and Repeated_Statement a repeated
    T := @ + 1; (FP-162). Uninitialized_Read now finds T := @ + 1; of a
    T with no value, and --verify has an initialization check at @,
    where it had none and proved the reads of T after it (FP-163).
  • The sources of a project compiled with -gnatW8, as Alire compiles
    every crate, are read as UTF-8; they were read as ISO-8859-1 and
    identifiers in UTF-8 did not parse. --verify stopped with no report on
    a Property_Error raised in the declarations of a block whose handler was
    to take it (FP-161: honki_tonks_zivilisationen).
  • The summaries of the subprograms were searched one by one for every
    call: PHCpack (5,508 sources, 1.3 million lines) took more than 15
    minutes under --recommended; it takes 7.
  • On macOS and Linux the executable loaded the shared GNAT tasking run time
    (libgnarl) of the toolchain that built it, beside the static one the
    binder links in, and stopped at start-up on any computer without that
    toolchain at the same place: the project file's -lgnarl, among the
    linker switches, found the shared library first. It now comes last
    (Trailing_Switches), where it supplies only what is still missing, and
    the shared library is kept only by the test programs whose closure gives
    the binder no tasking to link in. The Windows executable, linked
    statically, did not have the problem.