When a Machine Makes a Mess: What CASE Tools Can Teach Us About Generative AI Coding

Vintage PACBASE terminal displaying a login screen with GPT6 and LLM references, illustrating machine-generated code and the challenges of software maintainability.

You can see everything.1
By Ed Bednar

Tell an AI what you want, and it will produce source code for you in Python, TypeScript, C++, Rust, and dozens of other languages, with varying degrees of success.

These agents can also review your existing codebases, explain unfamiliar programs, generate test suites, and modify code, all with or without your direct involvement.

While this is new, back in the 1980s and 1990s, Computer-Aided Software Engineering (CASE) tools also had promised to automate large parts of software development.

PACBASE, one of the most widely used CASE tools, was used to generate COBOL for enterprise systems, much of which has remained in production for decades.

COBOL, of course, has a way of doing that.

Over time, though, as organizations increasingly needed to maintain and optimize that code independently of its tooling, they had to contend with the almost unimaginable mess the machine had left behind.

The Model Is Only Part of the Machinery

When Anthropic accidentally exposed the source code for Claude Code in March 2026, we got an unexpected, detailed look at how modern AI coding agents work.2

We learned that while the language model generates code and makes many of the decisions about what to do and when, deterministic software handles much of the surrounding work. 

Claude still searches repositories, manipulates files, manages context, executes commands, and coordinates the code generation process using ordinary programming methods. It even uses regular expressions, just like the rest of us.

This all sounded a little familiar, though, so I started to reflect back on CASE tools, where generated code was one component inside a larger machine of development tooling.

Code Generation, Then and Now

CASE tools, in their era, provided development environments where programmers created structured specifications that deterministic generators translated into source code.

The same specification always produced the same output.

But now, generative AI uses probabilistic models to generate source code from prompts, codebase context, and learned programming patterns.

It then uses feedback from compilers, tests, and other tools to refine the generated code.

But programming is only part of software engineering, and our experience with CASE tools offers a perspective on what happens years after the code is generated, when someone has to maintain it differently.

When PACBASE Wrote the COBOL

PACBASE provided a structured development environment in which developers defined programs, described data structures, and wrote procedural logic in a proprietary language called Structured Code. It then generated COBOL for a targeted computing environment.

Consider this instruction in PACBASE where the DW operator represents a DO WHILE structure:

DW I06 NOT > 27

Now look at selected lines from the COBOL that PACBASE would generate from that specification:

F76AL.
    IF I06 NOT > 27
        NEXT SENTENCE ELSE GO TO F76AL-FN.

    ...

F76AL-900. GO TO F76AL.
F76AL-FN. EXIT.

The developer defined a structured loop, and the generator produced a labeled paragraph, a conditional transfer to an exit label, and an unconditional jump back to the beginning.3

So, the PACBASE-generated code essentially translated higher-level structured instructions into explicit control-flow statements, using COBOL as the target language.

If, illustratively, we were writing that in x86 assembly, it might look like this:

L1:
    cmp ecx, 27
    jg  L2

    ...

    inc ecx
    jmp L1
L2:

In a sense, the PACBASE-generated code resembled a lower-level compiler representation much more than conventional, human-readable source code.

Although still COBOL, it served much the same purpose as an intermediate representation between PACBASE’s Structured Code and the compiled executable.

And everything was fine until the generator went away and the intermediate representation became the only representation anyone had left.

When Generated Code Became the Source of Truth

As PACBASE aged, vendor support was eventually phased out, and organizations began moving away from it. But the programs it had generated still needed to be maintained, modified, and optimized.

In a 2020 study,4 researchers examined the complexity of transforming PACBASE-generated COBOL such as the following:

F05DC.
    MOVE 1 TO ICATR.
    GO TO F05DC-B.
F05DC-1.
    ADD 1 TO ICATR.
F05DC-B.
    IF 10 < ICATR THEN
        GO TO F05DC-FN
    END-IF.
    IF CATX(ICATR) = '0' THEN
        NEXT SENTENCE
    ELSE
        GO TO F05DC-C
    END-IF.
    MOVE 'X' TO CATM(ICATR).
F05DC-C.
    IF CATX(ICATR) NOT = '0' THEN
        NEXT SENTENCE
    ELSE
        GO TO F05DC-D
    END-IF.
    MOVE 'Y' TO CATM(ICATR).
F05DC-D.
    GO TO F05DC-A.
F05DC-FN.
    EXIT.

into conventionally structured code:

PERFORM
    VARYING ICATR FROM 1 BY 1
    UNTIL 10 < ICATR
    IF CATX(ICATR) = '0' THEN
        MOVE 'X' TO CATM(ICATR)
    ELSE
        MOVE 'Y' TO CATM(ICATR)
    END-IF
END-PERFORM.

Even a relatively simple loop required 33 intermediate transformations to reconstruct its control flow, simplify conditions, and eliminate artifacts of the original generation process.

And this is just one small example. 

The modernization team had to develop hundreds of transformation rules over many years, applying them iteratively to codebases containing hundreds of millions of lines.

