KR-20260065740-A - Target decomposition using graph analysis
Abstract
The method comprises the steps of: collecting one or more index database files for a first target including a first file and a second file; generating a mapping graph of declarations and references for the first file and the second file based at least partially on the one or more index database files; generating a representation of an oriented graph of the first target based at least partially on the mapping graph, wherein the representation includes a first node of the first file and a second node of the second file; and performing graph analysis on the representation of the oriented graph to determine the degree level of the first node and the degree level of the second node, wherein the second node has a higher degree level than the first node.
Inventors
- 엘리엇, 맥스웰 랜드
Assignees
- 틴더 엘엘씨
Dates
- Publication Date
- 20260511
- Application Date
- 20241031
Claims (20)
- As a method, A step of collecting one or more index database files for a first target including a first source file and a second source file; A step of generating a mapping graph of declarations and references for the first source file and the second source file based at least partially on the one or more index database files; A step of generating a representation of a directed graph of the first target based at least partially on the mapping graph above—the representation including a first node of the first source file and a second node of the second source file—; and A method comprising the step of performing graph analysis on the representation of the oriented graph to determine the degree level of the first node and the degree level of the second node, wherein the second node has a higher degree level than the first node.
- In paragraph 1, A method further comprising the step of building the first target without the first source file, wherein the degree level of the first node is zero.
- In paragraph 1, A method further comprising the step of building the first target without the first source file, based at least partially on the modified version of the second source file, wherein the degree level of the first node is at least 1.
- In paragraph 1, A method further comprising the step of building a second target based at least partially on the first source file and the third source file, wherein the first target does not include the third source file.
- In paragraph 1, A method further comprising the step of performing a display of the directed graph of the first target, wherein the display includes the first node and the second node.
- In paragraph 1, A method in which the above-mentioned collecting step is performed by running a compiler on at least the first source file and the second source file to output the above-mentioned one or more index database files.
- In paragraph 1, The above one or more index database files are IndexStore files, a method.
- As a system, At least one memory storing at least one instruction; and The system includes at least one processor, and the at least one processor, together with the at least one memory, enables the system to at least, Collect one or more index database files for a first target including a first source file and a second source file, and Based at least partially on the one or more index database files mentioned above, a mapping graph of declarations and references for the first source file and the second source file is generated, and Based at least partially on the above mapping graph, a representation of the directed graph of the first target is generated—the representation includes the first node of the first source file and the second node of the second source file—, A system configured to perform graph analysis on the representation of the directed graph to determine the degree level of the first node and the degree level of the second node, wherein the second node has a higher degree level than the first node.
- In paragraph 8, A system in which the at least one processor, together with the at least one memory, is further configured to enable the system to build the first target without at least the first source file, and the degree level of the first node is zero.
- In paragraph 8, A system in which the at least one processor, together with the at least one memory, is further configured to enable the system to build the first target without the first source file based at least partially on a modified version of at least the second source file, and the degree level of the first node is at least 1.
- In paragraph 8, The above at least one processor, together with the above at least one memory, is further configured to enable the system to build a second target at least partially based on at least the first source file and the third source file, wherein the first target does not include the third source file.
- In paragraph 8, The above at least one processor, together with the above at least one memory, is further configured to enable the system to perform a display of the directed graph of at least the first target, and the display comprises the first node and the second node.
- In paragraph 8, A system in which the above collection is performed by running a compiler on at least the first source file and the second source file to output the above one or more index database files.
- In paragraph 8, The above one or more index database files are IndexStore files, system.
- A computer-readable medium encoded as a computer program, wherein, when executed by a system comprising at least one processor, the program causes the system to perform operations, and said operations An operation to collect one or more index database files for a first target including a first source file and a second source file; The operation of generating a mapping graph of declarations and references for the first source file and the second source file based at least partially on the one or more index database files mentioned above; An operation to generate a representation of a directed graph of the first target based at least partially on the mapping graph above—the representation including a first node of the first source file and a second node of the second source file—; and A computer-readable medium comprising the operation of performing graph analysis on the representation of the directed graph to determine the degree level of the first node and the degree level of the second node, wherein the second node has a higher degree level than the first node.
- In paragraph 15, The above operations are, A computer-readable medium further comprising the operation of building the first target without the first source file, wherein the order level of the first node is zero.
- In paragraph 15, The above operations are, A computer-readable medium further comprising the operation of building the first target without the first source file, based at least partially on the modified version of the second source file, wherein the order level of the first node is at least 1.
- In paragraph 15, The above operations are, A computer-readable medium further comprising the operation of building a second target based at least partially on the first source file and the third source file, wherein the first target does not include the third source file.
- In paragraph 15, A computer-readable medium in which the above-mentioned collecting operation is performed by running a compiler on at least the first source file and the second source file to output the above-mentioned one or more index database files.
- In paragraph 15, One or more of the above index database files are IndexStore files, on a computer-readable medium.
Description
Target decomposition using graph analysis The present disclosure relates to the transformation of program code in software engineering, in particular, to the deconstruction of a software target using graph analysis. Computer development projects often have overly large targets, such as application programs. Application programs can be built in alternative styles such as multitier architectures, distributed computing, microservices, or monoliths. A monolith is a single, integrated, self-contained software application. A monolith can contain hundreds, if not thousands, of files. These files are generally dependent on, and/or dependent on, other files within the monolith. Problems can arise when targets within a software development project, such as application programs, are unnecessarily large. For example, a large target may take an undesirably long time to compile from its source files. Furthermore, storing the target can unnecessarily consume memory resources, and communicating with such a target can unnecessarily consume network resources. Additionally, when the target is executed, its size can also unnecessarily consume processing resources. These large targets sometimes occur in critical paths of the build. Therefore, meaningful build time improvements cannot be made until the target size is reduced. However, the target may include a portion of the least-tested code and/or may contain critical features. The reason for this situation is that the use of specific source files can virtually eliminate the possibility of meaningful coverage. For example, components may utilize actual objects to perform all operations, and entire test suites may be based on code behaviors that are not the subject of the test. Monoliths can also challenge the culture of software teams because behaviors permitted in the target are not allowed in other components of the software. Contributors can be continuously drawn to these monoliths because supervision of the target is much lower than for better isolated components within the code. Simply put, the presence of monoliths presents a continuous challenge to build engineering teams and must be addressed to improve build speed and quality for all components within the application. These issues are universal in software engineering and are widely faced by all software development teams. FIG. 1 illustrates a visualization of a monolith according to an embodiment of the present disclosure. FIG. 2 illustrates a visualization of the second phase of the disassembly of a monolith according to an embodiment of the present disclosure. FIG. 3 illustrates a visualization of the first phase of the disassembly of a monolith according to an embodiment of the present disclosure. FIG. 4 illustrates an algorithm for dismantling a target using graph analysis according to an embodiment of the present disclosure. FIG. 5 illustrates data regarding source files in various decomposition phases according to an embodiment of the present disclosure. FIG. 6 illustrates improvements in build time at the start of each of a plurality of disassembly phases according to an embodiment of the present disclosure. FIG. 7 illustrates percentage reductions in build time at the start of each of a plurality of disassembly phases according to an embodiment of the present disclosure. FIG. 8 illustrates a computing device according to an embodiment of the present disclosure. Various embodiments of the present disclosure can implement a system and method for target disassembly using graph analysis as described herein. In particular, selected embodiments of the present disclosure can address the issue of having an excessively large target within a software project. For example, some embodiments can visualize the target by its source files and determine a course of actions to reduce the size of the target. Selected embodiments of the present disclosure also provide the ability to generate visualizations that allow a developer to observe a network of a target's file dependencies at the file level. This visualization can provide observation of potential optimizations of the target. FIG. 1 illustrates a visualization of a monolith according to an embodiment of the present disclosure. In the visualization, each circle represents a file within the monolith, and each line extends between two files to represent a dependency between two files. In the visualization of Fig. 1, there are four files that have no dependencies on or from other files. These four "orphan" files are defined as having degree zero. In addition to these four files, all files depend on at least one other file within the monolith and/or are dependent on at least one other file within the monolith. The individual degree of each of these other files is described by the number of files to which the file depends and the number of files to which that file depends. The visualization in Fig. 1 is estimated to have a degree of 9. As expressed by the complexity of visualiza