COBOL is not frequently listed as a top programming language for development, at least not in 2023. Not always the case, though. There are still billions of lines of COBOL code running in commercial applications today. COBOL, which made its debut in 1959, was a major language in the early days of computers.

The potential of generative AI large language models (LLMs) will be used by IBM as part of a new programme to assist update COBOL applications. On IBM System Z (sometimes referred to as a “Z” mainframe), COBOL code is still used today.

Utilizing IBM’s watsonx LLMs for code development, the new watsonx code assistant for Z service aids in the conversion of COBOL applications to more up-to-date Java application code. By utilizing gen AI to incrementally modernise programmes on the mainframe, IBM hopes to assist clients with filling talent gaps and utilizing Java talents while lowering risk.

During its Think conference in May, IBM first gave an overview of its Watsonx product platform as an endeavor to develop a number of AI foundation models tailored for business use cases.

In a press briefing, Skyla Loomis, VP for IBM Z Software, noted that the usage of generative AI for code assistance is rapidly becoming a critical use case and a market trend. Developers can evaluate, update, and test the proper code more quickly with the aid of generative AI.

Why it’s important to update COBOL

A significant problem with COBOL code is that the number of developers who can genuinely maintain it is decreasing.

Approximately 84% of IBM’s Z mainframe clients, according to Loomis, are running COBOL programmes. As a result, it is crucial to support businesses in updating their code in a way that makes it easier to maintain. Due to the paucity of COBOL expertise, IBM focused on teaching its AI COBOL so that it would truly grasp the archaic programming language.

Kyle Charlet, CTO for IBM Z Software, described how watsonx code assistant was taught to recognize COBOL code during the press conference. According to Charlet, CodeNet, one of the world’s largest code data repositories, served as the initial training ground for Watson’s code helper. He mentioned that IBM is also actively training and fine-tuning the Watsonx model in addition to the CodeNet code.

They are fine-tuning that model in Enterprise Z COBOL and handing it a tone of COBOL Java pairs so that it knows precisely how to do that, he said.

How generative AI converts legacy COBOL code into modern Java

With the help of general AI, the watsonx code assistant can analyze, rewrite, transform, and validate COBOL applications.

To “surgically extract” a logical business function from a sizable monolithic COBOL application, Charlet said that the new offering can be leveraged. The recovered COBOL code can then be converted to Java by using the watsxonx code helper to create a Java class hierarchy. The solution generates automated tests to confirm that the new Java code is semantically identical to the old COBOL in order to validate the conversion.

The watsonx code helper does not translate COBOL syntax line by line into Java, according to Charlet. He pointed out that would result in the expression of COBOL syntax in Java, which in his experience is mainly hard to read and unmaintainable. The IBM method entails translating the COBOL code’s intent into understandable Java code.

According to Charlet, this Java needs to be recognizable and maintainable by Java experts.

Why code doesn’t lie or hallucinate, like text

The possibility of hallucination with gen AI technology is common and can lead to inaccurate outcomes.

While hallucinations frequently occur when using AI to generate text, Charlet suggested that this is less likely when using code in general for a variety of reasons. He pointed out that a person might not see the hallucination as an error given how human language is interpreted and the possibility of hallucinations. Text is open to human interpretation, whereas code functions considerably differently than text.

He clarified that IBM checks the generated code in the watsonx code helper situation. Any hallucinations will be highlighted by the validation right away because the code won’t run, if it runs at all. As a result, Charlet said that while hallucinations might be a result of code production, they are not subjective and can be recognized and treated.

Code is honest, according to Charlet. A number of machine instructions are included in code, which you must follow.

Source link