Untangling the generated code was complicated enough. But engineers also had to preserve its behavior within the larger application setting it belonged to, often across relationships that weren’t apparent from examination of any individual program.

Who Says Code Has to Be Readable?

The capabilities of AI coding agents are developing very quickly, and we’re still learning what that means for the practice of software engineering. 

And we simply don’t have enough evidence to know whether the structures and conventions we’ve developed for human programmers are equally effective for AI coding agents.

But the conventions and tooling we’ve developed to make code easier to work with were hard-earned. So I think it’s reasonable to look at historical analogues like CASE tools and consider, at least intellectually, whether we’re heading for a fucking disaster.

Let’s look at program size to illustrate.

Over time, we’ve developed practices for breaking complicated programs into smaller, more manageable pieces. We use modularity, small functions, and abstractions to organize complexity and make software easier to understand and maintain.

But we don’t know whether those constructs are the most effective way for AI coding agents to reason about and work with code. 

So, if AI agents can work more efficiently with different structures, it’s easy to imagine that our conventions for organizing programs, including their size, could change.

And much of the tooling we’ve built around those conventions, including linters, IDEs, and code-review systems, may warrant similar reconsideration.

Except these are just obvious, surface-level considerations. If AI-generated software gets closer to the machine, things could get a lot more interesting.

Beneath the Source Code

Compilers, for instance, work with representations of software that were never designed for human programmers to read.

We occasionally examine code at this level when debugging, tuning for performance, or investigating security problems. But, ordinarily, we work with higher-level source code and leave the rest to the compiler.

An Intermediate Representation

One interesting example being explored in research on AI coding agents is the use of LLVM Intermediate Representation, or LLVM IR.

LLVM IR is a low-level, largely target-independent representation used within the LLVM compiler infrastructure.

Compilers for languages including C, C++, Rust, and Swift use LLVM IR as an intermediate stage between higher-level source code and the machine instructions ultimately executed by the processor.

It gives compilers a common representation for analyzing, transforming, and optimizing programs before generating machine code.

Consider this simple C++ function:

int classify(int value) {
    if (value > 27) {
        return 1;
    }
    return 0;
}

A simplified, unoptimized LLVM IR representation might look like this:

define i32 @classify(i32 %value) {
entry:
    %test = icmp sgt i32 %value, 27
    br i1 %test, label %greater, label %otherwise

greater:
    ret i32 1

otherwise:
    ret i32 0
}

The logic is recognizable, but the representation is different. The comparison produces an explicitly typed Boolean value, and the conditional statement becomes a branch between two basic blocks.

LLVM IR also uses Static Single Assignment (SSA) form for register values, where each named value is defined once. This makes data dependencies easier for compiler algorithms to analyze.

For more complicated programs, structured loops and conditional statements become graphs of basic blocks connected by branches. These representations allow compiler passes to examine and manipulate control flow, data dependencies, and other program properties.

Sound familiar?

PACBASE also translated structured programming constructs into explicit control-flow statements. But there is an important distinction between the two.

LLVM IR is designed to be an intermediate representation within a compiler pipeline. Although it has a human-readable textual form, developers generally maintain the higher-level source code and let the compiler regenerate the IR.

PACBASE-generated COBOL, despite being source code, also served as an intermediate representation. It was designed for machine consumption rather than human readability.

Blurring the Boundaries

What makes this particularly interesting in the context of AI coding agents is the possibility that the traditional boundaries between source code, intermediate representations, and machine instructions may become less consequential in the development and maintenance of software.

An AI coding agent capable of reasoning about and manipulating software across these different representations could blur the distinction between coding and compilation itself. Different portions of an application might even be generated and maintained at different levels of abstraction.

This raises some interesting questions about what constitutes source code, which representation of a program remains authoritative, and how we establish that transformations across these representations preserve the intended behavior of the software.

AI as a Compiler Optimizer

In the 2026 study CIRBench: Evaluating Large Language Models as LLVM IR Optimizers, researchers investigated the ability of large language models to perform compiler optimizations directly on LLVM IR.5

Presented at ICML 2026, the benchmark included 800 LLVM IR examples across four tracks: Analysis, Repair, Refactor, and Transform.

The results were mixed.

The evaluated models generally fell short of LLVM’s own optimization performance, although in one instance a model achieved a nearly fivefold speedup over LLVM’s -O3 optimization level. (The -O3 setting applies aggressive compiler optimizations intended to maximize the execution performance of a program.)

The researchers also used verification and equivalence checking to evaluate results rather than assuming that a plausible transformation preserved program behavior.

But there are important limitations to what this research establishes.

The models were working with existing intermediate representations, not generating complete applications from scratch. And the results don’t demonstrate that LLVM IR, or any other compiler-oriented representation, is inherently better suited to AI coding agents than conventional source code.

But they do demonstrate that language models can participate, perhaps imperfectly, at least for now, in software analysis and transformation below the level at which we, human programmers, ordinarily work.

