Computer-implemented method, computer program, and system (matching source code and executable program)

By disassembling executable files to create an IR and matching source program statements, the method accurately identifies and addresses performance issues in source code, enhancing debugging and tuning efficiency.

JP2026031436APending Publication Date: 2026-02-24INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025118372
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-09
Filing Date
2025-07-14
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing software debugging and performance tuning techniques struggle to accurately identify problematic portions of source code, as they often fail to correlate machine instructions back to the source program, leading to inefficient and costly troubleshooting.

Method used

A computer-implemented method and system that disassembles a compiled executable file to create an intermediate representation (IR) of the source program, matches individual statements to corresponding portions of the IR, and determines source program line numbers and user variables to pinpoint underperforming areas.

Benefits of technology

Enables precise identification of problematic source code portions, improving software debugging and performance tuning efficiency and reducing costs by linking performance issues directly to specific lines and variables in the source code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026031436000001_ABST
    Figure 2026031436000001_ABST
Patent Text Reader

Abstract

The goal is to enable the software to meet desired performance criteria.SOLUTION: A computer-implemented method for creating an intermediate representation (IR) of a source program by disassembling a compiled executable file and accessing source information describing the source program. In an embodiment, the method further includes matching individual statements of the source program to corresponding portions of the IR of the source program, wherein the mapping is based at least in part on the source information, and determining a source program line number of at least one constraint of the plurality of constraints based on the matching. In an embodiment, the method further comprises outputting a source program line number and any user variables for the at least one constraint.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] Aspects of the present invention generally relate to systems and methods for identifying problematic portions of source program code. [Background technology]

[0002] A compiler is a specialized software tool that converts source code written in a high-level programming language into machine code or an intermediate form that can be executed by a computer's processor. This process involves several stages, including lexical analysis, syntactic analysis, semantic analysis, optimization, and code generation. During these stages, the compiler checks for syntactic and semantic errors, optimizes the code for performance and efficiency, and finally produces an executable program. The primary goal of a compiler is to allow developers to write programs in a human-readable language while ensuring that the program can be executed efficiently by a computer's hardware.

[0003] Debugging code is the process of identifying, diagnosing, and fixing bugs or errors in a software program so that it runs as intended. It involves systematically examining the code to identify the cause of problems, which may manifest as syntax errors, logic errors, or runtime errors. Tools such as debuggers, integrated development environments (IDEs), and logging frameworks are commonly used to assist in this process. Debugging typically involves setting breakpoints, stepping through the code, inspecting variables, and analyzing the flow and state of the program at various points of execution.

[0004] In software development, performance tuning involves the process of optimizing software to improve its efficiency, speed, and resource utilization. This often involves identifying and addressing bottlenecks, reducing latency, increasing throughput, and minimizing consumption of system resources such as memory and CPU. Performance tuning techniques may include improving algorithms, optimizing code, improving data structures, caching frequently accessed data, and employing efficient database queries. Performance tuning also involves profiling and monitoring to analyze application behavior under different conditions and workloads. The goal is to enable software to meet desired performance criteria. Summary of the Invention [Problem to be solved by the invention]

[0005] The goal is to enable the software to meet desired performance criteria. [Means for solving the problem]

[0006] In a first aspect of the present invention, there is a computer-implemented method including: creating, by a processor set, an intermediate representation (IR) of a source program by disassembling a compiled executable file; accessing, by the processor set, source information describing the source program; matching, by the processor set, individual statements of the source program to corresponding portions of the IR of the source program, wherein the mapping is based at least in part on the source information; determining, by the processor set, a source program line number of at least one constraint of a plurality of constraints based on the matching; and outputting the source program line number of the at least one constraint.

[0007] In another aspect of the invention, there is a computer program product comprising one or more computer-readable storage media having program instructions collectively stored on the one or more computer-readable storage media, the program instructions being executable to: create an IR of a source program by disassembling a compiled executable file; access source information describing the source program; match individual statements of the source program to corresponding portions of the IR of the source program, where the mapping is based at least in part on the source information; determine a source program line number of at least one constraint of a plurality of constraints based on the matching; and output the source program line number of the at least one constraint.

[0008] In another aspect of the invention, there is a system that includes a set of processors, one or more computer-readable storage media, and program instructions collectively stored on the one or more computer-readable storage media, the program instructions being executable to: create an IR of a source program by disassembling a compiled executable file; access source information describing the source program; match individual statements of the source program to corresponding portions of the IR for the source program, where the mapping is based at least in part on the source information; determine a source program line number of at least one constraint of a plurality of constraints based on the matching; and output the source program line number of the at least one constraint.

[0009] In a first aspect of the present invention, there is a computer-implemented method that includes: obtaining, by a processor set, a compiled executable file from a data storage device; identifying, by the processor set, at least one underperforming portion of the compiled executable file; creating, by the processor set, an IR of a source program; mapping, by the processor set, individual statements of the source program to corresponding portions of the IR of the source program; determining, by the processor set, a source program line number and at least one user variable for at least one constraint of a plurality of constraints based on the mapping; and outputting the source program line number and the at least one user variable of a constraint associated with the at least one underperforming portion of the compiled executable file.

[0010] In another aspect of the invention, there is a computer program product comprising one or more computer-readable storage media having program instructions collectively stored on the one or more computer-readable storage media, the program instructions being executable to retrieve a compiled executable file from a data storage device; identify at least one underperforming portion of the compiled executable file; create an IR of a source program; map individual statements of the source program to corresponding portions of the IR of the source program; determine a source program line number and at least one user variable for at least one constraint of a plurality of constraints based on the mapping; and output the source program line number and the at least one user variable for a constraint associated with the at least one underperforming portion of the compiled executable file. [Brief explanation of the drawings]

[0011] Aspects of the present invention are described in the following detailed description, with reference to the several drawings, which are mentioned by way of non-limiting examples of illustrative embodiments of the invention.

[0012] [Figure 1] 1 illustrates a computing environment in accordance with an embodiment of the present invention.

[0013] [Figure 2] 1 illustrates a block diagram of an exemplary environment in accordance with an aspect of the present invention.

[0014] [Figure 3] 1 shows a flowchart of an exemplary method according to an aspect of the present invention.

[0015] [Figure 4] 1 illustrates a block diagram of an exemplary environment in accordance with an aspect of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0016] Aspects of the present invention generally relate to systems and methods for identifying problematic portions of source code of a source program, and more particularly to matching a parsed representation of a source program with a disassembled representation of a corresponding executable program to accurately identify problematic portions of the source code.

[0017] According to one aspect of the present invention, there is provided a computer-implemented method and system for matching a parsed representation of a source program (source code) to a disassembled representation of a corresponding executable program. The method and system include disassembling a compiled executable file (i.e., executable file) of the source program to create an IR for the source program; obtaining source information for the source program (e.g., by parsing the source program), including a parse tree and symbol information; using the source information to match individual statements in the source program to corresponding families in the IR for the source program, where a family in the IR (e.g., a tree-formed IR) represents a single instance of a single statement in the source program; and determining source program line numbers and user variables used in each family based on the matching. In an embodiment, each family may be modeled as a constraint having a list of candidate line numbers. In an embodiment, each family may be modeled as a list of candidate variables from the source program for each user variable used in the family.

[0018] According to one aspect of the present invention, there is a computer-implemented method including: creating, by a processor set, an IR of a source program by disassembling a compiled executable file; accessing, by the processor set, source information describing the source program; matching, by the processor set, individual statements of the source program to corresponding portions of the IR of the source program, where the mapping is based at least in part on the source information; determining, by the processor set, source program line numbers of at least one constraint of the plurality of constraints based on the matching; and outputting the source program line numbers of the at least one constraint. The above features provide a way to overcome problems in existing techniques by providing a method that enables matching a parsed representation of a source program to a corresponding disassembled representation of an executable program to precisely identify problematic portions of the source code. This creates a more efficient and cost-effective way to identify and fix problems in source code, resulting in improved computer capabilities and advances in the art of software compiling, software debugging, and software performance tuning.

[0019] In an embodiment, the computer-implemented method further includes accessing the compiled executable file at a remote device. By storing the compiled executable file and accessing the compiled executable file at a remote device, the method provides the ability to preserve local resources and leverage more robust remote resources.

[0020] In an embodiment, the computer-implemented method further includes determining whether at least one constraint can be combined with an additional constraint to form a single combined constraint. By combining constraints into a single combined constraint, the method provides the ability to determine more information to better match a parsed representation of a source program to a corresponding disassembled representation of an executable program.

