Ousterhout and LLM verification
One of my favorite programming books "A Philosophy of Software Design" by John Ousterhout includes this diagram:

Ousterhout's insight is that well-written software should include deep, rather than shallow modules. Meaning, the program exposes a small interface to the user, which hides a large amount of functionality behind it. Doing this well is called abstraction, or information hiding.
Concretely, consider a flight booking system like Google flights. The interface asks me only for starting point, destination, travel dates, and number of passengers, and abstracts away a whole load of information. I don't need to know know anything about IATA codes, connecting airports, seat availability, which aircraft is flying which route, who the pilot is etc. in order to book a flight, even though all of those things are needed for the flight to actually happen.
You could imagine a much worse flight booking experience which asks me specify the exact airplane, flight number, and seat in order to book a flight, and then returns: "Error 400" if this seat is not available. The example is somewhat contrived, but a lot of software works exactly like this.
What does this mean in an LLM-first world?
In the agentic coding world we now live in, I think this points to two principles:
- The human owns the interface
- The LLM agent owns the implementation
Meaning that as a programmer, your job is only to specify the interface that your software system should adhere to. As long as the interface is satisfied, you don't need to care much about the internal implementation details.
Because LLMs are now so capable, they have a huge amount of room to play within the 'implementation' section. They can choose any algorithm they want to route between airports, as long as they find me the best flights from my starting point to my destination.
How to specify an interface?
In the flight example above, you will notice that the implementation section includes a lot of info that I did not specify in the interface. For example, a perfectly valid implementation would be one that returns 10-stop flights; which is clearly not something I want.
A central new problem for engineers to solve will likely be how to specify an interface precisely enough to produce verifiably correct behavior, without running into a map and territory issue of needing to specify every tiny detail about the system? Truss looks like a cool adventure in the correct direction.
Here are some tools that I am aware of to specify interfaces both precisely and concisely:
- Type systems -> make invalid states unrepresentable
- Dependent types -> which take types even further
- Unit tests -> that the LLM cannot change
- Formal verification
- Pre-conditions, post-conditions, invariants
I don't know what the answer is here, but it's something I want to keep thinking about.
Comments 0