And that brings us back to one of the lessons of PACBASE: whatever representations and development machinery we use, we must preserve our ability to understand, modify, and verify the code that is produced.

Keeping Control of What We Create

None of this suggests we should stop using generative AI to write software. Nor does the PACBASE experience establish that today’s coding agents will create similar maintenance problems.

The technologies are fundamentally different.

PACBASE was deterministic and produced machine-shaped code; AI coding agents use probabilistic models and generally write code in human idiomatic styles. Agents can also do things CASE tools never could, like read, explain, and modify existing code.

But the history does suggest four practical considerations for architects, each serving one test: can the organization still direct, modify, and verify its software if the development machinery changes or becomes unavailable?

1. Preserve what the software is supposed to do.

Requirements, interface contracts, data models, architectural constraints, and other specifications should be kept in tool-neutral forms, maintained as artifacts in their own right.

Specifications alone won’t regenerate the same implementation, so the code itself must also remain a durable artifact. Both are necessary to preserve the intended behavior and the implementation decisions made along the way.

This is familiar systems engineering, although its importance may increase when humans become less involved in writing the code.

2. Establish ways to verify behavior independently of the generator.

Compilers, type systems, static analysis tools, automated tests, security controls, and runtime observability systems all contribute different kinds of evidence.

These mechanisms should evaluate the implementation against independently established requirements and constraints rather than merely confirming that the model produced something plausible.

AI agents can help generate and execute tests, too. But when the same system produces the implementation and the evidence used to validate it, architects should consider how much independent assurance that evidence actually provides.

And that evidence is only as independent as its basis: a model that misreads a requirement can misread it the same way in both the code and the tests.

3. Treat the development machinery as architecture.

Models, agent frameworks, prompts, context-management mechanisms, compilers, linters, and other tools are already part of the architecture through which software is produced and maintained.

That development architecture deserves deliberate engineering.

Make sure you know which components are interchangeable, which decisions depend on a particular model or vendor, and how requirements, generated code, and verification results can be traced to one another.

The same applies to decisions agents make autonomously, the controls governing those decisions, and the organization’s ability to reproduce builds and maintain the development process as its components change.

4. Preserve the ability to maintain the software without the generator.

PACBASE demonstrated that software can outlive the technology responsible for generating it.

Today, readable source code and conventional development tools provide an important degree of independence from AI coding agents. But retaining source code is not the same as retaining the ability to understand, build, modify, and operate the software.

That’s worth preserving, even as we experiment with different ways of generating and maintaining software.

Generating code has become remarkably easy. But understanding what we’ve generated, verifying that it works, and maintaining it long after the machinery has changed remain engineering responsibilities.

The Limits of Transparency 

There’s an irony here. We have more access to generated source code than ever before. We can ask an AI to explain almost any line, trace its dependencies, and propose modifications. 

We can see everything.

Elizabeth Holmes famously made much the same assurance about Theranos. But seeing what a machine produces is a long way from knowing what happens inside it, much less whether it works. 

Generative AI coding is an entirely different proposition, of course. But still, there’s something worth remembering about the difference between transparency and independent verification.

And when something goes wrong, if the machine makes a mess, we’d better still be able to establish what actually happened.

In the next article, Not Every Program Deserves a Future, we’ll look at disposable code and how generative AI is making it easier to build prototypes, proofs of concept, and other short-lived software and what that means, moving forward, for software engineering.

Notes:
1. Fielder, N., & Oppenheim, L. (Directors). (2026). You Can See Everything [Documentary film]. A24. October 16, 2026. Retrieved from https://production.a24films.com/films/you-can-see-everything
2. Franzen, C. (2026). Claude Code’s source code appears to have leaked: here’s what we know. VentureBeat. March 31, 2026. Retrieved from https://venturebeat.com/ai/claude-codes-source-code-appears-to-have-leaked-heres-what-we-know
3. IBM. (2006). VisualAge Pacbase: Structured Code, Version 3.5 (Second Edition). Chapter 5, Modifying the Procedure Division. November 2006. Retrieved from https://manuals.plus/m/34615f15e3c63813f63247adb854f2b65fb718badc697b5d51cd92a914df3d93.pdf
4. Deknop, C., Fabry, J., Mens, K., & Zaytsev, V. (2020). Improving a Software Modernisation Process by Differencing Migration Logs. Proceedings of the 21st International Conference on Product-Focused Software Process Improvement (PROFES 2020), pp. 270–286. Springer. November 21, 2020. Retrieved from https://doi.org/10.1007/978-3-030-64148-1_17
5. Yang, Z., Ding, H., Liu, F., Cheng, Y., Cheng, H., Chai, Z., & Zhou, H. (2026). CIRBench: Evaluating Large Language Models as LLVM IR Optimizers. Proceedings of the 43rd International Conference on Machine Learning (ICML 2026), Vol. 306, pp. 144491–144544. Proceedings of Machine Learning Research (PMLR). July 6–11, 2026. Retrieved from https://proceedings.mlr.press/v306/yang26m.html