Imagine asking an AI to write a simulation of a one-hertz oscillator. It produces a smooth wave. The code compiles. Then you put a cursor at the one-second mark, where the oscillator should have completed one full cycle. It has travelled just one radian. Somewhere between the input and the calculation, the program lost a factor of 2π.
Suppose the AI also has to find and repair the mistake, with no engineer looking over its shoulder. What language would you give it? Assembly offers precise control over the processor, but the processor already knows how to multiply two numbers. The missing information is what those numbers mean. A language designed for a large language model (LLM) could give its programmer a way to ask where a frequency measured in cycles per second entered a calculation expecting radians per second.

Illustration: New Oscilloscope, Jeff Keyzer, Flickr, CC BY-SA 2.0. The photograph shows a probe calibration signal. Pittigrilli cropped and corrected the perspective.
Give the model a place to point
In our hypothetical language, the compiler keeps a structured copy of the program. Each expression has an address that survives a change of spelling or a move to another line. A function can also contain a typed hole, a blank whose required result is already known. The agent can inspect that blank, find the quantities available there, and fill it in one operation. It can leave a harder decision open while it works on the rest.
For the oscillator, the calculation is phase advance = angular frequency × elapsed time. The input supplies ordinary frequency. Both frequencies have the physical dimension of inverse time, so a checker that only tracks kilograms, metres and seconds can miss the error. Give cycles per second and radians per second distinct types, and the compiler can identify the exact call where the conversion is missing. In the proposed interface, a repair might read like this:
inspect phase_input required: AngularFrequency available: drive_frequency (FrequencyHz) replace phase_input with to_angular_frequency(drive_frequency)
There is still a way to get this wrong. The conversion function itself could contain a mistake and carry a perfectly respectable type. An independent example gives the agent a second check. Start at phase zero, run a 1 Hz input for one second, and inspect the accumulated phase before wrapping it. The expected answer is 2π radians. If the code returns 1, the agent has a small, reproducible case to investigate. The example is illustrative. Nobody had to know which line would fail in order to specify what one revolution means.
Which parts have researchers tried?
In the Hazel programming environment, Andrew Blinn and colleagues gave an LLM the expected type of a hole along with relevant definitions, including definitions elsewhere in the project. They tested code completion on web applications in Hazel and TypeScript. Supplying the definitions of relevant types was especially helpful. That result suggests a practical way to spend a limited context window. If a function expects a project-specific value, a few lines defining that value can earn their place ahead of the surrounding page of code. The Hazel study.
A second experiment intervened while the model was generating code. Niels Mündler and colleagues used type information to restrict the continuations the model could choose. On their synthesis and translation tasks, compilation errors fell by more than half. Functional correctness improved by a more modest 3.5–5.5 percent relative. Think of an alarm that should sound at or above a threshold. Both “greater than” and “greater than or equal to” yield a Boolean. Only an example at the threshold tells those two implementations apart. The PLDI study.
One can already try something close to the proposed compiler. In Edict, an agent submits a program as a tree encoded in JSON. It can name a node, patch it, request another check and compile the result to WebAssembly. Some failed contract checks can return a counterexample. Edict demonstrates that the pieces fit together. Its documentation leaves a practical question open: how often does an agent earn back the cost of generating and reading that structure? Edict implementation and examples.
Can a fixed model gain a new capability?
Suppose the agent stores the frequency conversion along with its types and one-revolution check. A later session working on a vibration sensor can discover the operation by asking which functions convert the instrument’s output to the type its solver requires. The model’s weights have stayed fixed. Something consequential has nevertheless changed: a convention that once had to be inferred from context is now discoverable, executable and testable.
That benefit depends on what gets preserved. A library of vaguely named routines with tests written to reproduce their own output could carry the same error through a hundred projects. A useful entry records its assumptions and where its checks came from. For example, multiplying frequency by elapsed time works for a constant frequency. A vibrating motor that speeds up requires integrating angular frequency over time. A reusable routine that declares the constant-frequency assumption gives the next agent grounds to look for another method.
Ordinary languages can express distinct types, call libraries and run independent tests. Familiar notation can also be remarkably compact. The case for a dedicated language therefore rests on how cheaply an agent can discover an existing operation, apply it in the right place and check its consequences. Some goals will still need evidence from outside the compiler. In Alkemata’s game prototype, a test can establish that a flight gate registers a pass. Finding out whether anyone wants to fly the course again takes a player. Making Island Run with AI.
An experiment worth running
Give the same frozen model two copies of a small signal-processing project. In one it edits text. In the other it edits named program nodes. Give both the same operations, diagnostics, test feedback and inference budget. Start with a constant oscillator, then introduce sampled measurements, a changing drive frequency and a second instrument that reports revolutions per minute. Allow both agents to keep the functions and checks they develop. Reserve some inputs and later tasks for independent scoring.
Count changes that pass those unseen tests, regressions in earlier tasks, and total inference cost, including failed attempts. Then repeat with each accumulated library reset. That last comparison matters. It separates the benefit of pointing directly at an expression from the benefit of leaving behind something the next session can use. The interesting result would come several changes in, when the agent meets an unfamiliar instrument. Does a piece of software it wrote yesterday help it get the physics right today?
What concrete example would confirm or challenge this article?
Choose a reaction, write a comment, or ask your AI assistant to send a proposal for review. Comments are reviewed before publication.