IP Library › Granted Patent US 12,619,398
Granted Patent B1
US 12,619,398 · App. 19/333,888 · Granted May 5, 2026

Systems and methods for generating segment-specific source code for mainframe-source artifact

Inventors: Senthilkumar Ramakrishnan (New York, NY); Leigh-Ann Russell (New York, NY); Michael Keslar (New York, NY); Karthikeyan Nallathambi (New York, NY)
Assignee: THE BANK OF NEW YORK MELLON
G06F8/311G06F8/42
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,619,398
App. No.
19/333,888
Filed
Sep 19, 2025
Granted
May 5, 2026
Kind
B1
Art Unit
2192
USPC
717/111
Abstract

Techniques for generating segment code for a legacy mainframe-source artifact that include generating an abstract-syntax-tree (CAA-AST) from a compiler-analysis artifact (CAA) that is generated by compiling a mainframe-source artifact (MSA), and identifying a plurality of logical segments of the MSA based on the CAA-AST. For each logical segment identified, determining a segment descriptor that includes a segment identifier and a segment label, generating a segment-code prompt based on the segment descriptor, and applying the segment-code prompt to a large-language model (LLM) to generate segment code, where the segment code of the plurality of logical segments is integrated to form integrated project code for the MSA.

Claims (56)

1 . A computer-implemented method for generating segment code for a legacy mainframe-source artifact, the method comprising:

receiving, from a compiler, a compiler-analysis artifact (CAA) generated by compiling a mainframe-source artifact (MSA);

generating, from the CAA, an abstract-syntax-tree (CAA-AST);

identifying, based on the CAA-AST, a plurality of logical segments of the MSA;

for each logical segment:

determining a segment descriptor comprising a segment identifier and a segment label;

generating a segment-code prompt based on the segment descriptor; and

generating, by applying the segment-code prompt to a large-language model (LLM), segment code; and

integrating the segment code of the plurality of logical segments to form integrated project code for the MSA.

2 . The method of claim 1 , wherein the CAA comprises a SYSADATA file emitted by a mainframe COBOL compiler.

3 . The method of claim 1 , wherein the segment-code prompt is generated using a prompt template selected from a template library based on the segment label and a target programming language.

4 . The method of claim 1 , wherein the segment code comprises one or more Java classes that implement business logic extracted from the corresponding logical segment.

5 . The method of claim 1 , wherein integrating the segment code further comprises deduplicating overlapping artifacts based on segment identifiers and emitting a consolidated project structure.

6 . The method of claim 1 , further comprising generating segment documentation for the plurality of logical segments by:

generating a segment-documentation prompt for each logical segment;

applying the segment-documentation prompt to a second LLM to generate segment documentation; and

integrating the segment documentation into integrated project documentation for the MSA.

7 . The method of claim 1 , wherein the segment code is generated by a code-generation engine implemented as a software agent.

8 . A system comprising:

a processor; and

non-transitory computer-readable storage medium comprising program instructions stored thereon that are executable by the processor to cause the following operations for generating segment code for a legacy mainframe-source artifact:

receiving, from a compiler, a compiler-analysis artifact (CAA) generated by compiling a mainframe-source artifact (MSA);

generating, from the CAA, an abstract-syntax-tree (CAA-AST);

identifying, based on the CAA-AST, a plurality of logical segments of the MSA;

for each logical segment:

determining a segment descriptor comprising a segment identifier and a segment label;

generating a segment-code prompt based on the segment descriptor; and

generating, by applying the segment-code prompt to a large-language model (LLM), segment code; and

integrating the segment code of the plurality of logical segments to form integrated project code for the MSA.

9 . The system of claim 8 , wherein the CAA comprises a SYSADATA file emitted by a mainframe COBOL compiler.

10 . The system of claim 8 , wherein the segment-code prompt is generated using a prompt template selected from a template library based on the segment label and a target programming language.

11 . The system of claim 8 , wherein the segment code comprises one or more Java classes that implement business logic extracted from the corresponding logical segment.

12 . The system of claim 8 , wherein integrating the segment code further comprises deduplicating overlapping artifacts based on segment identifiers and emitting a consolidated project structure.

13 . The system of claim 8 , the operations further comprising generating segment documentation for the plurality of logical segments by:

generating a segment-documentation prompt for each logical segment;

applying the segment-documentation prompt to a second LLM to generate segment documentation; and

integrating the segment documentation into integrated project documentation for the MSA.

14 . The system of claim 8 , wherein the segment code is generated by a code-generation engine implemented as a software agent.

15 . Non-transitory computer-readable storage medium comprising program instructions stored thereon that are executable by a processor to cause the following operations for generating segment code for a legacy mainframe-source artifact:

