Live data from Hacker News

AI migrated legacy COBOL programs to Java, bugs included

arxiv.org

51–60 of 108 posts

Re: AI migrated legacy COBOL programs to Java, bugs included

#51
post #23

The biggest problem is not that bugs are migrated with COBOL, but that lots of new bugs are going to be introduced. AI is not deterministic, it will be making tons of mistakes. The only realistic low-error approach is incremental step-by-step migration using Cursor or similar tools. However, it requires much more time as each step must be prompted, tested and committed manually. Any hope that one-shot migraton of a l…

> AI is not deterministic, it will be making tons of mistakes. From the paper: > The COBOL source is passed through an internal deterministic Migrator to produce a generated Java target. Also, humans are not deterministic either. Give the same COBOL -> Java translation to multiple developers and each will come up with a different solution. Heck, even the same developer will produce a different output for the same tas…

Which is why N-version programming is often used for systems that need to work (like plane software) and even then, as we know today, it can not be perfect. Google "plane software bugs history" for an insight into that.

Re: AI migrated legacy COBOL programs to Java, bugs included

#52
post #25

The biggest problem is not that bugs are migrated with COBOL, but that lots of new bugs are going to be introduced. AI is not deterministic, it will be making tons of mistakes. The only realistic low-error approach is incremental step-by-step migration using Cursor or similar tools. However, it requires much more time as each step must be prompted, tested and committed manually. Any hope that one-shot migraton of a l…

You don’t need the entire codebase in context in every moment to migrate it. Also AI being non deterministic does not prevent it from one-shotting perfect solutions 100% of the time for simple enough problems. And every model generation brings this bar higher. So that’s really not a fundamental problem. And we can also implement llm inference deterministically if we want, it’s just that it’s not worth the loss in per…

> And we can also implement llm inference deterministically if we want, it’s just that it’s not worth the loss in performance to do it.

My understanding is thats not possible (different from being practical), wonder if you have any literature, research to back up that claim?

Re: AI migrated legacy COBOL programs to Java, bugs included

#53
post #18

COBOL is not about the language, it's about the whole environment in the mainframe. LLM fanboys won't understand this. You need something like a mainframe with a 99.99% uptime no matter what happens in hardware, with live CPU swapping and such.

Can you explain why you need one machine never falling over ever instead of a cluster of machines never falling over at once collectively?

You don't. Either would work. Getting rid of a system running cobol on a mainframe is perhaps the hardest work possible in software engineering.

Re: AI migrated legacy COBOL programs to Java, bugs included

#54
post #48

Before, only the senior cobol programmers at the company understood and knew the codebase. Now, no one does. I can see the allure of moving away from a legacy cobol system. But an AI rewrite doesn't actually solve any of the issues with having a legacy cobol codebase. You just have a new system no one knows or understands.

Having worked in COBOL extensivly in the 80s and 90s, as well as working for a software house that did migrations (Craziest was Plan assembler to Dec Vax C). I do wonder how an ambitious AI would handle the maths. COBOL is renowed for its fixed no rounding maths, utterly rigid and defined in the code, Java on the other hand is not (e.g., 0.1 + 0.2 becomes 0.30000000000000004), unless they are extensivly using BigDeci…

You can't use BigDecimal either. There are libraries whose whole purpose is just to exactly reproduce COBOL arithmetic, eg. the IBM Decimal Arithmetic Library.

Re: AI migrated legacy COBOL programs to Java, bugs included

#55

The biggest problem is not that bugs are migrated with COBOL, but that lots of new bugs are going to be introduced. AI is not deterministic, it will be making tons of mistakes. The only realistic low-error approach is incremental step-by-step migration using Cursor or similar tools. However, it requires much more time as each step must be prompted, tested and committed manually. Any hope that one-shot migraton of a l…

[dead]

Re: AI migrated legacy COBOL programs to Java, bugs included

#57

Before, only the senior cobol programmers at the company understood and knew the codebase. Now, no one does. I can see the allure of moving away from a legacy cobol system. But an AI rewrite doesn't actually solve any of the issues with having a legacy cobol codebase. You just have a new system no one knows or understands.

"Now, no one does."

well, we just need to learn the rewrite then ???

Re: AI migrated legacy COBOL programs to Java, bugs included

#58
post #35

Why should I convert COBOL to Java? LLM can write COBOL just as fine.

Because humans don't want to spend time to learn how to use "dead" languages and humans still play a role in programming. Having LLMs churn out more COBOL instead of Java means more of the code base becomes 'terra incognita' for the involved humans. Learning COBOL isn't that hard - which was one of its stated purposes - but it is still seen as decidedly 'uncool' and 'legacy'. Maybe the increased role of LLMs in coding will change this and make coding in 'legacy' languages 'cool' again just like e.g. the availability of accurate time sources like mobile devices made mechanical watches trendy again or the direct access to music through streaming services made vinyl and now CDs (i.e. 'physical media') regain market share.

Maybe.

Still not something you want to risk your business on.

Re: AI migrated legacy COBOL programs to Java, bugs included

#60
post #48

Earlier quoted context omitted.

Having worked in COBOL extensivly in the 80s and 90s, as well as working for a software house that did migrations (Craziest was Plan assembler to Dec Vax C). I do wonder how an ambitious AI would handle the maths. COBOL is renowed for its fixed no rounding maths, utterly rigid and defined in the code, Java on the other hand is not (e.g., 0.1 + 0.2 becomes 0.30000000000000004), unless they are extensivly using BigDeci…

You can't use BigDecimal either. There are libraries whose whole purpose is just to exactly reproduce COBOL arithmetic, eg. the IBM Decimal Arithmetic Library.

Wow, their Java code example [0] makes COBOL look elegant and terse by comparison.

[0] https://community.ibm.com/community/user/blogs/gregory-cerne...

Post reply on HN