[0021] In an embodiment, the computer-implemented method further includes determining whether the candidate symbols of the at least one constraint can be refined. By determining whether the candidate symbols can be refined, the method provides the ability to determine more information to better match the parsed representation of the source program to the disassembled representation of the corresponding executable program.

[0022] In an embodiment, the computer-implemented method further includes determining whether the candidate line of the at least one constraint can be refined. By determining whether the candidate line can be refined, the method provides the ability to determine more information to better match the parsed representation of the source program to the disassembled representation of the corresponding executable program.

[0023] In an embodiment, the computer-implemented method further includes propagating information describing the at least one constraint to other constraints of the plurality of constraints. By propagating the information to the other constraints, the method provides an efficient and computationally economical way to increase the amount of information known about the other constraints.

[0024] In an embodiment, other constraints of the plurality of constraints are adjacent to at least one constraint. By propagating information to the other adjacent constraints, the method provides an efficient and computationally saving way to increase the amount of information known about the other adjacent constraints.

[0025] According to one aspect of the present invention, there is provided a computer program product comprising one or more computer-readable storage media having program instructions collectively stored thereon. The program instructions are executable to: create an IR of a source program by disassembling a compiled executable file; access source information describing the source program; match individual statements of the source program to corresponding portions of the IR of the source program, where the mapping is based at least in part on the source information; determine a source program line number for at least one constraint of a plurality of constraints based on the matching; and output the source program line number for the at least one constraint. The above features provide a computer program product that overcomes problems in existing technology by providing a method that enables matching a parsed representation of a source program to a corresponding disassembled representation of an executable program to precisely identify problematic portions of the source code. This creates a more efficient and cost-effective method for identifying and correcting problems in source code, resulting in improved computer functionality and advances in the art of software compiling, software debugging, and software performance tuning.

[0026] In an embodiment, the computer program product further includes program instructions for accessing the compiled executable file on a remote device. By storing the compiled executable file and accessing the compiled executable file on a remote device, the computer program product provides the ability to preserve local resources and leverage more robust remote resources.

[0027] In an embodiment, the computer program product further includes program instructions for determining whether at least one constraint can be combined with an additional constraint to form a single combined constraint. By combining constraints into a single combined constraint, the computer program product provides the ability to determine more information to better match a parsed representation of a source program to a corresponding disassembled representation of an executable program.

[0028] In an embodiment, the computer program product further includes program instructions for determining whether the candidate symbols of the at least one constraint can be refined. By determining whether the candidate symbols can be refined, the computer program product provides the ability to determine more information to better match the parsed representation of the source program to the disassembled representation of the corresponding executable program.

[0029] In an embodiment, the computer program product further includes program instructions for determining whether a candidate line of the at least one constraint can be refined. By determining whether a candidate line can be refined, the computer program product provides the ability to determine more information to better match a parsed representation of a source program to a disassembled representation of a corresponding executable program.

[0030] In an embodiment, the computer program product further includes program instructions for propagating information describing the at least one constraint to other constraints of the plurality of constraints. By propagating the information to the other constraints, the computer program product provides an efficient and computationally saving way to increase the amount of information known about the other constraints.

[0031] In an embodiment, other constraints of the plurality of constraints are adjacent to at least one constraint. By propagating information to the other adjacent constraints, the computer program product provides an efficient and computationally-saving way to increase the amount of information known about the other adjacent constraints.

[0032] According to one aspect of the present invention, there is a system including a set of processors, one or more computer-readable storage media, and program instructions collectively stored on the one or more computer-readable storage media. The program instructions are executable to: create an IR of a source program by disassembling a compiled executable file; access source information describing the source program; match individual statements of the source program to corresponding portions of the IR of the source program, where the mapping is based at least in part on the source information; determine a source program line number of at least one constraint of a plurality of constraints based on the matching; and output the source program line number of the at least one constraint. The above features provide a system that overcomes problems in existing technology by providing a method that enables matching a parsed representation of a source program to a corresponding disassembled representation of an executable program to precisely identify problematic portions of the source code. This creates a more efficient and cost-effective method for identifying and correcting problems in source code, resulting in improved computer capabilities and advances in the art of software compiling, software debugging, and software performance tuning.

[0033] In an embodiment, the system further includes program instructions for accessing the compiled executable file on a remote device. By storing the compiled executable file and accessing the compiled executable file on a remote device, the system provides the ability to preserve local resources and leverage more robust remote resources.

[0034] In an embodiment, the system further includes program instructions for determining whether at least one constraint can be combined with additional constraints to form a single combined constraint and whether a candidate symbol of the at least one constraint can be refined. By combining constraints into a single combined constraint, the system provides the ability to determine more information to better match a parsed representation of a source program to a disassembled representation of a corresponding executable program. By determining whether a candidate symbol can be refined, the system provides the ability to determine more information to better match a parsed representation of a source program to a disassembled representation of a corresponding executable program.

[0035] In an embodiment, the system further includes program instructions for determining whether a candidate line of the at least one constraint can be refined. By determining whether a candidate line can be refined, the system provides the ability to determine more information to better match a parsed representation of a source program to a disassembled representation of a corresponding executable program.

[0036] In an embodiment, the system further includes program instructions for propagating information describing the at least one constraint to other constraints of the plurality of constraints. By propagating the information to other constraints, the system provides an efficient and computationally saving way to increase the amount of information known about the other constraints.

[0037] In an embodiment, other constraints of the plurality of constraints are adjacent to at least one constraint. By propagating information to the other adjacent constraints, the system provides an efficient and computationally economical way to increase the amount of information known about the other adjacent constraints.

[0038] According to one aspect of the present invention, there is a computer-implemented method including: retrieving, by a processor set, a compiled executable file from a data storage device; identifying, by the processor set, at least one under-performing portion of the compiled executable file; creating, by the processor set, an IR of a source program; mapping, by the processor set, individual statements of the source program to corresponding portions of the IR of the source program; determining, by the processor set, a source program line number and at least one user variable for at least one constraint of a plurality of constraints based on the mapping; and outputting, by the processor set, the source program line number and at least one user variable for the constraint associated with the at least one under-performing portion of the compiled executable file. The above features provide a way to overcome problems in existing techniques by providing a method that enables matching a parsed representation of a source program to a corresponding disassembled representation of an executable program to precisely identify problematic portions of the source code. This creates a more efficient and cost-effective way to identify and fix problems in source code, resulting in improved computer capabilities and advances in the art of software compiling, software debugging, and software performance tuning.

[0039] In an embodiment, the computer-implemented method further comprises identifying at least one underperforming portion of the compiled executable file comprising identifying multiple underperforming portions of the compiled executable file. By identifying constraints associated with the at least one underperforming portion of the compiled executable file, the method provides a user with additional information to aid in troubleshooting and modifying the source code in an efficient and cost-effective manner.

[0040] In an embodiment, the computer-implemented method further includes ranking the multiple underperforming portions of the compiled executable file that are causing larger performance problems. By ranking the underperforming portions of the compiled executable file, the method provides a user with additional information to aid in troubleshooting and modifying the source code and correcting performance problems in an efficient and cost-effective manner.

[0041] According to one aspect of the present invention, there is a computer program product comprising one or more computer-readable storage media having program instructions collectively stored thereon. The program instructions are executable to: retrieve a compiled executable file from a data storage device; identify at least one under-performing portion of the compiled executable file; create an IR of a source program; map individual statements of the source program to corresponding portions of the IR of the source program; determine, based on the matching, a source program line number and at least one user variable for at least one constraint of the plurality of constraints; and output the source program line number and at least one user variable for the constraint associated with the at least one under-performing portion of the compiled executable file. The above features provide a computer program product that overcomes problems in existing technology by providing a method that enables matching a parsed representation of a source program to a corresponding disassembled representation of an executable program to accurately identify problematic portions of the source code. This creates a more efficient and cost-effective method for identifying and correcting problems in source code, resulting in improved computer functionality and advances in the art of software compiling, software debugging, and software performance tuning.

[0042] In an embodiment, the computer program product further comprises: identifying at least one underperforming portion of the compiled executable file comprises identifying a plurality of underperforming portions of the compiled executable file, and the program instructions are further executable to rank the plurality of underperforming portions by determining which of the plurality of underperforming portions of the compiled executable file are causing the larger performance problems. By identifying and ranking the underperforming portions of the compiled executable file, the method provides a user with additional information to aid in troubleshooting and modifying the source code in an efficient and cost-effective manner.