receiving, from a compiler, a compiler-analysis artifact (CAA) generated by compiling a mainframe-source artifact (MSA);

generating, from the CAA, an abstract-syntax-tree (CAA-AST);

identifying, based on the CAA-AST, a plurality of logical segments of the MSA;

for each logical segment:

determining a segment descriptor comprising a segment identifier and a segment label;

generating a segment-code prompt based on the segment descriptor; and

generating, by applying the segment-code prompt to a large-language model (LLM), segment code; and

integrating the segment code of the plurality of logical segments to form integrated project code for the MSA.

16 . The medium of claim 15 , wherein the CAA comprises a SYSADATA file emitted by a mainframe COBOL compiler.

17 . The medium of claim 15 , wherein the segment-code prompt is generated using a prompt template selected from a template library based on the segment label and a target programming language.

18 . The medium of claim 15 , wherein the segment code comprises one or more Java classes that implement business logic extracted from the corresponding logical segment.

19 . The medium of claim 15 , wherein integrating the segment code further comprises deduplicating overlapping artifacts based on segment identifiers and emitting a consolidated project structure.

20 . The medium of claim 15 , the operations further comprising generating segment documentation for the plurality of logical segments by:

generating a segment-documentation prompt for each logical segment;

applying the segment-documentation prompt to a second LLM to generate segment documentation; and

integrating the segment documentation into integrated project documentation for the MSA.

21 . The medium of claim 15 , wherein the segment code is generated by a code-generation engine implemented as a software agent.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 19, 2025
From: RAMAKRISHNAN, SENTHILKUMAR; RUSSELL, LEIGH-ANN; KESLAR, MICHAEL; NALLATHAMBI, KARTHIKEYAN
To: THE BANK OF NEW YORK MELLON
Reel/Frame 072314/0095 →
Continuity (1)
Provisional Application 63856052 · Aug 1, 2025
References Cited (28)
US 10162610B2 · Apte et al. · 2018 [cited by applicant]
US 10545733B2 · Sabharwal et al. · 2020 [cited by applicant]
US 10846081B2 · Sigmon · 2020 [cited by examiner]
US 10970277B2 · Zhang et al. · 2021 [cited by applicant]
US 11385882B2 · Pal et al. · 2022 [cited by applicant]
US 11467951B2 · Pillai · 2022 [cited by examiner]
US 12360791B1 · Vadaparty et al. · 2025 [cited by applicant]
US 20070226690A1 · Sandys · 2007 [cited by applicant]
US 20130055211A1 · Fosback · 2013 [cited by applicant]
US 20150378880A1 · Kucharski · 2015 [cited by applicant]
US 20190155588A1 · Panchomarthi et al. · 2019 [cited by applicant]
US 20210011694A1 · Ni et al. · 2021 [cited by applicant]
US 20210192385A1 · Guiu et al. · 2021 [cited by applicant]
US 20210311709A1 · Banerjee · 2021 [cited by applicant]
US 20220001968A1 · Garner et al. · 2022 [cited by applicant]
US 20220066747A1 · Drain et al. · 2022 [cited by applicant]
US 20230393832A1 · Touati et al. · 2023 [cited by applicant]
US 20240346061A1 · Hong · 2024 [cited by applicant]
US 20250053389A1 · Jaggumantri · 2025 [cited by applicant]
US 20250053397A1 · Lee · 2025 [cited by applicant]
WO 2014155148A1 · 2014 [cited by applicant]
WO 2025195667A1 · 2025 [cited by applicant]
Micro Focus, Enterprise Sync Installation and Administration Guide, 54 pages (Year: 2017). [cited by examiner]
SYSADATA record types—IBM Documentation, downloaded Jun. 4, 2025, 2 pgs. https://www.ibm.com/docs/en/cobol-zos/6.4.0?topic=contents-sysadata-record-types. [cited by applicant]
International Search Report dated Nov. 18, 2024, issued in corresponding International Application No. PCT/US2024/040348 (3 pgs.). [cited by applicant]
Written Opinion of the International Searching Authority dated Nov. 18, 2024, issued in corresponding International Application No. PCT/US2024/040348 (4 pgs.). [cited by applicant]
Colin Diggs et al., “Leveraging LLMs for Legacy Code Modernization: Challenges and Opportunities for LLM-Generated Documentation”, Year: 2024, pp. 1-13, [Retrieved from the Internet on Nov. 12, 2025] https://arxiv.org/p… [cited by applicant]
NPL_WO 2014155148 A1_With Page No. & Line No. (Year 2014), 26 pgs. [cited by applicant]