IBM and AWS: Accelerating code modernization with generative AI for automotive

Man using computer in office

Authors

Faisal Nazir

AWS Chief Architect

IBM Consulting

Arnaud Lauer

Partner Solution Architect

AWS

Mark Brealey

Partner SA Migrations, WWCS GSI Direct & Partner

AWS

Many automotive organizations are already working with or planning to adopt generative AI (gen AI) to modernize complex applications. Gen AI makes it possible to develop large-scale software on increasingly sophisticated vehicles.

Early adopters of gen AI technologies are already realizing benefits through operational efficiencies, productivity gains, speed of action and risk avoidance. They’ve also seen significant operational cost savings in product development, customer engagement, operations and technology optimization, and application modernization.

Application modernization transforms legacy systems by upgrading their platform infrastructure, internal architecture and codebase to meet contemporary standards. The emergence of generative AI and multiagent systems has revolutionized this process, enabling automated code conversion through large language models (LLMs).

Read the AI Academy guidebook: Put AI to work for automotive application modernization

IBM’s comprehensive suite of generative AI modernization accelerators facilitates the migration of on-premises applications and code-bases to cloud and hybrid cloud environments. This streamlines the transformation of both mainframe systems, and the application architecture and legacy code. These tools help organizations manage the complex journey from legacy infrastructure to modern cloud-native and hybrid-cloud architectures.

A leading automotive manufacturer collaborated with IBM Consulting® to modernize their codebase by using Amazon Web Services (AWS) services and generative AI. By implementing an innovative solution that converted Restructured Extended Executor (REXX) to Java code, the team achieved a reduction in conversion time while ensuring system integrity and reliability. The project not only solved immediate technical challenges but also established a blueprint for large-scale mainframe modernization.

3D design of balls rolling on a track

The latest AI News + Insights 


Discover expertly curated insights and news on AI, cloud and more in the weekly Think Newsletter. 

The challenge: Bridging the gap between legacy and modern systems

The automotive manufacturer faced a common yet complex challenge: a vast codebase of legacy REXX scripts crucial to their operations was becoming increasingly difficult to maintain and integrate with modern systems.

In addition, the skill set required to maintain this code was getting more expensive as the available talent pool had retired or moved onto other technologies. The task at hand was not just a simple code conversion but a comprehensive modernization effort that would set the stage for future innovations.

The key objectives for the project included:

  1. Efficiently converting REXX code to Java.
  2. Developing tools for improved log analysis and interpretation.
  3. Automating and enhancing code documentation processes.
  4. Generating visual representations of code architecture.
Think Keynotes

How enterprises excel in the AI era

Move beyond AI hype to measurable value. See how IBM is transforming into an AI-first enterprise and turning agentic AI into productivity, reinvestment and real business impact.

The solution: IBM harnessing AWS services and generative AI

To address these challenges, the IBM team designed a solution that combines the power of AWS services with generative AI capabilities. This innovative approach uses Amazon Bedrock to access foundation models, addressing immediate needs and laying the groundwork for ongoing modernization efforts.

Key components of the solution include:

  1. Amazon Bedrock: At the heart of our solution, Amazon Bedrock provided access to advanced foundation models, particularly Claude 2 from Anthropic, which was used in code translation and analysis.
  2. AWS Lambda: IBM used Lambda for serverless computing, enabling efficient and scalable code processing without the need for managing infrastructure.
  3. Amazon S3: Amazon S3 served as the central repository for both input REXX code and output Java code, ensuring seamless data management throughout the conversion process.
  4. Bedrock Knowledge Bases and Agents: These components facilitated retrieval augmented generation (RAG), enhancing the AI’s understanding of context-specific information and improving the accuracy of code conversion and documentation generation.

A closer look at high-level architecture

Figure 1 shows the high-level architecture developed for the code conversion use case. The architecture uses several AWS services to create an efficient REXX-to-Java conversion pipeline.

Diagram of high-level architecture developed for the code conversion use case. Figure 1: High-level architecture: Code conversion pipeline using Amazon Bedrock

This part of the process includes:

  1. Input storage: REXX code is initially uploaded to an Amazon S3 bucket.
  2. Code conversion: An AWS Lambda function, triggered by the S3 upload, initiates the conversion process. This process is orchestrated by AWS Step Functions, a serverless workflow service that uses a state machine and prompt template to guide the conversion pipeline.
  3. AI-powered conversion: The conversion pipeline is powered by Amazon Bedrock's large language model (Anthropic Claude 2) and embedding model (Amazon Titan Embeddings). It documents the original REXX code, breaks it into logical parts and converts it to Java.
  4. Quality assurance: Another Lambda function, acting as a Java compiler, checks the converted code for errors. Any compilation or runtime errors are fed back to the AI model, which suggests corrections.
  5. Iterative improvement: A feedback loop continuously refines the code, resolving compilation and runtime errors incrementally. This feedback loop is managed through the state machine.
  6. Framework adaptation: After the code meets quality standards, it’s adapted to the Java Quarkus framework for enhanced cloud compatibility.
  7. Output and deployment: The final Java code is stored in another S3 bucket. A Lambda function then deploys this code for testing and comparison against the original REXX code.