[0043] In an exemplary use case, a common business-oriented language (COBOL) compiler may generate a compiled executable file that accurately performs the operations specified in the source code. In other words, as noted above, in some cases, compilers and code optimizers may generate suboptimal executable files due to suboptimal source code or compiler options. For example, COBOL's default numeric type is a printable string, which must be converted to another type for use in calculations. If a user selects a different numeric type, the compiler avoids the overhead of converting numbers to and from different formats. Runtime options can also affect the performance of a COBOL program. Thus, executable files compiled by a COBOL compiler may have performance issues. According to aspects of the present invention, the methods, systems, and computer program products described herein may identify performance issues in a compiled executable file, match individual statements (e.g., lines, verbs, and symbols) of a source program to corresponding portions of a disassembled compiled executable file, and / or identify the extent to which the identified performance issues affect the application's performance.

[0044] Implementations of the present invention are necessarily rooted in computer technology: for example, the steps of creating an IR of a source program by disassembling a compiled executable file, matching individual statements of the source program to corresponding portions of the IR of the source program, determining a source program line number and at least one user variable for at least one constraint of the plurality of constraints based on the matching, and outputting the source program line number and the at least one user variable for the at least one constraint are computer-based and cannot be performed by a human mind.

[0045] A compiler generates machine code that exactly performs the operations specified in the source code. However, in some or many cases, suboptimal source code or compiler options cause the compiler to generate suboptimal code. For example, a computer language's default numeric type may be based on printable strings and must be converted to another data type for use in calculations. For example, a signed zoned decimal type is based on printable strings, but as a result, it is not fully printable because the sign code generates unintended display characters. However, if the user selects a different numeric type in the source code, the compiler can convert numbers to a different format and / or avoid the overhead of converting numbers from one format to another. Runtime options can also affect program performance. Many users want to adjust programs and options to improve application performance. When tuning for performance, users may want to first focus on areas where tuning is expected to provide the greatest performance improvement.

[0046] Performance tuning is a major pain point for many users because finding performance problems in the source code of a source program is tedious, costly, and often ineffective. Compilers and other tools can find performance problems through static analysis of source code, but users cannot determine whether each of those problems actually affects the overall execution time of a program. While some existing techniques can find hotspots, hotspots are not necessarily associated with performance degradation; hotspots that are associated with performance degradation may instead be due to inefficient choices made by the compiler rather than the user, further disabling users unless they have intricate knowledge of the compiler being used. Furthermore, while existing techniques can disassemble machine instructions within hotspots, existing techniques cannot and do not correlate the disassembled machine instructions back to the source program.

[0047] According to aspects of the present invention, a method may assist a user in their performance tuning efforts by combining information from a profiler (e.g., a performance profiler) with analysis of a program. In embodiments, the systems and methods described herein may identify what each performance problem is, where it may be located in the source code, and how much it impacts application performance, thereby helping the user identify the problems and determine which problems to fix and which to ignore, since some users may want to fix only the problems with the more significant impact. In embodiments, the systems and methods described herein combine information from the source code with information obtained from a compiled program, such as profiling information based on instructions in a compiled executable file.

[0048] According to aspects of the present invention, systems and methods report performance problems and indicate which part of a source program (e.g., a statement, a variable, etc.) has a problem and where the problematic code should be changed (e.g., which line of source code in the source program). For example, a problem report might be, "The USAGE DISPLAY variable ZONED-ITEM was used in a calculation on line 23456. It would be more efficient to use a PACKED-DECIMAL or BINARY variable in the calculation," where USAGE DISPLAY, PACKED-DECIMAL, and BINARY are more efficient numeric data types. If the report did not include line numbers, the user would have to search the code to find occurrences of the variable ZONED-ITEM. If the report did not include variable names, the user would be directed to the line that needed to be changed, but would have to look elsewhere in the code to determine which variable on that line was of USAGE DISPLAY type. Also, if the report did not include line numbers or variable names, the report would be completely useless; the user would have no idea where to fix the problem.

[0049] In embodiments, systems and methods described herein address matching a program's source code to a compiled version of the program. In embodiments, systems and methods are described for matching individual statements in a source program to corresponding families from IR obtained from disassembling a compiled executable file to determine line numbers, and in some embodiments, for determining user variables used in each family. In embodiments, a constraint algorithm iteratively selects constraints and propagates that information to related constraints, which may refine those constraints (eliminating candidate values ​​or making candidate values ​​known), potentially triggering further propagation. In accordance with aspects of the present invention, the systems and methods find a solution (e.g., values ​​for each variable) where all constraints are satisfied at once and none are violated. Upon completion, the system recognizes the line numbers corresponding to satisfied constraints, as well as information for any unsatisfied constraints that have subparts that are satisfied. In some embodiments, the system may recognize user variables for families, if any exist.

[0050] Embodiments and aspects of the present invention provide systems and methods that improve and advance the art in specific and practical applications. In other words, the systems and methods described herein improve computer functionality (e.g., allow computers to operate more efficiently and process faster) and improve the art of software compilation, software debugging, and software performance tuning by providing more accurate data that links problem areas in a compiled executable program to specific lines, symbols, verbs, etc. of the associated source code in a source program.

[0051] Various aspects of the present disclosure are described through text, flowcharts, block diagrams of computer systems, and / or block diagrams of machine logic included in computer program product (CPP) embodiments. For any flowchart, depending on the technology involved, operations may be performed in an order different from that shown in a given flowchart. For example, two operations shown in successive flowchart blocks may be performed in the reverse order, as a single integrated step, simultaneously, or in a manner that at least partially overlaps in time, also depending on the technology involved.

[0052] A computer program product embodiment ("CPP embodiment" or "CPP") is a term used in this disclosure to describe any set of one or more storage media (also referred to as "media") collectively included in a set of one or more storage devices that collectively contain machine-readable code corresponding to instructions and / or data for performing the computer operations specified in a given CPP claim. A "storage device" is any tangible device capable of holding and storing instructions for use by a computer processor. The computer-readable storage medium may be, but is not limited to, an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these media include diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded device (such as punch cards or pits / lands formed on a major surface of a disk), or any suitable combination of the foregoing. Computer-readable storage media, as the term is used in this disclosure, is not to be construed as storage in the form of a transient signal per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide, light pulses passing through fiber optic cables, electrical signals transmitted through wires, and / or other transmission media. As will be appreciated by those skilled in the art, data typically moves at some infrequent time during the normal operation of a storage device, such as during access, defragmentation, or garbage collection, but this does not qualify a storage device as transient, since data is not transient while it is stored.

[0053] Computing environment 100 includes an example of an environment for executing at least a portion of the computer code involved in performing the methodology of the present invention, such as the source program parsing and matching code of block 200. In addition to block 200, computing environment 100 includes, for example, a computer 101, a wide area network (WAN) 102, an end user device (EUD) 103, a remote server 104, a public cloud 105, and a private cloud 106. In this embodiment, computer 101 includes a set of processors 110 (including processing circuitry 120 and cache 121), a communications fabric 111, volatile memory 112, persistent storage 113 (including operating system 122 and block 200, as shown above), a set of peripheral devices 114 (including a set of user interface (UI) devices 123, storage 124, and a set of Internet of Things (IoT) sensors 125), and a network module 115. Remote server 104 includes a remote database 130. The public cloud 105 includes a gateway 140, a cloud orchestration module 141, a set of host physical machines 142, a set of virtual machines 143, and a set of containers 144.

[0054] Computer 101 may take the form of a desktop computer, a laptop computer, a tablet computer, a smartphone, a smartwatch or other wearable computer, a mainframe computer, a quantum computer, or any other form of computer or mobile device now known or later developed that is capable of executing programs, accessing a network, or querying a database, such as remote database 130. As is well understood in the field of computer technology, and depending on the technology, execution of a computer-implemented method may be distributed among multiple computers and / or multiple locations. However, in this presentation of computing environment 100, to keep the presentation as concise as possible, the detailed discussion focuses on a single computer, specifically computer 101. Computer 101 may be located within a cloud, even though it is not depicted in the cloud of FIG. 1 . However, computer 101 is not required to reside within a cloud except to any extent that may be categorically indicated.

