Skip to content

Implement Ada & SPARK Structural Signatures #76

Description

@squid-protocol

Epic: #75
Target: gitgalaxy/standards/language_standards.py

Context & Strategic Value

As governed by DO-178C aviation certification standards, Ada and SPARK are foundational to safety-critical aerospace software. These languages are heavily relied upon for collision avoidance systems and core flight control due to their built-in safety monitoring capabilities.

GitGalaxy must natively parse Ada's lexical topology to instantly verify these safety guarantees without requiring legacy compilers.

Implementation Tasks

  • Add ada to LANGUAGE_DEFINITIONS in language_standards.py.
  • Define Extensions: .adb, .ads, .ada.
  • Set lexical_family to hybrid_dash (uses -- for line comments, no native block comments historically).
  • Implement safety signature: Target strict typing and safety pragmas (pragma, pragma Assert, type ... is range).
  • Implement api signature: Target package specifications (package ... is).
  • Implement structural_boundaries signature: Target procedure, function, begin, end.
  • Verify regex bounds to prevent Catastrophic Backtracking (ReDoS).

Validation

Test against open-source Ada avionics or RTOS snippets to ensure safety density metrics are successfully extracted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions