From the video to the computation: section entropy, call coverage, an MCP agent's budget, reconstruction fidelity, the physics of the replayed game — and the explicit limits of the exercise.
Video: “REA : recréer un logiciel avec l'IA et la rétro-ingénierie”, IT-Connect - Florian, 10 min 01 s. Chapters: 0:00 REA and GitHub · 0:20 reverse engineering · 1:21 an MCP server · 2:43 the community · 4:28 the legal frame · 5:52 installation · 7:16 the Moon-Buggy demo · 8:25 comparison with the source · 9:00 with or without REA · 9:44 conclusion.
Each row gives the formula, the computed result, the explanation path (module function → check) and the status.
Each card states the equation, gives the result and explains what it says — and what it does not say.
EQ-01OPERATIONAL
Entropy reveals a packed section
H = −Σ p log₂ p measures the average surprise per byte: 0 for a constant section, 8 for a section uniform over 256 values.
H = −Σ_i p_i log₂ p_i (bits/octet) ; section suspecte si H ≥ 7,2
Result : H(.texte) = 4.584963 · H(.surcouche) = 8.000000 · 1 section suspecte
The 7.2 bit/byte threshold is a field convention, not a theorem: a legitimate section can be dense. The check cross-validates every entropy against log₂(symbols).
retro_ingenierie_ia.py → analyse_sections() → C01
EQ-02OPERATIONAL
What the binary says without running
Printable runs of four bytes or more, NUL-terminated, yield messages, formats and options without executing a single instruction.
Chaînes = suites de [0x20–0x7E] de longueur ≥ 4 dans .rodata
Result : 7/7 chaînes · 78 octets · 7.617 % de .rodata
The sample contains exactly seven planted strings: the check compares the extracted list with that ground truth, not with itself.
retro_ingenierie_ia.py → extraction_chaines() → C02
EQ-03OPERATIONAL
Not all code is reachable
Call coverage is the ratio of functions reached from main to functions in the corpus: 9 out of 12 here.
cov = |{f : main →* f}| / |F| (fermeture transitive du graphe d'appels)
Result : 9/12 atteintes · cov = 0.7500 · 3 inatteignables
Three functions stay unreachable (help, sound, save). The check uses two distinct algorithms — breadth-first search and Floyd–Warshall — and gets the same count.
retro_ingenierie_ia.py → couverture_symboles() → C03
EQ-04OPERATIONAL
Context is a budget
W = ⌈L/(C−R)⌉ windows to hold the L tokens of decompiled code, with C = 200,000 and R = 20,000 reserved.
W = ⌈L / (C − R)⌉ ; part = L / (C − R)
Result : L = 252 jetons · W = 1 · part = 0.140 %
The demonstration corpus fits in a single window at 0.14 %. The figure is SIMULATED for a real decompiler, whose function bodies are far longer.
retro_ingenierie_ia.py → budget_contexte() → C04
EQ-05OPERATIONAL
Three round trips are enough here
k = ⌈N/n⌉ MCP calls, each costing its tool schema plus the tokens of the returned functions.
k = ⌈N/n⌉ ; coût = k·J_req + Σ_f J_f
Result : k = 3 appels · coût = 1752 jetons = 3×500 + 252
Twelve functions in batches of five give three calls and 1,752 tokens. The check replays the per-call sum and compares it with k·J_req + L.
retro_ingenierie_ia.py → budget_appels() → C05
EQ-06SIMULATED
With or without REA: how many attempts?
P_k = 1 − (1−p)^k; the expectation is 1/p and the threshold k* = ⌈ln(1−c)/ln(1−p)⌉ for a target c.
P_k = 1 − (1−p)^k ; E[tentatives] = 1/p ; k* = ⌈ln(1−c)/ln(1−p)⌉
Result : p = 0.62 : P₅ = 0.9921 · k* = 4 · p = 0.18 : k* = 16
With p = 0.62, four attempts reach 95 %; with p = 0.18, sixteen are needed. p is a declared parameter, not a measurement — hence SIMULATED.
retro_ingenierie_ia.py → tentatives() → C06
EQ-07OPERATIONAL
Measuring the gap to the original
Levenshtein distance counts insertions, deletions and substitutions; similarity normalises by the longer of the two sequences.
sim = 1 − d_L / max(|a|,|b|) ; d_L par programmation dynamique
Result : d = 5 sur 34 jetons · sim = 0.8529
The demonstration pair differs by five declared edits, i.e. 0.8529 similarity. The reference values kitten/sitting = 3 and saturday/sunday = 3 check the algorithm itself.
retro_ingenierie_ia.py → fidelite() → C07
EQ-08OPERATIONAL
Differential testing finds the bug
Reference state and reconstructed state are compared over 250 inputs; the reconstruction clamps position at ground level.
eq = 1 − |{x : f(x) ≠ ĝ(x)}| / |X| ; écart ⇔ y + v·dt − ½g·dt² < 0
Result : 13/250 écarts · eq = 0.9480
Thirteen mismatches appear, exactly the cases where the reference would go below zero — and the analytic threshold predicts thirteen. This is how a reconstruction defect is proven rather than guessed.
retro_ingenierie_ia.py → equivalence_comportementale() → C08
EQ-09SIMULATED
The jump: continuous versus integrated
Height is v₀²/(2g); fixed-step semi-implicit integration shifts the parabola by ½g·dt·t.
h = v₀²/(2g) ; t* = v₀/g ; y_n = v₀t − ½gt² − ½g·dt·t
Result : h = 3.2620 m · discret = 3.1954 m · erreur = 0.0666 m
The discrete apex is 2.04 % lower than the continuous one. The check cross-validates the simulation against the shifted parabola on the same grid, to within 10⁻¹².
retro_ingenierie_ia.py → balistique() → C09
EQ-10OPERATIONAL
Collision and step skipping
Two boxes overlap if dx < (w₁+w₂)/2 and dy < (h₁+h₂)/2; beyond v·dt > w the obstacle is crossed unseen.
Recouvrement ⇔ dx < (w₁+w₂)/2 ∧ dy < (h₁+h₂)/2 ; tunneling ⇔ v·dt > w
Result : 30/121 paires · tunneling dès 72.5 m/s
Thirty overlaps out of 121 positions; the tunnelling threshold is 72 m/s. The check cross-validates the enumeration with the 6 × 5 product of sub-threshold positions.
retro_ingenierie_ia.py → collision() → C10
EQ-11SIMULATED
Distance and score
v(t) = v₀ + a·t gives D = v₀T + ½aT²; points are ⌊D/10⌋.
v(t) = v₀ + a·t ; D = v₀T + ½aT² ; points = ⌊D/10⌋
Result : D = 1 380.00 m (discret 1 380.25) · 138 points
The discrete sum exceeds the closed form by 0.25 m, i.e. ½a·dt·T, without changing the score: 138 points in both cases.
retro_ingenierie_ia.py → score_partie() → C11
EQ-12SPECIFIED
What the law allows, and on what conditions
Decompilation requires five cumulative conditions: lawful user, interoperability necessity, strictly necessary parts, limited purpose, normal exploitation preserved.
Décompilation : 5 conditions cumulatives (CPI L.122-6-1 ; dir. 2009/24/CE art. 6)
Result : 5 conditions, chacune avec sa limite explicite
Recreating a whole program or competing with its publisher falls outside the exception. This table is a reading summary: it does not replace legal advice.
retro_ingenierie_ia.py → cadre_legal() → C12
EQ-13SPECIFIED
The four pillars as a reading grid
Each pillar receives a counterpart: binary fingerprint, differential test, bounded extraction, numerical check.
P1 ↔ empreinte · P2 ↔ test différentiel · P3 ↔ extraction bornée · P4 ↔ contrôle
Result : 4 ponts déclarés comme analogies structurelles, sans identité juridique
These four bridges are declared SPECIFIED: they organise the reading; they establish no equivalence between security, law and engineering.
retro_ingenierie_ia.py → pont_piliers() → C13
Values are recomputed at each generation. Checks fail if a constant or a formula drifts.
Source: IT-Connect - Florian (YouTube), 11 public chapters; transcript inaccessible.
A structural reading declared SPECIFIED: each pillar receives a counterpart, with its explicit limit.
Thirteen automatable WCAG 2.2 (level AA) criteria evaluated on this page at each generation: explicit formulas, independent checks, recomputed results. An automated audit replaces neither a human test nor a screen reader.
The thirteen checks are automated and run on the HTML and CSS actually produced; they do not cover all of WCAG 2.2.
Commands run from ASTRO-Q°ODE_SYSTEME/. The public JSON is served at the address below.
English version. The French and Arabic versions carry the same equations and the same figures.