[0055] Processor set 110 includes one or more computer processors of any type now known or later developed. Processing circuitry 120 may be distributed across multiple packages, e.g., multiple coordinated integrated circuit chips. Processing circuitry 120 may implement multiple processor threads and / or multiple processor cores. Cache 121 is memory located within the processor chip package and is typically used for data or code that should be available for fast access by threads or cores executing on processor set 110. Cache memory is typically organized into multiple levels depending on relative proximity to the processing circuitry. Alternatively, some or all of the cache for a processor set may be located “off-chip.” In some computing environments, processor set 110 may be designed to operate on qubits and perform quantum computing.

[0056] Computer-readable program instructions are typically loaded onto computer 101 and cause processor set 110 of computer 101 to perform a series of operational steps, thereby realizing a computer-implemented method, such that the instructions so executed instantiate the method set forth in the flowcharts and / or descriptions of the computer-implemented method contained herein (collectively referred to as the "methods of the present invention"). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cache 121 and other storage media discussed below. The program instructions and associated data are accessed by processor set 110 to control and direct the execution of the methods of the present invention. In computing environment 100, at least a portion of the instructions for executing the methods of the present invention may be stored in block 200 of persistent storage 113.

[0057] Communications fabric 111 is the signal-conducting pathway that allows the various components of computer 101 to communicate with one another. Typically, this fabric is made up of switches and conductive pathways, such as those that make up buses, bridges, physical input / output ports, and the like. Other types of signal communication pathways may be used, such as fiber optic and / or wireless communication pathways.

[0058] Volatile memory 112 may be any type of volatile memory now known or later developed. Examples include dynamic type random access memory (RAM) or static type RAM. Typically, volatile memory 112 is characterized by random access, although this is not required unless expressly indicated. In computer 101, volatile memory 112 is located in a single package and is internal to computer 101; however, alternatively or additionally, volatile memory may be distributed across multiple packages and / or located external to computer 101.

[0059] Persistent storage 113 is any form of non-volatile storage for a computer, now known or later developed. The non-volatility of this storage means that stored data is maintained regardless of whether power is supplied to computer 101 and / or directly to persistent storage 113. While persistent storage 113 may be read-only memory (ROM), typically at least a portion of persistent storage allows data to be written, data to be deleted, and data to be rewritten. Some well-known forms of persistent storage include magnetic disks and solid-state storage devices. Operating system 122 may take several forms, such as various known proprietary operating systems or open-source Portable Operating System Interface-type operating systems employing a kernel. The code contained in block 200 typically includes at least a portion of the computer code involved in performing the methods of the present invention.

[0060] Peripheral device set 114 includes a set of peripheral devices of computer 101. Data communication connections between peripheral devices and other components of computer 101 may be implemented in various ways, such as Bluetooth® connections, Near-Field Communication (NFC) connections, connections made by cable (such as a universal serial bus (USB)-type cable), insertion-type connections (e.g., a secure digital (SD) card), connections made through a local area communication network, and even connections made through a wide area network such as the Internet. In various embodiments, UI device set 123 may include components such as a display screen, speakers, microphones, wearable devices (such as goggles and smartwatches), keyboards, mice, printers, touchpads, game controllers, and haptic devices. Storage 124 may be external storage, such as an external hard drive, or insertable storage, such as an SD card. Storage 124 may be persistent and / or volatile. In some embodiments, storage 124 may take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where computer 101 is required to have a large amount of storage (e.g., computer 101 stores and manages large databases locally), this storage may be provided by a peripheral storage device designed to store very large amounts of data, such as a storage area network (SAN) shared by multiple geographically distributed computers. IoT sensor set 125 consists of sensors that can be used in Internet of Things applications. For example, one sensor may be a thermometer and another may be a motion detector.

[0061] Network module 115 is a collection of computer software, hardware, and firmware that enables computer 101 to communicate with other computers over WAN 102. Network module 115 may include hardware such as a modem or Wi-Fi® signal transceiver, software for packetizing and / or depacketizing data for communication network transmission, and / or web browser software for communicating data over the Internet. In some embodiments, the network control and network forwarding functions of network module 115 are performed on the same physical hardware device. In other embodiments (e.g., embodiments utilizing Software-Defined Networking (SDN)), the control and forwarding functions of network module 115 are performed on physically separate devices, such that the control function manages several different network hardware devices. Computer-readable program instructions for implementing the methods of the present invention can be downloaded to computer 101 from an external computer or external storage device, typically through a network adapter card or network interface included in network module 115.

[0062] WAN 102 is any wide area network (e.g., the Internet) capable of communicating computer data over non-local distances using any technology for communicating computer data now known or later developed. In some embodiments, WAN 102 may be replaced and / or supplemented by a local area network (LAN) designed to communicate data between devices located in a local area, such as a Wi-Fi network. WANs and / or LANs typically include copper transmission cables, optical fiber transmissions, wireless transmissions, and computer hardware such as routers, firewalls, switches, gateway computers, and edge servers.

[0063] End-user device (EUD) 103 is any computer system used and controlled by an end user (e.g., a customer of the enterprise operating computer 101) and may take any of the forms discussed above in connection with computer 101. EUD 103 typically receives useful and useful data from the operation of computer 101. For example, in the hypothetical case where computer 101 is designed to provide recommendations to the end user, the recommendations would typically be communicated from network module 115 of computer 101 over WAN 102 to EUD 103. In this manner, EUD 103 can display or otherwise present the recommendations to the end user. In some embodiments, EUD 103 may be a client device such as a thin client, a heavy client, a mainframe computer, a desktop computer, and the like.

[0064] Remote server 104 is any computer system that provides at least some data and / or functionality to computer 101. Remote server 104 may be controlled and used by the same entity that operates computer 101. Remote server 104 represents a machine that collects and stores useful and useful data for use by other computers, such as computer 101. For example, in the hypothetical case where computer 101 is designed and programmed to provide recommendations based on historical data, then this historical data may be provided to computer 101 from remote database 130 of remote server 104.

[0065] Public cloud 105 is any computer system available for use by multiple entities that provides on-demand availability of computer system resources and / or other computer functionality, particularly data storage (cloud storage) and computing power, without direct active management by users. Cloud computing typically leverages resource sharing to achieve coherence and economies of scale. Direct active management of public cloud 105's computing resources is performed by computer hardware and / or software in cloud orchestration module 141. The computing resources provided by public cloud 105 are typically implemented by virtual computing environments running on various computers that comprise host physical machine set 142, the universe of physical computers in and / or available to public cloud 105. Virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine set 143 and / or containers from container set 144. It is understood that these VCEs can be stored as images and can be transferred among and between various physical machine hosts, either as images or after instantiation of the VCEs. Cloud orchestration module 141 manages the transfer and storage of images, deploys new instantiations of VCE, and manages active instantiations of VCE deployments. Gateway 140 is a collection of computer software, hardware, and firmware that enables public cloud 105 to communicate over WAN 102.

[0066] Some further description of a virtualized computing environment (VCE) is now provided. A VCE can be stored as an "image." A new, active instance of a VCE can be instantiated from the image. Two well-known types of VCE are virtual machines and containers. A container is a VCE that uses operating system-level virtualization. This refers to a feature of an operating system in which the kernel allows the existence of multiple isolated user space instances called containers. These isolated user space instances typically behave as real computers from the perspective of programs running within them. A computer program running on a typical operating system may utilize all of the computer's resources, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, a program running inside a container can only use the contents of the container and of the devices assigned to the container; this feature is known as containerization.

[0067] A private cloud 106 is similar to a public cloud 105, except that the computing resources are available only for use by a single enterprise. While the private cloud 106 is shown as communicating with the WAN 102, in other embodiments, the private cloud may be completely disconnected from the Internet and accessible only through a local / private network. A hybrid cloud is a composite of multiple clouds of different types (e.g., private, community, or public cloud types), often each implemented by a different vendor. While each of the multiple clouds remains a separate, discrete entity, the larger hybrid cloud architecture is bound together by standardized or proprietary technologies that enable orchestration, management, and / or data / application portability between the constituent clouds. In this embodiment, both the public cloud 105 and the private cloud 106 are part of a larger hybrid cloud.

[0068] 2 illustrates a block diagram of an exemplary environment 202 according to an aspect of the present invention. In an embodiment, the environment 202 includes a source program parsing and matching server 205, a data source 230, a user device 240, and a network 250.

[0069] Source program parsing and matching server 205 may comprise one or more instances of computer 101 of FIG. 1 . In another example, source program parsing and matching server 205 may comprise one or more virtual machines or containers executing on one or more instances of computer 101 of FIG. 1 . In an embodiment, source program parsing and matching server 205 communicates with data sources 230 and / or user devices 240 over network 250, which may comprise WAN 102 of FIG. 1 . In an embodiment, data sources 230 comprise one or more data sources, each having an instance of remote database 130 and / or remote server 104 of FIG. 1 . In an embodiment, user devices 240 comprise one or more instances of end user devices 103 of FIG. 1 . There may be multiple different instances of user devices 240, including, for example, a server, a cloud management terminal, a personal computer, a tablet, a smartphone, etc. The different instances of user devices 240 may be used by different users and evaluators.

[0070] In an embodiment, the source program parsing and matching server 205 of FIG. 2 includes a constraint model module 210, a match tree module 215, and a detection and refinement module 220, each of which may comprise a module of the source program parsing and matching code of block 200 of FIG. 1. Such modules may include routines, programs, objects, components, logic, data structures, etc. that perform a particular task (or tasks) or implement a particular data type (or data types) used by the code of block 200 to perform the functions and / or methodology of embodiments of the present invention described herein. These modules of the source program parsing and matching code of block 200 are executable by the computer 101 of FIG. 1 (e.g., the processing circuitry 120 of FIG. 1) to perform the methods of the present invention as described herein. The source program parsing and matching server 205 may include modules in addition to or fewer than those shown in FIG. 2. In an embodiment, separate modules may be combined into a single module. Additionally or alternatively, a single module may be implemented as multiple modules. Furthermore, the quantity of devices and / or networks in an environment is not limited to those shown in Figure 2. In practice, an environment may include devices and / or networks in addition to, fewer than, different from, or located differently than those shown in Figure 2.

[0071] According to aspects of the invention, source program parsing and matching server 205 is configured to access a compiled executable file of the source program. In embodiments, the compiled executable file may be accessed by receiving the compiled executable file from a data source (such as data source 230 in FIG. 2 ) and / or a user device (such as user device 240 in FIG. 2 ). In additional embodiments, the compiled executable file may be accessed by obtaining the compiled executable file by accessing a data source (such as data source 230 in FIG. 2 ) and / or a user device (such as user device 240 in FIG. 2 ). In additional embodiments, the compiled executable file may be stored locally.

[0072] As used herein, a compiled executable program (e.g., source program) is a software application that has been converted from source code form into a binary form that can be directly executed by a computer processor. Furthermore, as used herein, source code is code written by a programmer using a programming language before being compiled or interpreted into machine code, thereby creating a compiled executable program (e.g., source program). This code includes instructions and logic that define the operation of the source program (e.g., software application).

[0073] In an embodiment, source program parsing and matching server 205 is further configured to create an IR of the source program by disassembling the compiled executable file. The IR may include family, tree, line number information, and symbol information.

[0074] As used herein, an IR is a disassembled version of a previously compiled program. In an embodiment, the system uses a file describing the IR to obtain information about the program. For example, the file describing the IR may be or include a file containing specific record information about the program collected during assembly, and may include information such as a parse tree, symbol information, and other data about the program. The file describing the IR and / or other files may be generated by a compiler's parser (such as a COBOL compiler's parser) and used by an analysis tool to gain understanding / information about the source program. Thus, the source program parsing and matching server 205 is configured to process one or more representations of the same program. That is, it processes the compiled executable file, the source program, and / or the IR of the source program, which are all representations of the same program. In an embodiment, the file describing the IR may be an ADATA file generated by a COBOL profiler.

[0075] According to an aspect of the invention, the constraint model module 210 is configured to create an IR for a source program by disassembling a compiled executable file. In an embodiment, the disassembled executable file includes at least one constraint, and each constraint includes information about a family. As used herein, a family is a tree, set of trees, or the like, or another IR that completely represents a single instance of a single statement in the source code. In an embodiment, there may be more than one family corresponding to a line of code if the line was part of a unit that was inlined multiple times (i.e., a line inserted in different contexts).

[0076] For example, a compiler may inline both compiler-generated methods and other user programs into a program, replacing calls with the program body. Therefore, a parse tree must reflect the possibility of inlined programs and the possibility of multiple levels of inlining. If program C is inlined into program B, and program B is inlined into program A, the IR of program A also includes the IRs of programs B and C. Inlined programs are processed by recursively searching for calls to user programs within the current parse tree, including any alternative parse trees for the node. When such a call is found, the parse tree of the called program is added as an alternative to the calling node, if the call does not already have an alternative parse tree. This allows a match tree to match the parse tree of either the calling node or the body of the inlined program. A match tree, as used herein, may consist of nodes with the same fields and properties as the parse tree and may be constructed by performing a depth-first search of the IR tree and then using a parser-like algorithm to determine, if possible, the possible verbs represented in the parse tree at each node.