The next part of the process is the validation pipeline, which compares the REXX code with Java before product deployment, as shown in Figure 2.

Diagram of process in the validation pipeline to compare the REXX code with Java before product deployment. Figure 2: High-level architecture: Code validation pipeline

This part of the process includes:

  1. Data input: Dealer and Supplier data is transferred by using secure file transfer protocol (SFTP) to the AWS Cloud environment.
  2. Java code processing: The Dealer file is stored in an S3 bucket. A Lambda function (StockProfiler Java) processes this file, and the processed data is stored as a Java Output Datafile in another S3 bucket.
  3. REXX code processing: The Supplier data is processed by the existing REXX code and the output is stored as a REXX Output Datafile in an S3 bucket.
  4. Validation trigger: A Step Function monitors the availability of both the Java and REXX output files. When both files are available, it triggers the validation process.
  5. File comparison: A Lambda function is started to compare the Java and REXX output files.
  6. Reporting: The comparison results are compiled into a Comparison Report.

This validation pipeline helps ensure that the newly converted Java code produces outputs consistent with the original REXX code, verifying the accuracy and reliability of the conversion process. It allows for side-by-side comparison of the outputs from both systems, helping to identify any discrepancies or issues that might need to be addressed in the converted code.

Benefits: A modern vehicle diagnostics system

The implementation of a generative AI solution yielded several significant benefits for the automotive manufacturer, as demonstrated in the modernization of a critical vehicle diagnostics system.

This system, previously running on legacy mainframe infrastructure and powered by numerous REXX scripts, was essential for quality control. However, it became increasingly difficult to maintain and integrate with newer, cloud-based analytics tools.

By using our AI-powered conversion pipeline, we achieved the following outcomes:

  1. Efficient code translation: The solution demonstrated the ability to efficiently translate REXX to Java at scale, reducing manual effort in code conversion by up to 80%. In the vehicle diagnostics system case, the solution converted over 100,000 lines of REXX code to Java in just two weeks, a process that would have taken months if using traditional methods.
  2. Improved system log interpretation: The solution created a tool for quick and accurate interpretation of system logs, improving mean time to resolution (MTTR) for system issues.
  3. Enhanced code documentation: The process of generating and maintaining code documentation was streamlined, increasing coverage of the codebase. For the vehicle diagnostics system, automatically generated comprehensive documentation for the new Java codebase improved maintainability.
  4. Accelerated legacy code updates: The AI significantly reduced the time required for legacy code updates, enabling the modernization of critical systems without disrupting ongoing operations.
  5. Automatic diagram generation: The solution enabled automatic generation of diagrams from documentation, improving system understanding across development and operations teams. In the case study, visual diagrams of the system architecture facilitated better understanding across teams.
  6. Performance optimization: During the conversion process, the manufacturer was able to identify and resolve potential performance bottlenecks, ensuring the modernized system maintained optimal functionality.

The result was a modernized vehicle diagnostics system that maintained all the functionality of the original while creating new possibilities for integration with cloud-based analytics and machine learning models. These outcomes not only improved code maintainability and performance but also set the stage for broader IT infrastructure modernization efforts across the organization.

Looking ahead: Scaling the IBM and AWS solution for automotive 

Following the successful proof of concept, the automotive manufacturer is now focused on productionizing the conversion of their next 30 scripts. This phase will be a crucial stepping stone toward a more comprehensive mainframe modernization initiative, using generative AI techniques to support large-scale IT estate modernization over the next two to three years.

The key focus for this client is to move from on-premises mainframe to cloud before the end of the decade. Generative AI has proven to be a tool to help accelerate that transformation into the cloud. The roadmap includes:

  1. Expanding the AI model's training to cover a wider range of legacy languages and frameworks.
  2. Integrating the conversion pipeline with automated processes for continuous integration, testing and delivery to enable continuous modernization.
  3. Developing AI-assisted testing frameworks to help ensure the reliability of converted code.
  4. Creating a knowledge base of common conversion patterns and best practices, accessible through a RAG system.

IBM designed a powerful solution that combines AWS services with generative AI to tackle complex legacy system challenges in the automotive industry. By automating code conversion, enhancing documentation processes and providing intelligent analysis tools, the solution paves the way for more efficient and effective IT modernization efforts.

The success of this project highlights the transformative impact of cloud-based AI solutions on traditional industries. It offers a blueprint for organizations looking to modernize their legacy systems while minimizing disruption and maximizing efficiency. AI has the potential to revolutionize not just code conversion but entire software development lifecycles.

Related solutions
AI agents for business

A single solution to orchestrate AI agents, assistants and workflows across your business.

Explore watsonx Orchestrate
Hybrid cloud solutions

Manage your hybrid cloud environment to run workloads where and when you need them.

 

Explore hybrid cloud solutions
Artificial intelligence (AI) consulting services

Grow and transform your business by reimagining your strategy with AI for transformation.

 

Explore AI consulting services
Take the next step

Whether you choose to customize pre-built apps and skills or build and deploy custom agentic services using an AI studio, the IBM watsonx platform has you covered.

  1. Explore watsonx Orchestrate
  2. Explore AI consulting services