Cumulative production since 12 May 2026  ·  live tally  ·  spec + body verified

0
Lines of Fortran
modernised
0
Lines of SPARK-Ada
emitted (spec + body)
~0.33× ratio — Ada is more compact
0
Person-years
equivalent
0
SPARK-Ada
packages
incl. types-only specs
0
Institutions
covered
+ ESA · Planck · ESOC
0
Independent
applications proven

Honest count: only modules where every operation-bearing package has both a compile-clean spec and a compile-clean body (types-only packages that legitimately need no body don't count against the verdict). Person-year figures use a conservative rate for high-assurance Ada/SPARK engineering — the rate at which DO-178C, Def Stan 00-055, and IEC 61508 codebases are conventionally produced.  ·  See the line-by-line production timeline →

Mechanical proof  ·  gnatprove + CVC5 / Alt-Ergo

0
Proof obligations
attempted
0
Discharged
(19,110 of 19,960)
flow analysis + SMT prover (CVC5)
0 / 29
Modules with
full SPARK analysis
all corpora analysed

Each proof obligation is a verification condition gnatprove must discharge to certify a piece of code free of a class of runtime error or contract violation (overflow, array index out of range, divide-by-zero, precondition / postcondition satisfaction, etc.). 92.2% machine-discharged is a much stronger claim than compile-clean — it is the same SPARK toolchain used to certify aircraft flight-control and rail-signalling software, applied to the factory's output.

Portfolio · Reference Outputs

What the factory produces.

These are reference outputs of the Dark Factory's SPARK-Ada production line — packages generated from prose specifications and legacy source code. Each is included because it demonstrates a distinct dimension of what the factory does: legacy modernisation, domain-specific calculation, or formal-method substrate over a real prose specification.

Every entry below is open source. Licences vary by upstream provenance — Apache 2.0 where the factory created the work clean-room, derived licences (e.g. GPL-3.0) where the original source carried them. We respect upstream licensing, including viral.

The factory's reusable catalogue components (the building blocks the production line composes against — money types, JSON parsers, vector primitives) are factory-internal and not published here. The portfolio shows the outputs, not the production machinery.

Reference · Domain Calculations

Worked examples produced by the factory from prose or legacy sources

UK Income Tax Stack — 13-package SPARK-Ada implementation

Public Finance · UK Tax Law

Thirteen SPARK-Ada packages implementing UK income tax for a calibration tier: Personal Allowance taper, Basic / Higher / Additional rate bands, dividend calculation, Gift Aid relief, High-Income Child Benefit Charge (HICBC), Marriage Allowance, National Insurance Class 1 / 2 / 4, pension relief, student loans (Plans 1 / 2 / 4 / 5 / Postgraduate), tax-year discrimination, and a CLI entry point. Every operation carries Pre/Post contracts; every band crossover and taper threshold is encoded as a verifiable invariant.

Why it matters: Tax law changes annually; HMRC publishes thousands of pages of guidance every Finance Act. Most tax-calculation software is hand-written in spreadsheet formulae or imperative code, where a band-edge bug can silently understate or overstate every taxpayer's bill for a year. A SPARK-Ada implementation lifts the verification regime from "we wrote tests" to "every band threshold and every taper rate is mathematically asserted at the type system level".

Apache 2.0 SPARK-Ada 13 packages ≈ 4–6 person-years equivalent From Prose Specification

DL_POLY Classic — UK national-lab molecular dynamics modernisation

Materials Science · Molecular Dynamics · UK National Lab

SPARK-Ada port of twelve core modules from DL_POLY Classic, the open-source molecular-dynamics package developed at STFC Daresbury Laboratory since 1992. Covers the heart of MD: velocity-Verlet and leapfrog rotation integrators (20,947 LoC, four modules), motion integrators (6,024 LoC, two modules), bonded and non-bonded force evaluation (3,309 LoC), hyper-dynamics for rare-event sampling (2,821 LoC), potential-of-mean-force (1,924 LoC), metal force fields (1,672 LoC), dihedral torsions (1,134 LoC), and the SHAKE constraint solver (157 LoC). Total: 37,988 LoC of UK national-lab Fortran 90 → 53 SPARK-Ada packages, all gnatmake -c clean. Several adjacent modules produced partial output (Coulombic forces, Ewald, neighbour-list construction, thermodynamic ensembles, path-integral MD, properties) and are queued for rework against the next factory-pipeline iteration.

Why it matters: DL_POLY is the UK's flagship open-source molecular-dynamics codebase — materials science, drug discovery, battery research, vaccine and veterinary pharmaceutical work, and protein dynamics all run on this tool or its derivatives. The factory demonstrates that a UK national-laboratory codebase three decades old can be modernised to memory-safe SPARK-Ada inside a single working session — UK-born software, modernised in the UK, running on UK hardware, ready for the next thirty years.

Apache 2.0 SPARK-Ada 53 packages 37,988 LoC Fortran → SPARK ≈ 30–55 person-years equivalent Upstream BSD-3 (STFC Daresbury)

LAPACK DGESVD — singular value decomposition driver

Numerical Linear Algebra · Foundation Layer

SPARK-Ada port of LAPACK 3.12.1's dgesvd.f — the singular-value decomposition driver for double-precision general matrices, written by the University of Tennessee and UC Berkeley LAPACK team. 3,552 LoC of dense numerical Fortran decomposed into four cohesive SPARK packages: argument validation, common types, magnitude scaling, and SVD orchestration. Every operation carries Pre/Post contracts over matrix shapes, leading dimensions, job-selector enumerations, and singular-value ordering invariants.

Why it matters: LAPACK is the substrate beneath MATLAB, NumPy, R, Julia, Mathematica, every quantitative-finance system, and every scientific HPC code on Earth. Memory-safety failures in LAPACK propagate everywhere downstream. A SPARK-Ada port of even a single major routine establishes the methodology: the foundation itself can be modernised, and the same arc applies to the rest of the library.

Apache 2.0 SPARK-Ada 4 packages 3,552 LoC Fortran → SPARK ≈ 3–5 person-years equivalent Upstream Modified BSD (UT + UC Berkeley)

USGS National Seismic Hazard — legacy Fortran modernisation

Geoscience · Earthquake Hazard

SPARK-Ada port of the Fortran codes that generated the published 2008 and 2014 USGS national seismic hazard maps for the conterminous United States. The upstream is a single 3,700-line monolithic Fortran program covering subduction-zone hazard computation — slab geometry, rupture-patch tiling, ground-motion prediction equations (Geomatrix 1995, Papazachos 2004, Strasser 2010, Atkinson-Macias 2009, Zhao et al., BC-Hydro), truncated-normal probability tables, deaggregation, and deterministic modes. Decomposed into eleven cohesive SPARK packages.

Why it matters: USGS itself has retired this codebase in favour of a modern Java rewrite. The factory demonstrates that a legacy science Fortran codebase of this scale — single-file monolithic, no separation of concerns, no formal interface — can be re-expressed as a clean, contract-bearing SPARK-Ada subsystem decomposition without hand correction. The same modernisation arc applies to every legacy scientific or industrial Fortran codebase a customer is sitting on.

Apache 2.0 SPARK-Ada 11 packages 3,700 LoC Fortran → SPARK ≈ 3–5 person-years equivalent Upstream Public Domain (USGS)

DTU Wind Energy Controller — wind-turbine control SPARK port

Renewables · Real-Time Control

SPARK-Ada port of DTU Wind Energy's open-source reference controller (DTUWEC) for pitch-regulated variable-speed wind turbines. Partial-load and full-load control loops, switching, drivetrain and tower dampers, rotor speed exclusion zones, de-rating, wind-speed estimation, individual pitch control, individual and cyclic flap control. Decomposed into a five-package SPARK structure.

Why it matters: Wind turbine controllers run on operational fleets for twenty years; the controllers are safety-rated and certified, the failure modes include blade-loss and tower collapse, and the original Fortran is still being maintained because rewriting it is expensive and risky. A SPARK-Ada port retains the original control law line-for-line while gaining contract verification, memory-safety by construction, and a substrate amenable to formal proof of stability properties. The same arc applies to every aerospace, automotive, or industrial controller sitting in legacy Fortran today.

GPL-3.0 SPARK-Ada 5 packages ≈ 2–3 person-years equivalent Upstream GPL-3.0 (DTU Wind Energy)

Production Ledger · Full Manifest

Every conversion the factory has shipped, one row at a time

A complete record of individual Fortran sources the factory has put through the full translator → decomposer → type-resolver → expander pipeline with a compile-clean gnatmake -c verdict. Every row is auditable against the production logs. Person-year figures use the same conservative MP-letter rate (~740 LoC per high-assurance Ada/SPARK person-year).

Source file Project Origin LoC Pkgs Status
DL_POLY Classic · 22 modules · 54,880 LoC
DL_POLY Classic (22 modules)DL_POLY ClassicSTFC Daresbury (UK)54,880109PASS95.8% proved
USGS NSHMP · 3 sources · 3,997 LoC
hazSUBX.fUSGS NSHMPUS Federal (Golden CO)3,69811PASS98.7% proved
hazpoint.fUSGS NSHMPUS Federal (Golden CO)2241PASS96.0% proved
gutenberg.fUSGS NSHMPUS Federal (Golden CO)751PASS83.9% proved
European Space Agency · 2 sources · 6,346 LoC
OPTGRA (37 files)European Space AgencyESOC Flight Dynamics3,76022PASS95.4% proved
Planck CAMspec (5 files)European Space AgencyPlanck Collaboration2,58614PASS95.0% proved
LAPACK 3.12.1 · 1 source · 3,552 LoC
dgesvd.fLAPACK 3.12.1UT + UC Berkeley3,5524PASS93.2% proved
DTU Wind Energy · 1 source · 1,000 LoC
BasicDTUController.fDTU Wind EnergyDTU (Denmark)1,0005PASS96.2% proved
Spec + body verified (29 sources, 5 institutions) 69,775 170 all PASS

Manifest updates as new runs land. Additional DL_POLY Classic modules (constraint solvers, neighbour-list construction, Ewald reciprocal-space, thermodynamic ensembles, path-integral MD, van der Waals + Coulombic forces) are queued for next batches.

How To Engage

Bring us your codebase, or your specification

If your organisation has a legacy Fortran (or other) codebase that would benefit from modernisation to SPARK-Ada with formal contracts, or if you have a prose specification that needs production-ready Ada output, we run trials. The factory accepts inputs through the customer portal and returns delivery bundles signed for audit.

Get in touch