/ 03. SW.Syn^

SW.Syn^

Production-grade control software. Discovered, not written.

SW.Syn^ is the heart of Hyperpilot — a new class of foundation model that searches the space of algorithms to find software that passes 100% of a Test.Auth^ suite. No LLM. No human in the loop.

Inputs and outputs

Two inputs in. A model, embedded code and a report out.

Input · 01
Unit-level Requirements
Traceable, item-level spec from Req.Gen^
Input · 02
Test Suite
Executable cases from Test.Auth^
Engine
SW.Syn^
algorithm discovery
Output · Software model
x_refPOSATTRATENOTCHSATMIXERτ₁ τ₂ τ₃ τ₄ω,aEKFIMUmeasured pos, θ, ωCASCADED PID · NOTCH · EKF
Output · Embedded C
attitude_ctrl.c · 3,212 lines · ARM Cortex-M7
1/* ============================================================
2 * attitude_ctrl.c — synthesised by SW.Syn^
3 * cascaded PID · notch · saturation · mixer · EKF
4 * target: ARM Cortex-M7 @ 480 MHz tick: 1 kHz
5 * DO NOT EDIT — regenerated on every passing run
6 * ============================================================ */
7#include "attitude_ctrl.h"
8#include "ekf.h"
9#include "filter.h"
10#include "mixer.h"
11#include <math.h>
12#include <string.h>
13
14#define DT 0.001f /* 1 kHz control tick */
15#define I_MAX 350.0f /* phase current limit [A] */
16#define TAU_MAX 12.0f /* per-rotor torque [N·m] */
17#define NOTCH_F0 62.0f /* structural mode [Hz] */
18#define NOTCH_Q 3.5f
19#define RATE_LIM 8.7266f /* 500 deg/s in rad/s */
20#define EPS 1e-6f
21
22static const gains_t G = {
23 .pos = { 6.20f, 0.000f, 0.140f, 2.50f },
24 .att = { 9.85f, 0.320f, 0.085f, 4.00f },
25 .rate = { 0.42f, 0.000f, 0.004f, 1.20f },
26};
27
28static notch_t nx, ny, nz;
29static ekf_t est;
30static uint32_t tick = 0u;
31
32static inline float clampf(float v, float lo, float hi) {
33 return v < lo ? lo : (v > hi ? hi : v);
34}
35
36static inline vec3 vsub(vec3 a, vec3 b) {
37 return (vec3){ a.x - b.x, a.y - b.y, a.z - b.z };
38}
39
40/* ---- single-axis PID with conditional anti-windup -------- */
41static float pid_step(pid_t *p, const gain4_t *g, float err) {
42 float d = (err - p->prev) / DT;
43 p->prev = err;
44 float u = g->kp * err + g->kd * d;
45 float i = p->i + g->ki * err * DT;
46 if (fabsf(u + i) < g->sat) p->i = i; /* clamp wind-up */
47 return clampf(u + p->i, -g->sat, g->sat);
48}
49
50/* ---- second-order notch (Direct Form II transposed) ------ */
51static float notch_step(notch_t *n, float x) {
52 float y = n->b0 * x + n->z1;
53 n->z1 = n->b1 * x - n->a1 * y + n->z2;
54 n->z2 = n->b2 * x - n->a2 * y;
55 return y;
56}
57
58static void notch_design(notch_t *n, float f0, float q) {
59 float w = 2.0f * (float)M_PI * f0 * DT;
60 float a = sinf(w) / (2.0f * q);
61 float c = cosf(w);
62 float n0 = 1.0f + a;
63 n->b0 = 1.0f / n0; n->b1 = -2.0f * c / n0; n->b2 = n->b0;
64 n->a1 = -2.0f * c / n0; n->a2 = (1.0f - a) / n0;
65 n->z1 = n->z2 = 0.0f;
66}
67
68/* ---- position → attitude → rate cascade ------------------ */
69static vec3 cascade(const state_t *s, vec3 ref) {
70 vec3 ep = vsub(ref, s->pos);
71 vec3 ra = { pid_step(&s->pid_px, &G.pos, ep.x),
72 pid_step(&s->pid_py, &G.pos, ep.y),
73 pid_step(&s->pid_pz, &G.pos, ep.z) };
74 vec3 ea = vsub(ra, s->att);
75 vec3 rr = { pid_step(&s->pid_ax, &G.att, ea.x),
76 pid_step(&s->pid_ay, &G.att, ea.y),
77 pid_step(&s->pid_az, &G.att, ea.z) };
78 vec3 er = vsub(rr, s->rate);
79 return (vec3){ pid_step(&s->pid_rx, &G.rate, er.x),
80 pid_step(&s->pid_ry, &G.rate, er.y),
81 pid_step(&s->pid_rz, &G.rate, er.z) };
82}
83
84/* ---- saturation w/ direction-preserving rescale ---------- */
85static vec3 saturate(vec3 u) {
86 float m = fmaxf(fmaxf(fabsf(u.x), fabsf(u.y)), fabsf(u.z));
87 if (m > TAU_MAX) { float k = TAU_MAX / m; u.x *= k; u.y *= k; u.z *= k; }
88 return u;
89}
90
91/* ---- control tick — called by the 1 kHz ISR -------------- */
92void on_tick(state_t *s) {
93 ekf_predict(&est, s->imu, DT);
94 ekf_update(&est, s->meas);
95 s->pos = est.pos; s->att = est.att; s->rate = est.rate;
96
97 vec3 u = cascade(s, s->x_ref);
98 u.x = notch_step(&nx, u.x);
99 u.y = notch_step(&ny, u.y);
100 u.z = notch_step(&nz, u.z);
101 u = saturate(u);
102
103 mix_torque(s->tau, u, s->thrust);
104 for (int k = 0; k < 4; ++k)
105 s->duty[k] = clampf(s->tau[k] / TAU_MAX, 0.0f, 1.0f);
106
107 if ((tick++ & 0x3FFu) == 0u) telemetry_emit(s, &est);
108}
109
110void attitude_ctrl_init(state_t *s) {
111 memset(s, 0, sizeof(*s));
112 notch_design(&nx, NOTCH_F0, NOTCH_Q);
113 notch_design(&ny, NOTCH_F0, NOTCH_Q);
114 notch_design(&nz, NOTCH_F0, NOTCH_Q);
115 ekf_init(&est);
116}
117
Output · Test report
✓ 1,840 / 1,840 passing
coverage · req 100%
How a synthesis run works
01
Zero-shot
Propose candidate algorithm.
02
Verify
Run candidate against the full Test.Auth^ suite.
↺ iterate until pass
03
Search
Refine the search using verification signal — failures focus the next batch.
04
Verify
Re-run the suite. Loop until a candidate passes 100% of tests.
05
Ship
Final candidate emerges with test report + software.
The search space

The shape of the search space determines what software you can ever find.

Hyperpilot searches the space of algorithms directly. LLMs are bounded by the public code they were trained on — and industry-grade control software isn't public.

/ Hyperpilot^ · algorithm discovery
searches algorithms · no ceiling
each • = an algorithmno edges · no ceiling
  • Searches algorithms directly — not words or tokens
  • Unbounded — no public-data ceiling
  • Domain- and stack-agnostic
/ LLMs · next-token prediction
searches tokens · bounded by public corpus
public code corpusinternal legacy data · fine-tune
  • Searches over tokens — re-mixes what it has seen
  • Bounded by the public-code corpus
  • Fine-tuning requires your sensitive, precious IP
Guarantees
Test pass rate
100% — or no output produced
Formats
C/C++ · Rust · MATLAB Simulink · Ada · LD · ST
Output class
Deterministic software. Does not output ML models.
Hand-off
Model · Code · Test Report
Explore the technology