explaingit

mmartign/adalang_analyzer

Analysis updated 2026-05-18

0AdaAudience · developerSetup · moderate

TLDR

A command-line static analysis tool that scans Ada code for dozens of reliability, safety, and style issues with fix guidance.

Mindmap

mindmap
  root((AdaLang Analyzer))
    What it does
      Static analysis for Ada
      Built on Libadalang
      Reports rule violations
    Tech stack
      Ada
      Libadalang engine
    Use cases
      Pre-review code scan
      Catch reliability bugs
      SPARK contract checks
    Audience
      Ada developers
      Safety critical teams
    Checks
      Restricted constructs
      Data flow issues
      Control flow issues
      Style issues

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run automated checks over an Ada codebase before manual code review.

USE CASE 2

Catch reliability bugs like infinite loops, division by zero, or unreachable code early.

USE CASE 3

Enforce SPARK contract rules like Global and Depends for high assurance software.

USE CASE 4

Flag style issues such as long lines, trailing whitespace, and magic numbers.

What is it built with?

AdaLibadalang

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires an Ada toolchain and the Libadalang engine to parse source code.

In plain English

AdaLang Analyzer is a command-line tool that checks Ada source code for common problems and reports them with an explanation and advice on how to fix each one. It is maintained independently by a company called Spazio IT and is built on top of Libadalang, an open source engine from AdaCore that understands the structure and meaning of Ada code. The README is clear that this is not an official AdaCore product, even though it grew out of AdaCore's own open source tooling. The tool works by scanning a codebase and running dozens of individual checks against it. These checks fall into categories such as restricted language constructs, which flag things like goto statements, task aborts, or explicit pragmas, and safety checks, which catch risky patterns like unchecked type conversions or comparing floating point numbers with equality. Other checks look at data flow, catching unused parameters or variables, assignments whose value is never read, and parameters marked as both readable and writable but only ever used one way. There are checks for control flow problems like infinite loops with no way to exit, unreachable code, and conditions that are always true or false no matter the input. The analyzer also looks for arithmetic mistakes such as division by zero that can be detected without running the program, and for style issues like overly long lines or trailing whitespace. A separate group of checks is dedicated to SPARK, a stricter subset of Ada used for high assurance software, covering things like missing or mismatched Global and Depends contracts, which describe what state a piece of code is allowed to read or write. Each check is labeled with a software quality category such as reliability, maintainability, or security, and a severity level ranging from low up to blocker, giving a team a rough sense of which problems to fix first. Because the tool works directly from source without needing the code to compile or run, it is best suited to Ada developers, particularly those working on safety-critical or high-assurance systems, who want an automated first pass over their code before manual review.

Copy-paste prompts

Prompt 1
Explain what the Cyclomatic_Complexity and Deep_Nesting checks in AdaLang Analyzer detect.
Prompt 2
Walk me through running AdaLang Analyzer against my Ada project from the command line.
Prompt 3
What is the difference between the SPARK checks and the general reliability checks in this tool?
Prompt 4
How does AdaLang Analyzer relate to AdaCore's Libadalang and libadalang-tools?

Frequently asked questions

What is adalang_analyzer?

A command-line static analysis tool that scans Ada code for dozens of reliability, safety, and style issues with fix guidance.

What language is adalang_analyzer written in?

Mainly Ada. The stack also includes Ada, Libadalang.

How hard is adalang_analyzer to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is adalang_analyzer for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.