[0077] As used herein, a line of source code is a pair that includes a line number and a statement number associated with that line number. In embodiments, line numbers may start at 1, but in other embodiments, unique values ​​may be provided or may start at another number. For example, any type of compiler-generated code (such as a program's prologue or epilogue code) may provide unique values ​​for lines of compiled code.

[0078] In an embodiment, the constraint model module 210 may disassemble the compiled executable file to create an IR for the compiled executable file, resulting in constraints being created for each family / tree of the IR (e.g., one IR tree or multiple IR trees). In such an embodiment, the constraints may include lines (or line portions), verb portions (or verbs), and / or symbol portions (or symbols). As used herein, a line portion is a pair of a line number and a statement number; a verb portion is a list of candidate verbs, each of which is given a unique number; and a symbol portion is a list of symbols in the IR, each of which is a list of candidate line numbers, each of which contains a list of source symbols that are candidates for the IR symbol. Thus, in an embodiment, disassembling the compiled executable file includes creating an IR for the compiled executable file, the IR having constraints that include candidate lines, verbs, and symbols.

[0079] With respect to verb portions, some languages ​​may refer to verb portions as keywords rather than verbs. In embodiments, functions that are part of a language or functions implemented in its runtime (e.g., the "printf()" function in C) may be treated as separate verbs. In other embodiments, functions may be treated as a single CALL verb. In such embodiments, calls to other programs may be treated as CALL verbs as well.

[0080] In an embodiment, the constraint model module 210 is further configured to initialize the constraint using candidate information for some or all parts of the constraint. For example, candidate verbs may be determined from semantic information obtained when building the match tree. Candidate lines for a constraint are set when a client provides a compiler listing showing some or all lines of instructions. Because parse trees are generated from instructions, lines of instructions become candidate lines for the first tree that uses that instruction. If a line number is known but there are multiple possible statements and the specific statement is unknown, each valid line-statement pair is added as a candidate; otherwise, if the statement number is known, it is also used.

[0081] According to aspects of the present invention, the match tree module 215 is configured to build a separate data structure from the parse tree, called a match tree, which is used to structurally match against the parse tree of any given line. As described above, in embodiments, the match tree may consist of nodes with the same fields and properties as the parse tree. In embodiments, the match tree is built by performing a depth-first search of the IR tree and then using a parser-like algorithm to determine, if possible, verbs that may be expressed in the parse tree at each node. In embodiments, context is maintained within the built match tree. In embodiments, example match tree instructions may include structures such as load, store, and arithmetic nodes that are not part of the address calculation remain in the match tree. In embodiments, address calculations may be ignored if they contribute to a simple address, such as a variable that is on the stack or is a known offset from a heap base. In such embodiments, the parse tree does not include simple address calculations, and therefore the match tree should not include simple address calculations either. In embodiments, address calculations may be transformed into other things, such as array accesses, and the IR may have a calculation to find the base address within the array and an additional calculation to find the offset within the array. In other embodiments, the node that removes the result may be implied by the parse tree, but does not always exist as a separate entity in the parse tree and should not also exist in the match tree. For example, COBOL IR includes operations to set / remove the sign code of a packed decimal value. The compiler generates this operation according to the language rules, and this operation is not explicitly present in the COBOL source or parse tree.

[0082] According to an aspect of the present invention, the detection and refinement module 220 is configured to match (e.g., map) individual statements in a source program to corresponding portions in the IR of the source program based at least in part on source information. As used herein, a statement is a programming language unit that expresses some task or action to be performed. For example, a statement might be "x=30" or "CALL Larger(a,b,c)," where the first statement performs the action of assigning the value 30 to the variable x, and the second statement calls the subroutine Larger() and passes the values ​​of a, b, and c to the subroutine. Furthermore, as used herein, source information is a description of the source program. For example, in embodiments, the source information is the source code of the source program. In other embodiments, the source information may be broken down (or summarized) into lines and symbols.

[0083] The matching / mapping may be completed using one or more of a family detection process, a symbol detection process, a row refinement process, and / or a row propagation process.

[0084] The family detection process may combine nearby related constraints by merging separate constraints into one constraint, and / or may determine whether the family is closed (i.e., whether all trees that can be grouped or combined into a family have been added). In embodiments, combining nearby constraints is done by looking for relationships between nearby parse trees. In such embodiments, these constraints may be placed within a single basic block or may span multiple basic blocks (e.g., statements with multiple clauses, such as IF statements).

[0085] In an embodiment, detection and refinement module 220 uses a family detection process that allows constraints to be integrated as detection and refinement module 220 of Figure 2 begins matching / mapping individual statements in a source program to their corresponding parts in the source program's IR. This further allows detection and refinement module 220 to use the open / closed state of a family to indicate when it is safe to propagate line information to and from constraints. These features provide a more robust and accurate method of statement matching / mapping.

[0086] In an embodiment, the detection and refinement module 220 is configured to use a symbol detection process for matching IR symbols to source symbols, taking into account one or more issues, including the following: A first potential issue is the possibility of exceeding variable boundaries. Given an offset within a group or an offset relative to a base address, the detection and refinement module 220 cannot reliably determine without context whether the variable in question directly overlaps the offset or completely precedes the offset, exceeding the boundary. A second potential issue is that if the detection and refinement module 220 does not know how a storage type is laid out, an IR symbol of that type could be any source symbol of that storage type that has a data type compatible with the IR symbol, thereby opening the detection and refinement module 220 to matching unknown or incorrectly identified symbols. More specifically, variables can exist in a variety of storage types, which determine how the variable's backing memory is stored, retrieved, initialized, allocated, or otherwise handled. For example, storage types may include static storage, local storage, storage for passing function arguments, data for specific language statements, compiler or runtime allocated storage, and so on.

[0087] A third potential problem is that if the detection and refinement module 220 does not know the layout of a storage type, the detection and refinement module 220 cannot determine without context whether a stack-based or heap-based variable of such a storage type is a user variable or a compiler-generated variable, which again leaves the detection and refinement module 220 open to matching unknown or incorrectly identified symbols.

[0088] In an embodiment, the row refinement process is a process by which the detection and refinement module 220 refines the list of candidate rows for a constraint. In embodiments where no candidate rows have been set for a constraint and the family is closed, if a source row matches the constraint, the row is added to the constraint's set of candidate rows. In embodiments where candidate rows have been set for a constraint, the detection and refinement module 220 is configured to verify that the row still matches the constraint. If a row no longer matches the constraint, it is removed from the set of candidate rows.

[0089] In an embodiment, the detection and refinement module 220 is configured to use a row propagation process to propagate rows of a constraint to neighboring constraints (i.e., constraints whose trees are directly adjacent to a tree in this constraint's family). This is so that row information for one constraint can be used to refine row information for other constraints. In other words, as more row information is discovered / determined, that information can be used to solve and / or determine, one constraint at a time, more information about other constraints.

[0090] FIG. 3 illustrates a flowchart of an exemplary method 300 according to an aspect of the present invention. The method steps may be performed in the environment of FIG. 2 and are described with reference to elements shown in FIG. 2. Note that for simplicity, FIG. 3 illustrates possible paths for the first constraint (e.g., blocks 320a-c). However, in an embodiment, the flowchart of FIG. 3 may apply to multiple constraints at any one time, including up to tens, hundreds, thousands, and / or millions of constraints. In such an embodiment, each of the tens, hundreds, thousands, and / or millions of constraints may be processed serially or in parallel by one or more processors on one or more servers (e.g., one or more instances of source program parsing and matching server 205 of FIG. 2).

[0091] At block 305 of Figure 3, source program parsing and matching server 205 is optionally configured (as indicated by the dashed line) to access a compiled executable file of the source program. As noted above, in embodiments, the compiled executable file may be accessed by receiving the compiled executable file from a data source (such as data source 230 of Figure 2) and / or a user device (such as user device 240 of Figure 2). In additional embodiments, the compiled executable file may be accessed by obtaining the compiled executable file by accessing a data source (such as data source 230 of Figure 2) and / or a user device (such as user device 240 of Figure 2). In additional embodiments, the compiled executable file may be stored locally.

[0092] In block 310, the constraint model module 210 of FIG. 2 is configured to create an IR for the source program by disassembling the compiled executable file. In an embodiment, the disassembled executable file includes at least one constraint, and each constraint includes information about a family. As used herein, a family is a tree, set of trees, or the like, or another IR that completely represents a single instance of a single statement in the source code. In an embodiment, there may be more than one family corresponding to a line of code if the line was part of a unit that was inlined multiple times (i.e., a line inserted in different contexts).

[0093] As noted above, in an embodiment, the constraint model module 210 may disassemble the compiled executable file, resulting in the creation of constraints for each family / tree (e.g., one IR tree or multiple IR trees). In such an embodiment, the constraints may include a line (or line portion), a verb portion (or verb), and a symbol portion (or symbol).

[0094] In an embodiment, block 310 may further comprise building a separate data structure from the parse tree, called a match tree, which is used to structurally match against the parse tree of any given line, as described above. In such an embodiment, match tree module 215 of FIG. 2 may build the match tree.

[0095] 2 is configured to receive, obtain, and / or access source information for (e.g., describing) the source program. For example, as described above, in embodiments, the source information is the source code of the source program. In other embodiments, the source information may be broken down (or summarized) into lines and symbols.

[0096] 2 is configured to match / map individual statements in the source program to corresponding portions in the IR of the source program based at least in part on the source information. In an embodiment, matching (e.g., mapping) of individual statements is completed by performing one or more functions of blocks 320a-c.

[0097] In block 320a, the detection and refinement module 220 is optionally configured to determine whether the first constraint can be combined with another constraint (or multiple constraints) to form a single combined constraint and / or whether the symbol (e.g., candidate symbol) of the first constraint can be refined. In an embodiment, the detection and refinement module 220 may use a family detection process to determine whether the first constraint can be combined with nearby related constraints. If, in block 320a, the detection and refinement module 220 does not determine whether the first constraint can be combined with another constraint (or multiple constraints) or whether the candidate symbol of the first constraint can be refined, the first constraint is put on hold until more information that may be useful in mapping the first constraint is available.

[0098] As noted above, in embodiments, the family detection process may combine nearby related constraints into one constraint and / or determine whether the family is closed (i.e., whether all trees that can be grouped, merged, or combined into the family have been added). In embodiments, combining nearby constraints is done by looking for relationships between nearby parse trees. In such embodiments, these constraints may be located within a single basic block or may span multiple basic blocks (e.g., statements with multiple clauses, such as IF statements).

[0099] In embodiments, trees are grouped, merged, or combined by looking for specific connections between them. For example, the family discovery process matches a tree that stores in a specific parameter field with another tree that executes a CALL statement using that specific / same parameter field. In embodiments, merging constraints also modifies the match trees and merges them to reflect the behavior of the entire family.

[0100] In embodiments, the family detection process considers all trees in a block (or all adjacent blocks, in the case of a family that may span multiple basic blocks) to ensure that all relevant trees are included in the family. For example, if the family detection process determines that there are no other / additional trees that could be included because all other candidates are in a closed family, they do not match the pattern, and / or they are not part of the current family, the current family is marked as closed. Before that, the family was open. In embodiments, the family detection process ignores trees in a closed family. In such embodiments, information is propagated only between constraints that have a closed family, and propagation of incorrect information (such as a tree that sets parameters for a call being propagated as being a MOVE when it is actually part of a CALL) can be avoided.

[0101] 2 begins matching / mapping individual statements in a source program to their corresponding parts in the source program's IR, the family detection process allows for constraint integration. This further enables detection and refinement module 220 to use the open / closed state of a family to indicate when it is safe to propagate line information to and from constraints. These features provide a more robust and accurate method of statement matching / mapping.

[0102] As noted above, in block 320a, the detection and refinement module 220 may optionally be configured to determine whether a symbol of the first constraint (e.g., a candidate symbol) can be refined. As noted above, in an embodiment, this determination is made using a symbol detection process that matches IR symbols to source symbols and considers one or more issues as described above.

[0103] The detection and refinement module 220 overcomes these problems and provides an improvement to symbol detection techniques. In an embodiment where a constraint has two or more candidate rows and the candidate source symbol list for an IR symbol is empty, the detection and refinement module 220 searches the parse tree and the match tree in parallel. Searching the parse tree and the match tree in parallel may include checking (at each node) whether the nodes match (i.e., same data type, same size, same storage type, and / or same offset within a storage type or group). If any node pair (e.g., symbol) does not match, the detection and refinement module 220 stops because the symbol does not match the constraint. If all node pairs (e.g., symbol) match, the source symbol matches the constraint. In an embodiment, any source symbol that could potentially match the IR symbol based on its position in the match tree becomes a candidate source symbol for the IR symbol.

[0104] In embodiments where the constraint has two or more candidate rows and the IR symbol already has candidates, the detection and refinement module 220 then builds a new candidate list by searching the parse tree and the match tree in parallel, as described above. In this way, the candidate list for the IR symbol is the intersection of the new candidate list and the previous candidate list.

[0105] In an embodiment where the constraint has one candidate line and the candidate source symbol list for the IR symbol is empty, the detection and refinement module 220 searches the parse tree and the match tree in parallel, as described above. If there is a match tree for the constraint, the detection and refinement module 220 searches the parse tree and the match tree for each candidate line in parallel, and any source symbol that could potentially match the IR symbol based on its position in the match tree becomes a candidate source symbol for the IR symbol. In an embodiment, if the source symbol crosses its boundary and there is a possibility that the source symbol could match the IR symbol, the detection and refinement module 220 adds the symbol as a candidate.

[0106] In an embodiment, the detection and refinement module 220 creates a list (i.e., a use count or use count list) of all source symbols on the line and determines a count (e.g., a numerical value) of the number of times each symbol is used in the statement. The detection and refinement module 220 iterates until no changes occur across iterations, until all IR symbols are matched, and / or until all source symbols are matched. The detection and refinement module 220 then iterates through all remaining unmatched IR symbols in the tree family, and if only one candidate symbol remains for an IR symbol, a match between the IR symbol and the source symbol is made, the use count of the source symbol is decremented, and if the use count of the source symbol becomes 0 (zero), the symbol may be removed from the candidate lists of all other IR symbols.

[0107] In block 320b, the detection and refinement module 220 is optionally configured to determine whether a row (e.g., a candidate row) of the first constraint can be refined using a row refinement process. If the candidate row of the constraint remains unchanged after the row refinement process, the constraint is retained.

[0108] As described above, the row refinement process is a process by which the detection and refinement module 220 refines the list of candidate rows for a constraint. In embodiments where no candidate rows have been set for a constraint and the family is closed, if a source row matches the constraint, the row is added to the constraint's candidate row set. In embodiments where candidate rows have been set for a constraint, the detection and refinement module 220 is configured to verify that the row still matches the constraint. If a row no longer matches the constraint, the row is removed from the candidate row set. In embodiments using a programming language with long sentences and relatively few verbs (e.g., COBOL), a threshold may be set such that if the row set size exceeds the threshold, the detection and refinement module 220 will not attempt to match any of the source rows against the constraint. In embodiments, a threshold may also be set for the number of candidate rows. In other words, if the number of initial candidate rows exceeds a threshold amount, the detection and refinement module 220 will not set any initial candidates for the constraint until the number of candidate rows is less than the threshold amount.

[0109] In block 320c, the detection and refinement module 220 is optionally configured to propagate the first constraint information to additional constraints neighboring the first constraint using a row propagation process. If the row propagation process refines any of the row information of the neighboring constraints, the neighboring constraints are processed according to blocks 320a-b.

[0110] In block 325, the source program parsing and matching server 205 is configured to determine a source program line number for each constraint, combination constraint, or family of constraints based on the matching. In an embodiment, block 325 may further include identifying a family associated with an underperforming portion of the compiled executable file. In other words, using the source program line number determined for each constraint, combination constraint, or family, the source program parsing and matching server 205 may identify lines of code in the source program that adversely affect the performance of the compiled executable program. In an embodiment, the source program parsing and matching server 205 may further identify user variables used in each line of code in the source program that adversely affect the performance of the compiled executable program by using information from the constraints. In an embodiment, the source program parsing and matching server 205 is configured to rank the underperforming portions of the compiled executable file by determining which of the underperforming portions of the compiled executable file are causing more severe performance problems. In an embodiment, the underperforming portions may be more severe, may have a greater impact on performance, and therefore may have a relatively high impact score. In other embodiments, the poorly performing portions of the compiled executable file may be less severe, but may be executed more frequently, resulting in a relatively high impact score due to the cumulative nature of the poorly performing portions of the compiled executable file. In this manner, source program parsing and matching server 205 may rank the poorly performing portions of the compiled executable file.

[0111] In block 330, the source program parsing and matching server 205 is configured to output and / or display the determined source program line numbers and variables. In embodiments, block 330 may further include outputting, displaying, and / or highlighting lines of code in the source program that adversely affect the performance of the compiled executable program. In embodiments, the source program parsing and matching server 205 is configured to output a ranked list of underperforming portions of the compiled executable file and constraints that map to the underperforming portions, and further identify which lines of code in the source program, if modified, will have a greater impact on improving the functionality of the compiled executable program. That is, the system may determine line numbers associated with a problem found in the compiled executable program and any user variables used, if any. That is, when a problem is found and the IR tree for that problem corresponds to a particular constraint, the system may use information from that constraint regarding line numbers and user variables in a family to indicate the line numbers and user variables that are causing or affected by the problem found in the compiled executable program. In this way, lines of code in the source program that are negatively impacting the performance of the compiled executable program are output, displayed, and highlighted, and the underperforming portions of the compiled executable file are ranked, and the constraints that are mapped to the underperforming portions are improved over existing techniques, resulting in programs that operate more efficiently and at lower cost, leading to overall improvements in the functionality of computers and computer programs.

[0112] FIG. 4 illustrates a flow diagram of an exemplary environment 400 in accordance with aspects of the present invention. At least a portion of environment 400 may be described with reference to some of the elements and actions illustrated in FIGS. 2 and 3. Note that for simplicity, FIG. 4 traces the possible paths of a single constraint. However, in embodiments, the flow diagram of FIG. 4 may apply to multiple constraints, including up to tens, hundreds, thousands, and / or millions of constraints at any one time. In such embodiments, each of the tens, hundreds, thousands, and / or millions may be processed in parallel by one or more processors on one or more systems (e.g., one or more instances of source program parsing and matching server 205 of FIG. 2).

[0113] In block 405, the system (which may be an instance of source program parsing and matching server 205 of FIG. 2 or detection and refinement module 220 of FIG. 2) removes the first constraint from the first work queue. As noted above, the flow diagram of FIG. 4 may apply to tens, hundreds, thousands, and / or millions of constraints. In such an embodiment, block 405 may be executed by one or more processors until all constraints have been removed from the first work queue. In an embodiment, constraints that have not yet been solved and are not present in the second or third work queues are placed in the first work queue.

[0114] In block 410, the system determines whether the first constraint can be combined with nearby constraints or whether the system can refine any symbols. In an embodiment, block 410 is completed in accordance with block 320a of FIG. 3. In an embodiment, the flow diagram of FIG. 4 may apply to tens, hundreds, thousands, and / or millions of constraints. In such an embodiment, block 410 may be executed by one or more processors until all constraints have been removed from the first work queue in block 405. In other words, block 410 is executed until no more constraints are being removed from the first work queue in block 405. Thus, the system loops until the first work queue is empty, removing constraints one by one, combining nearby constraints into a single constraint, and / or refining symbols.

[0115] If the first constraint cannot be combined with nearby constraints or cannot improve any candidate symbols, the constraint is dropped at block 415a. In an embodiment, dropping the constraint at 415a further includes moving the constraint to a first work queue for further processing. If the constraint can be combined with nearby constraints or can improve the candidate symbols, the constraint is added to a second work queue at block 420.

[0116] In block 425, the system removes the first constraint from the second work queue. As noted above, the flow diagram of Figure 4 may apply to tens, hundreds, thousands, and / or millions of constraints. In such embodiments, block 425 may be executed by one or more processors until all constraints have been removed from the second work queue.

[0117] In block 430, the system determines whether any of the candidate rows can be improved. In an embodiment, block 430 is completed in accordance with block 320b of FIG. 3. In an embodiment, the flow diagram of FIG. 4 may apply to tens, hundreds, thousands, and / or millions of constraints. In such an embodiment, block 430 may be executed by one or more processors until all constraints have been removed from the second work queue in block 425. In other words, block 430 is executed (e.g., looped) until no more constraints are removed from the second work queue in block 425.

[0118] If none of the candidate rows can be refined, the constraint is dropped at block 415b. In an embodiment, dropping the constraint at 415b further includes moving the constraint to a first work queue for further processing. If at least one candidate row can be refined at block 430, the constraint is added to a third work queue at block 435.

[0119] In block 440, the system removes the first constraint from the third work queue. As noted above, the flow diagram of Figure 4 may apply to tens, hundreds, thousands, and / or millions of constraints. In such embodiments, block 440 may be executed by one or more processors until all constraints have been removed from the third work queue.

[0120] At block 445, the system propagates the first constraint data to additional constraints. In an embodiment, this is completed according to block 320c of FIG. 3. In an embodiment, the flow diagram of FIG. 4 may apply to tens, hundreds, thousands, and / or millions of constraints. In such an embodiment, block 445 may be executed by one or more processors until all constraints have been removed from the third work queue at block 440. In other words, block 445 is executed (e.g., looped) until no more constraints are removed from the second work queue at block 440.

[0121] At block 450, the system determines whether any data changed during the propagation at block 445. If the data did not change during the propagation, the constraint is dropped at block 415c. In an embodiment, dropping the constraint at 415c further includes moving the constraint to a first work queue for further processing. If at least some data changed during the propagation, the constraint is added to the first work queue and / or the second work queue for additional processing.

[0122] In an embodiment, any block of Figure 4 may be executed concurrently with any one or more of the other blocks shown in Figure 4. For example, a first constraint may be processed according to block 445, while a second constraint is processed according to block 430, while a third constraint is processed according to block 405.

[0123] In embodiments, a service provider may offer to perform the processes described herein. In this case, the service provider may create, maintain, deploy, support, etc., a computer infrastructure that performs the process steps of aspects of the present invention for one or more customers. These customers may be, for example, any business that uses the technology. In return, the service provider may receive compensation from the customer based on a subscription and / or fee agreement, and / or the service provider may receive compensation from the sale of advertising content to one or more third parties.

[0124] In yet additional embodiments, aspects of the present invention provide computer-implemented methods over a network. In this case, a computer infrastructure, such as computer 101 of FIG. 1, may be provided, and one or more systems for performing the processes of the present invention may be acquired (e.g., created, purchased, used, modified, etc.) and deployed to the computer infrastructure. In this regard, deploying the system may include one or more of: (1) installing program code from a computer-readable medium onto a computing device, such as computer 101 of FIG. 1; (2) adding one or more computing devices to the computer infrastructure; and (3) incorporating and / or modifying one or more existing systems of the computer infrastructure so that the computer infrastructure can perform the processes of the present invention.

[0125] The description of various embodiments of the present invention has been presented for illustrative purposes, but is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein has been selected to best explain the principles of the embodiments, practical applications, or technical improvements to technology found in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. creating, by the processor set, an intermediate representation of the source program by disassembling the compiled executable file; accessing, by said processor set, source information describing said source program; matching, by said processor set, individual statements of said source program to corresponding portions of said intermediate representation of said source program, said matching being based at least in part on said source information; determining, by the processor set, a source program line number of at least one constraint of the plurality of constraints based on the matching; and outputting the source program line number of the at least one constraint 1. A computer-implemented method comprising:

2. The computer-implemented method of claim 1 , further comprising accessing the compiled executable file on a remote device.

3. The computer-implemented method of claim 1 or 2, further comprising determining whether the at least one constraint can be combined with an additional constraint to form a single combined constraint.

4. The computer-implemented method of claim 1 or 2, further comprising determining whether the candidate symbols of the at least one constraint can be improved.

5. The computer-implemented method of claim 1 or 2, further comprising determining whether the candidate row of the at least one constraint can be refined.

6. The computer-implemented method of claim 1 or 2, further comprising propagating information describing the at least one constraint to other constraints of the plurality of constraints.

7. The computer-implemented method of claim 6 , wherein the other constraints of the plurality of constraints are adjacent to the at least one constraint.

8. On the computer, creating an intermediate representation of the source program by disassembling the compiled executable file; accessing source information describing said source program; matching individual statements of the source program to corresponding portions of the intermediate representation of the source program, wherein the matching is based at least in part on the source information; determining a source program line number of at least one of the plurality of constraints based on the matching; and outputting the source program line number of the at least one constraint; A computer program for executing

9. 9. The computer program product of claim 8, further causing the computer to perform the step of accessing the compiled executable file on a remote device.

10. 10. A computer program product according to claim 8 or 9, further causing the computer to perform the step of determining whether the at least one constraint can be combined with an additional constraint to form a single combined constraint.

11. 10. A computer program product according to claim 8 or 9, further causing the computer to perform the step of determining whether the candidate symbol of the at least one constraint can be improved.

12. 10. A computer program product according to claim 8 or 9, further causing the computer to perform the step of determining whether a candidate row of the at least one constraint can be refined.

13. 10. A computer program product according to claim 8 or 9, further causing the computer to perform the step of propagating information describing the at least one constraint to other constraints of the plurality of constraints.

14. The computer program product of claim 13 , wherein the other constraints of the plurality of constraints are adjacent to the at least one constraint.

15. a set of processors, one or more computer-readable storage media, and program instructions collectively stored on the one or more computer-readable storage media, the program instructions comprising: Creating an intermediate representation of the source program by disassembling the compiled executable file; accessing source information describing said source program; matching individual statements of the source program to corresponding portions of an intermediate representation of the source program, wherein the matching is based at least in part on source information; determining a source program line number of at least one constraint of the plurality of constraints based on the matching; and outputting a line number of the source program for the at least one constraint; is workable for the system.

16. 16. The system of claim 15, wherein the program instructions are further executable to access the compiled executable file on a remote device.

17. 17. The system of claim 15 or 16, wherein the program instructions are further executable to determine whether the at least one constraint can be combined with additional constraints to form a single combined constraint and whether candidate symbols of the at least one constraint can be refined.

18. 17. The system of claim 15 or 16, wherein the program instructions are further executable to determine whether the candidate row of the at least one constraint can be refined.

19. 20. The system of claim 18, wherein the program instructions are further executable to propagate information describing the at least one constraint to other constraints of the plurality of constraints.

20. The system of claim 19 , wherein the other constraints of the plurality of constraints are adjacent to the at least one constraint.

21. obtaining, by the processor set, the compiled executable file from the data storage device; identifying, by the processor set, at least one underperforming portion of the compiled executable file; creating, by said processor set, an intermediate representation of the source program; mapping, by said processor set, individual statements of said source program to corresponding portions of said intermediate representation of said source program; determining, by the processor set, a source program line number and at least one user variable for at least one constraint of a plurality of constraints based on the mapping; and outputting the source program line number and the at least one user variable of a constraint associated with the at least one underperforming portion of the compiled executable file; 1. A computer-implemented method comprising:

22. 22. The computer-implemented method of claim 21, wherein identifying at least one underperforming portion of the compiled executable file comprises identifying a plurality of underperforming portions of the compiled executable file.

23. 23. The computer-implemented method of claim 22, further comprising: ranking the plurality of underperforming portions of the compiled executable file by determining which of the plurality of underperforming portions is causing a larger performance problem.

24. On the computer, obtaining the compiled executable file from the data storage device; identifying at least one poorly performing portion of the compiled executable file; A procedure for creating an intermediate representation of a source program; mapping individual statements of the source program to corresponding portions of the intermediate representation of the source program; determining a source program line number and at least one user variable for at least one constraint of the plurality of constraints based on the mapping; and outputting the source program line number and the at least one user variable of a constraint associated with the at least one poorly performing portion of the compiled executable file; A computer program for executing

25. 25. The computer program product of claim 24, wherein identifying at least one under-performing portion of the compiled executable file comprises identifying a plurality of under-performing portions of the compiled executable file, and further causing the computer to perform ranking the plurality of under-performing portions of the compiled executable file by determining which of the plurality of under-performing portions is causing a greater performance problem.