WO2016027992A1 - Method for measuring code coverage and computer-readable recording medium having program for executing same recorded thereon - Google Patents

Method for measuring code coverage and computer-readable recording medium having program for executing same recorded thereon Download PDF

Info

Publication number
WO2016027992A1
WO2016027992A1 PCT/KR2015/007395 KR2015007395W WO2016027992A1 WO 2016027992 A1 WO2016027992 A1 WO 2016027992A1 KR 2015007395 W KR2015007395 W KR 2015007395W WO 2016027992 A1 WO2016027992 A1 WO 2016027992A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
source code
code coverage
log
coverage
Prior art date
Application number
PCT/KR2015/007395
Other languages
French (fr)
Korean (ko)
Inventor
배현섭
윤광식
조민성
박재현
곽충석
Original Assignee
슈어소프트테크주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 슈어소프트테크주식회사 filed Critical 슈어소프트테크주식회사
Publication of WO2016027992A1 publication Critical patent/WO2016027992A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Definitions

  • the present invention relates to a method for measuring code coverage and a computer readable recording medium having recorded thereon a program for executing the same.
  • Code coverage is a measure used to measure the quality of a software test.
  • Code coverage refers to the rate at which the source code of any one program has been tested. Thus, code coverage is generally expressed as a percentage.
  • code coverage measurement tools typically LDRA and VectorCAST.
  • the present invention provides a code coverage measuring method capable of efficiently inserting a probe into a source code for which code coverage is to be measured, and a computer readable recording medium having recorded thereon a program for executing the code coverage.
  • the present invention after compiling the source code for coverage measurement, code coverage measurement method that can omit the repetitive process of compiling for the source code that does not change among the entire source code to generate an executable file and this A computer readable recording medium having recorded thereon a program for execution is provided.
  • the present invention after measuring the code coverage of the source code, every time a change is made to the source code, an effective code coverage measurement method that can not measure the code coverage of the entire source code again and the computer for recording the program for executing the same It provides a recording medium that can be read.
  • the present invention when the code coverage test is performed on a plurality of devices in which the predetermined source code is not one device, the code coverage test collected from the plurality of devices are collected to quickly improve the code coverage of the source code.
  • a computer readable recording medium having recorded thereon a method for measuring code coverage and a program for executing the same are provided.
  • Code coverage measurement method of the source code the step of inserting a probe into the source code; Compiling the source code into which the probe is inserted to generate an executable file; And measuring the code coverage using the generated executable file, wherein inserting a probe into the source code comprises: generating an abstract syntax tree from the source code; Interpreting the abstract syntax tree to generate a control flow graph; And inserting the probe into the source code using the abstract syntax tree and the control flow graph.
  • a code coverage measurement method of source code includes: determining whether the source code has been substantially changed; If the source code has substantially changed, measuring code coverage of the changed source code; And if the source coat has not been substantially changed, outputting an existing code coverage value.
  • the server receives the code coverage logs collected from a plurality of devices to measure the code coverage, the code coverage logs received from the plurality of devices Storing in a queue in chronological order; And measuring the code coverage using the code coverage logs stored in the queue.
  • the probe can be efficiently inserted into the source code for which the code coverage is to be measured. Therefore, the binary size of the source code into which the probe is inserted can be reduced, thereby minimizing the performance side effects of measuring the code coverage value of the source code.
  • the repetitive process of generating an execution file for coverage measurement for the entire source code whenever a change is made to the source code can be omitted. Therefore, since the coverage measurement preparation process may be omitted for the unchanged source code, there is an advantage of reducing the code coverage measurement preparation time of the source code.
  • the code coverage test portion does not need to be tested again, there is an advantage that the time taken to achieve a specific coverage reference value can be reduced.
  • the code coverage test collected in the plurality of devices is automatically collected to quickly measure the code coverage of the source code. can do.
  • FIG. 1 is a flowchart showing a code coverage measuring method according to the first embodiment of the present invention.
  • FIG. 2 is a flow chart embodying the step of inserting a probe into the source code shown in FIG.
  • FIG. 3 is an example of a control flow graph for explaining a method of determining an insertion position of a probe.
  • FIG. 4 is a block diagram of a probe insertion apparatus that may implement a method of inserting a probe into the source code shown in FIG.
  • FIG. 5 is a flowchart illustrating a code coverage measurement method according to the second embodiment of the present invention.
  • FIG. 6 is a flowchart detailing step 10 of determining whether the corresponding source code shown in FIG. 5 is a source code that has been previously compiled.
  • FIG. 7 is a flowchart showing a code coverage measurement method according to the third embodiment of the present invention.
  • FIG. 8 is a flow chart embodying step 20 for determining whether the changed source code shown in FIG. 7 has been substantially changed.
  • FIG. 9 is a system diagram for explaining a code coverage measurement method according to the fourth embodiment.
  • FIG. 10 is a flowchart for explaining a method for measuring code coverage according to the fourth embodiment.
  • FIG. 11 is a diagram for describing a first example of the method for measuring code coverage shown in FIG. 10.
  • FIG. 11 is a diagram for describing a first example of the method for measuring code coverage shown in FIG. 10.
  • FIG. 12 is a diagram for describing a second example of the code coverage measurement method shown in FIG. 10.
  • FIG. 12 is a diagram for describing a second example of the code coverage measurement method shown in FIG. 10.
  • FIG. 1 is a flowchart showing a code coverage measurement method according to the first embodiment of the present invention.
  • the method for measuring code coverage includes inserting a probe into source code 100, generating an executable file 300, and measuring code coverage ( 500).
  • Inserting a probe into the source code 100 is inserting a probe into the source code to measure code coverage. This step will be described later in detail with reference to FIG. 2.
  • Generating an executable file 300 is a step of generating an executable file by compiling source code into which a probe is inserted.
  • Measuring the code coverage 500 is a step of measuring the code coverage using the generated executable file.
  • FIG. 2 is a flowchart illustrating the steps of inserting a probe into the source code shown in FIG. 1.
  • Inserting the probe into the source code includes generating an abstract syntax tree (AST) (110), generating a control flow graph (CFG) (120) and inserting the probe Step 130 may include.
  • AST abstract syntax tree
  • CFG control flow graph
  • Generating an abstract syntax tree 110 may generate an abstract syntax tree from source code.
  • An abstract syntax tree can be created using a parser.
  • the parser may be a C / C ++ parser, for example.
  • the C / C ++ parser can generate an abstract syntax tree.
  • Generating a control flow graph (120) generates a control flow graph by interpreting the abstract syntax tree generated above.
  • Inserting a probe 130 is a step of inserting a probe using the abstract syntax tree and the control flow graph generated above. Specific probe insertion method will be described in detail below.
  • Probes are inserted using abstract syntax trees and control flow graphs. Specifically, the probe may be inserted with reference to the control flow graph, and the probe may be inserted by determining the number of conditions of the branch statement in the abstract syntax tree.
  • a method of inserting a probe by referring to a control flow graph and a method of inserting a probe by determining the number of conditions of branch statements in an abstract syntax tree may be performed in parallel. The following description will be divided into each.
  • the probe may be inserted.
  • the method for determining the insertion position of the probe in the control flow graph may be determined by searching for base paths in the control flow graph and then inserting one probe for each base path.
  • the base path means a path from one branch of a branch statement until the next branch statement is met, and the base path is a minimum execution flow that can no longer be divided.
  • FIG. 3 is an example of a control flow graph for explaining a method of determining an insertion position of a probe.
  • the base path is retrieved from the control flow graph shown in FIG. Since the base path is a path from one branch of the branch (if) to the next branch (if) as described above, five base paths in the control flow graph shown in FIG. 3 (path 1, path 2). , path 3, path 4, path 5).
  • One probe (P1, P2, P3, P4, P5) is inserted into each of the five base paths (path 1, path 2, path 3, path 4, and path 5).
  • the method of inserting a probe by determining the number of conditions of a branch statement in the abstract syntax tree is to search for a branch statement having two or more conditions in the abstract syntax tree, change the form of the found branch statement, and then insert a probe. Can be.
  • the branch statement is a statement that determines the execution flow, and may include a for statement, an if statement, and a while statement.
  • to change the form of the branch statement means to change the format so that the probe can be inserted, without changing the actual meaning of the searched branch statement.
  • Example of the branch statement is an if statement, two conditions (A and B), and two conditions (A and B) are combined by one logical operator (&&).
  • the truth table of [Example of Quarter] is shown in ⁇ Table 1> below.
  • the branching example has a form in which the probe cannot be inserted formally. Therefore, the [branch example] should be changed to a form in which the probe can be inserted. If the actual meaning of the [branch example] is changed to a form in which the probe can be inserted without changing, the probe may be inserted as shown in [Branch Modification Example 1] below.
  • the branching modification example 1 has three branching points (?, &&,?) And four probes (m, n, o, p) in total.
  • the [branch modification example 2] does not change the condition to the ternary operator, but rather changes the logical operator to the ternary operator to change the number of branch points and the number of probes, respectively. We can reduce one more. Since the number of branch points and the number of probes are the decisive factors for determining the performance load for the code coverage measurement, by changing the [branch example] to [branch variant 2] instead of [branch variant 1], Code coverage measurement performance can be improved.
  • FIG. 4 is a block diagram of a probe insertion apparatus that may implement a method of inserting a probe into the source code shown in FIG. 2.
  • the probe insertion apparatus 400 may include a parser 410, a control flow graph generator 430, and a source code rewriter 450.
  • the parser 410 parses input source code to generate an abstract syntax tree.
  • the parser 410 may be a C / C ++ parser.
  • the control flow graph generator 430 receives the abstract syntax tree output from the parser 410 as an input and interprets it to generate the control flow graph 430.
  • the source code rewriter 450 outputs the source code into which the probe is inserted using the control flow graph output from the control flow graph generator 430 and the abstract syntax tree output from the parser 410. Since the method of inserting the probe using the control flow graph and the abstract syntax tree has been described in detail with reference to FIGS. 2 to 3, a description thereof will be omitted.
  • FIG. 5 is a flowchart showing a code coverage measurement method according to the second embodiment of the present invention.
  • a step 10 of determining whether the source code has been previously compiled a step 100 of inserting a probe into the source code, and an execution
  • the method may include generating a file 300 and measuring code coverage 500.
  • Step 500 is the same as the step 100 of inserting the probe into the source code shown in FIG. 1, generating the executable 300, and measuring the code coverage 500, and thus will be compiled below. It will be described in detail step 10 for determining whether or not the source code was performed.
  • the step 10 of determining whether the source code has been previously compiled is to determine whether the source code has been previously compiled to generate an executable file before inserting the probe 100 into the source code. Step.
  • the source code is recognized as a different source code from the existing one, the probe is inserted into the source code (100), and the source code into which the probe is inserted is generated to generate a new executable file (300). )do. After storing the new executable file 400, the code coverage of the new executable file is measured 500.
  • step (500) to measure the code coverage by performing a previously compiled to load a pre-stored executable file.
  • FIG. 6 is a flowchart in which step 10 of determining whether the corresponding source code illustrated in FIG. 5 is the source code that has been previously compiled is illustrated.
  • the step 10 of determining whether the changed source code is the source code that has been previously compiled may include generating the preprocessed source code (11), removing noise (12), and uniqueness.
  • the method may include generating a value 13, determining whether the generated eigenvalue is the same as a previous eigenvalue 14, and outputting a pre-stored executable file 15.
  • step 12 of removing noise may be omitted.
  • the generating 11 of the preprocessed source code is a step of generating preprocessed source code by preprocessing the changed source code.
  • the preprocessed source code is a source code having a fixed shape capable of inserting a probe or performing compilation.
  • the preprocessing refers to a process of generating the source code for compilation reflecting the inclusion relationship and the macro definition by analyzing the changed source code.
  • Reflecting the inclusion relationship means inserting the system header or the user header into the changed source code when the system header or the user header is included in the changed source code to be preprocessed. do.
  • reflecting the macro definition means replacing the macro defined in the changed source code with an extension string that follows the macro definition.
  • Removing noise 12 is removing noise of preprocessed source code.
  • the noise means elements that depend on the preprocessing time point.
  • the element that depends on the preprocessing time point may be, for example, information about the time when the preprocessing was performed and information about the date.
  • Such noise can be removed using regular expressions.
  • regular expression means a formal language used to express a set of strings with specific rules.
  • Generating a eigenvalue 13 is a step of generating a eigenvalue capable of shape identification by performing normalization on the preprocessed source code from which noise is removed.
  • Performing normalization means using a hash algorithm to generate eigenvalues throughout the preprocessed source code.
  • the hash algorithm may use a message-digest algorithm 5 (MD5) function. Intrinsic values of the entire source code are not changed by changing the actual meaning of the source code, such as commenting or spacing.
  • Determining whether or not the generated eigenvalue is equal to the previous eigenvalue is step 14 of determining whether the generated eigenvalue is the same as the previous eigenvalue previously stored in a given reservoir.
  • the predetermined storage stores predetermined eigenvalues and executable files corresponding to each of the eigenvalues.
  • the executable file stored in the predetermined storage is loaded (15). Then, the code coverage of the loaded executable file is measured (500).
  • the probe is inserted into the preprocessed source code (100). As shown in FIG. 5, an executable file is generated 300, and the generated executable file is stored in the predetermined storage along with the generated unique value to be used again later (400). Finally, code coverage of the generated executable file is measured 500.
  • the method of measuring the code coverage shown in FIG. 5 is, when the source code that has been compiled at least once is changed by a developer, a program, or the like, whether the changed content is a substantial change or a substantial change in the source code. If the changed content is not a substantial change, the executable file, which has been previously compiled, is loaded and the code coverage of the loaded executable file is measured. Therefore, when substantial changes such as comments or spacing have been made to the source code that has been compiled at least once, there is no need to repeat the process of inserting the probe into the changed source code or generating the executable file again. Therefore, there is an advantage in that preparation time for measuring code coverage can be shortened for source code that has been compiled at least once.
  • FIG. 7 is a flowchart showing a code coverage measurement method according to the third embodiment of the present invention.
  • the present invention relates to a method for measuring code coverage of modified source code.
  • determining whether the changed source code is substantially changed (20), outputting an existing code coverage value (30), and performing code coverage It may include the step of measuring 40 and the step 50 of storing the eigenvalues and function coverage values of the changed function.
  • Determining whether or not the changed source code has been substantially changed is a step of determining whether the previous source code that measured the code coverage at least one or more times is substantially changed, not a formal change.
  • the code coverage value which has been previously measured is retrieved and output without the code coverage measurement of the changed source code (30).
  • the changed source code is substantially changed, the code coverage of the changed source code is measured (40), and the unique value and the function coverage value of the changed function in the source code are stored (50).
  • the changed eigenvalues and function coverage values may be stored in a predetermined repository for later use.
  • FIG. 8 is a flowchart embodying step 20 for determining whether the changed source code shown in FIG. 7 has been substantially changed.
  • the step 20 of determining whether the changed source code has previously measured code coverage includes generating 21 preprocessed source code, removing noise 22, and function.
  • the method may include generating a star eigenvalue 23, determining whether at least one changed function exists 24, and classifying the changed and unchanged functions 25.
  • step 22 of removing noise may be omitted.
  • the step 21 of generating preprocessed source code and the step 22 of removing noise are the same as the step 11 of generating preprocessed source code and step 12 of removing noise shown in FIG. , The description is replaced by the foregoing.
  • the step 23 of generating a function-specific eigenvalue is a step of generating a function-specific eigenvalue whose shape can be identified by performing normalization for a plurality of functions existing in the preprocessed source code. Therefore, the number of eigenvalues for each function is determined according to the number of functions.
  • performing normalization means generating a unique value for each of a plurality of functions in the preprocessed source code using a hash algorithm. Intrinsic values of a function are not changed by a formal change, not by changing the actual meaning of the function, such as inserting a comment or spacing.
  • the changed function exists may be determined by comparing one-to-one unique values of functions of the previous source code previously stored in a predetermined storage with the unique values of each function of the generated changed source code.
  • the existing code coverage value is output (30).
  • the step 40 of measuring the code coverage loads the function coverage value of the unchanged function from the given repository and calculates the code coverage of the changed source code.
  • the previous source code includes 100 functions, and the code coverage value of the previous source code was 100 (%).
  • the code coverage value is 0 (%) (because the conventional code coverage measurement method is a Or if it is changed formally, it is recognized as a new source code).
  • the code coverage value is 99 instead of 0. Therefore, since the function coverage of the unchanged function is maintained, there is an advantage that it is not necessary to retest the unchanged function later.
  • FIG. 9 is a system diagram for explaining a code coverage measurement method according to the fourth embodiment.
  • the system in which the code coverage measuring method according to the fourth embodiment is performed may include a plurality of devices 910 and 930 and a server 950.
  • the plurality of devices 910, 930 may measure the code coverage of the source code transmitted from the server 950 or directly uploaded by the user.
  • Each of the plurality of devices 910 and 930 may include a log collection agent.
  • the log collection agent may control code coverage measurement of each of the plurality of devices 910 and 930.
  • the log collecting agent may control the start and end of code coverage measurement of each of the plurality of devices 910 and 930, and may perform code coverage measurement performance status information of each of the plurality of devices 910 and 930. I can figure it out.
  • the log collection agent may transmit the collected code coverage log to the server 950.
  • the log collection agent may transmit the collected code coverage log according to the update request of the server 950, and automatically transmit the collected code coverage log to the server 950 at any predetermined time without the request of the server 950. You can also send.
  • the arbitrary time point may be when the code coverage measurement is finished, or may be any time point requested by the server 950.
  • the log collection agent may generate a unique value of the collected code coverage log by performing normalization on the collected code coverage log before transmitting the collected code coverage log to the server 950.
  • the generated unique value may also be transmitted.
  • the eigenvalue may be a character string capable of shape identification generated by using a hash algorithm on the collected code coverage log.
  • the plurality of devices 910 and 930 may be smartphones, tablet PCs, laptops, desktops, and the like, and may perform data communication with the server 950 by wire or wirelessly.
  • the server 950 may perform data communication with the plurality of devices 910 and 930.
  • the server 950 may receive code coverage logs from the plurality of devices 910 and 930, store the received code coverage logs, and collect the stored code coverage logs by a predetermined method to measure code coverage.
  • the server 950 may make an update request for requesting a code coverage log to the plurality of devices 910 and 930.
  • the server 950 collects code coverage logs collected from the plurality of devices 910 and 930 to measure code coverage will be described in detail.
  • FIG. 10 is a flowchart for explaining a method for measuring code coverage according to the fourth embodiment.
  • the server 950 receives a code coverage log from a plurality of devices 910 and 930, and the server 950 receives code coverage.
  • Saving logs 951 and server 950 may include measuring code coverage using stored code coverage logs.
  • the server 950 may request an update request for the code coverage log from the plurality of devices 910 and 930. have.
  • the update request may be a request to change the current code coverage log from which the request was received, or may be a request to change the code coverage log at any point in time (at a specific time or at a specific time).
  • the step 951 in which the server 950 stores the received code coverage logs may be a step in which the server 950 stores the code coverage logs received from the plurality of devices 910 and 930 in a queue. have.
  • the step 952 of the server 950 measuring code coverage may be a step of collecting code coverage logs stored in a queue in a predetermined method to measure code coverage of the source code to be measured.
  • the server 950 stores the received code coverage logs (951), and describes a specific method for measuring the code coverage (952) with two examples.
  • the first example is that the code coverage log from the plurality of devices (910, 930) by the server 950 after the code coverage test is performed on each of the plurality of devices (910, 930) individually for the entire source code to be measured If you receive a
  • the source code to be measured is divided into a plurality of devices and distributed to the plurality of devices 910 and 930 so that the code coverage test is performed on the plurality of devices 910 and 930, and then the server 950 receives the plurality of source codes. This is the case when code coverage logs are received from the devices 910 and 930.
  • the fundamental difference between the first example and the second example is whether the source codes tested in the plurality of devices 910, 930 are the same or different.
  • the first example is when the source codes tested in the plurality of devices 910 and 930 are the same, and the second example is when the source codes tested in the plurality of devices 910 and 930 are different.
  • the code coverage measurement method according to the first example will be described below with reference to FIG. 11.
  • FIG. 11 is a diagram for describing a first example of the method for measuring code coverage shown in FIG. 10.
  • the first example shown in FIG. 11 is the first code from the first device 910 at certain times (9:00, 9:10, 9:20), as shown in the table shown in FIG.
  • the coverage logs log_1-1, log_1-2, log_1-3 are received, and the second code coverage logs log_2-1, log_2-2, log_2-3 are received from the second device 930. It is intended.
  • Each of the code coverage logs of FIG. 11 (a) includes a plurality of parts, in which the plurality of parts are represented by boxes, and the checked box is the part where the code coverage test is performed, and the unchecked box is Code coverage test is not performed. Since the first code coverage log and the second code coverage log are for the same source code, it is assumed that the data length of each log is the same.
  • the server 950 illustrated in FIG. 10 may include the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2 as shown in the table of FIG.
  • the server 950 Upon receiving -1, log_2-2, log_2-3, the server 950 queues the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2.
  • -1, log_2-2, log_2-3) are stored as shown in FIG.
  • the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2-1, log_2-2, log_2-3 are stored in the queue in the server 950. Stored in the order received. For convenience, it is assumed that the first code coverage log is received by the server 950 before the second code coverage log.
  • the server 950 collects the stored code coverage logs log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, and log_2-3 to measure the code coverage of the measurement target source code.
  • one method of collecting code coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) to measure the code coverage of the source code to be measured is code
  • the code coverage is measured by accumulating coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) in order of being stored in a queue.
  • the code coverage value (40%) of the first code coverage log 1 (log_1-1) received first is calculated, and then the first code coverage log 1 (log_1-1) and the second code coverage log 1 are calculated.
  • Accumulate (log_2-1) to calculate the code coverage value (60%). In this way, the code coverage value (100%) is calculated by accumulating up to the last stored second code coverage log 3 (log_2-3).
  • this method has a problem that the data of the code coverage log is not efficient when the data is large and long, and the calculation takes too long. Therefore, by calculating the code coverage value in the following way, it is possible to calculate the code coverage value more efficiently and quickly.
  • Another method of collecting code coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) to measure code coverage of the source code to be measured is code stored in a queue.
  • Create a virtual code coverage log with the same data size as the coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3), and create the generated virtual code coverage log. It is determined whether the code coverage test is performed for each of the plurality of components.
  • the method for determining whether the code coverage test for each of the plurality of parts constituting the generated virtual code coverage log, all code coverage logs search for the first portions 1100 corresponding to the first portion of the virtual code coverage log, and code coverage tested at least one of the first portions 1100 If (checked) is present, the first portion of the virtual code coverage is determined to be tested.
  • the code coverage value is calculated by determining whether or not all parts of the virtual code coverage are tested. According to this method, in the case of FIG. 11B, since all parts of the generated virtual code coverage log will be checked, the code coverage value will be 100 (%).
  • FIG. 12 is a diagram for describing a second example of the method for measuring code coverage shown in FIG. 10.
  • the first example shown in FIG. 12 is the first code from the first device 910 at certain times (9:00, 9:10, 9:20), as shown in the table shown in FIG.
  • the coverage logs log_1-1, log_1-2, log_1-3 are received, and the second code coverage logs log_2-1, log_2-2, log_2-3 are received from the second device 930. It is intended.
  • Each of the code coverage logs of FIG. 12A includes a plurality of parts, in which the plurality of parts are represented by boxes, and a checked box is a part where a code coverage test is performed, and an unchecked box is shown in FIG. Code coverage test is not performed. Since the first code coverage log and the second code coverage log target different source codes, it is assumed that the data length of each log is different.
  • the server 950 illustrated in FIG. 10 may include first code coverage logs log_1-1, log_1-2, log_1-3 and second code coverage logs log_2 as shown in the table of FIG.
  • the server 950 Upon receiving -1, log_2-2, log_2-3, the server 950 queues the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2.
  • -1, log_2-2, log_2-3) are stored as shown in FIG.
  • the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2-1, log_2-2, log_2-3 are stored in the queue in the server 950. Stored in the order received. For convenience, it is assumed that the first code coverage log is received by the server 950 before the second code coverage log.
  • the server 950 collects the stored code coverage logs log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, and log_2-3 to measure the code coverage of the measurement target source code.
  • the second example illustrated in FIG. 12 is a different log because the first code coverage log and the second code coverage log target different source codes. Accordingly, the second example shown in FIG. 12 uses the same source code as the code coverage logs stored in the queue (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3). The step of classifying the targets should be performed before measuring the code coverage.
  • the method of classifying the code coverage logs stored in the queue (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) with the same source code, You can sort by eigenvalues.
  • the plurality of devices 910 and 930 illustrated in FIG. 10 transmit the code coverage log to the server 950
  • the plurality of devices 910 and 930 may transmit a unique value of the corresponding code coverage log together with the code coverage log.
  • the unique value of the corresponding code coverage log may be generated using a hash algorithm.
  • the unique value of the corresponding code coverage log is a unique value that does not change regardless of whether each of the plurality of portions in the corresponding code coverage log has been tested.
  • the server 950 uses the code coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) and their respective intrinsic values to determine the code coverage logs ( log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) can be classified among the targets of the same source code.
  • the above-described embodiments may be implemented in the form of program instructions that can be executed by various computer components, and recorded on a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
  • Program instructions recorded on the computer-readable recording medium may be those specially designed and configured for the present invention, or may be known and available to those skilled in the computer software arts.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
  • the hardware device may be configured to operate as one or more software modules to carry out the process according to the invention, and vice versa.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

One embodiment of the present invention relates to a method for measuring code coverage. The method for measuring code coverage, according to the embodiment, comprises the steps of: inserting a probe in a source code; generating an executable file by compiling the source code having the probe inserted therein; and measuring code coverage by using the generated executable file, wherein the step of inserting the probe in the source code comprises a step of generating an abstract syntax tree from the source code, a step of generating a control flow graph by interpreting the abstract syntax tree, and a step of inserting the probe in the source code by using the abstract syntax tree and the control flow graph.

Description

코드 커버리지 측정 방법 및 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체Computer-readable recording medium recording method of code coverage measurement and program for executing the same
본 발명은 코드 커버리지 측정 방법 및 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체에 관한 것이다.The present invention relates to a method for measuring code coverage and a computer readable recording medium having recorded thereon a program for executing the same.
코드 커버리지(Code Coverage)는, 소프트웨어 테스트(software test)의 품질을 측정하기 위해 사용되는 하나의 척도(measure)이다. Code coverage is a measure used to measure the quality of a software test.
코드 커버리지는, 어느 하나의 프로그램(program)의 소스 코드(source code)가 테스트된 비율을 의미한다. 따라서, 코드 커버리지는 일반적으로 백분율로 표시된다. Code coverage refers to the rate at which the source code of any one program has been tested. Thus, code coverage is generally expressed as a percentage.
코드 커버리지를 측정하기 위해서는, 소정의 코드 커버리지 측정 도구가 필요한데 대표적으로 LDRA과 VectorCAST가 있다.In order to measure code coverage, certain code coverage measurement tools are required, typically LDRA and VectorCAST.
본 발명은, 코드 커버리지를 측정하고자 하는 소스 코드에 탐침을 효율적으로 삽입할 수 있는 코드 커버리지 측정 방법과 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체를 제공한다.The present invention provides a code coverage measuring method capable of efficiently inserting a probe into a source code for which code coverage is to be measured, and a computer readable recording medium having recorded thereon a program for executing the code coverage.
또한, 본 발명은, 커버리지 측정을 위해 소스 코드를 컴파일 한 후에, 전체 소스 코드들 중에서 변경이 없는 소스 코드에 대해서는 컴파일하여 실행 파일을 생성해야하는 반복적인 과정을 생략할 수 있는 코드 커버리지 측정 방법과 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체를 제공한다.In addition, the present invention, after compiling the source code for coverage measurement, code coverage measurement method that can omit the repetitive process of compiling for the source code that does not change among the entire source code to generate an executable file and this A computer readable recording medium having recorded thereon a program for execution is provided.
또한, 본 발명은, 소스 코드의 코드 커버리지 측정한 후에, 소스 코드에 변경이 이루어질 때마다 전체 소스 코드의 코드 커버리지를 다시 측정하지 않을 수 있는 효과적인 코드 커버리지 측정 방법과 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체를 제공한다.In addition, the present invention, after measuring the code coverage of the source code, every time a change is made to the source code, an effective code coverage measurement method that can not measure the code coverage of the entire source code again and the computer for recording the program for executing the same It provides a recording medium that can be read.
또한, 본 발명은, 소정의 소스 코드가 하나의 장치가 아닌 복수의 장치들에서 코드 커버리지 테스트가 수행된 경우에, 복수의 장치들에서 수집된 코드 커버리지 테스트를 취합하여 소스 코드의 코드 커버리지를 신속하게 측정할 수 있는 코드 커버리지 측정 방법과 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체를 제공한다.In addition, the present invention, when the code coverage test is performed on a plurality of devices in which the predetermined source code is not one device, the code coverage test collected from the plurality of devices are collected to quickly improve the code coverage of the source code. A computer readable recording medium having recorded thereon a method for measuring code coverage and a program for executing the same are provided.
본 발명의 해결하고자 하는 과제는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 해결하고자 하는 과제들은 아래의 기재로부터 당업자에게 명확하게 이해되어질 수 있을 것이다.The problem to be solved of the present invention is not limited to those mentioned above, other problems to be solved not mentioned will be clearly understood by those skilled in the art from the following description.
실시 형태에 따른 소스 코드의 코드 커버리지 측정 방법은, 상기 소스 코드에 탐침을 삽입하는 단계; 상기 탐침이 삽입된 소스 코드를 컴파일하여 실행 파일을 생성하는 단계; 및 상기 생성된 실행 파일을 이용하여 상기 코드 커버리지를 측정하는 단계;를 포함하고, 상기 소스 코드에 탐침을 삽입하는 단계는, 상기 소스 코드로부터 추상 구문 트리를 생성하는 단계; 상기 추상 구문 트리를 해석하여 제어 흐름 그래프를 생성하는 단계; 및 상기 추상 구문 트리와 상기 제어 흐름 그래프를 이용하여 상기 소스 코드에 상기 탐침을 삽입하는 단계;를 포함한다.Code coverage measurement method of the source code according to the embodiment, the step of inserting a probe into the source code; Compiling the source code into which the probe is inserted to generate an executable file; And measuring the code coverage using the generated executable file, wherein inserting a probe into the source code comprises: generating an abstract syntax tree from the source code; Interpreting the abstract syntax tree to generate a control flow graph; And inserting the probe into the source code using the abstract syntax tree and the control flow graph.
*실시 형태에 따른 소스 코드의 코드 커버리지 측정 방법은, 상기 소스 코드가 실질적으로 변경되었는지 여부를 판별하는 단계; 상기 소스 코드가 실질적으로 변경되었으면, 변경된 소스 코드의 코드 커버리지를 측정하는 단계; 및 상기 소스 코트가 실질적으로 변경되지 않았으면, 기존 코드 커버리지 값을 출력하는 단계;를 포함한다.A code coverage measurement method of source code according to an embodiment includes: determining whether the source code has been substantially changed; If the source code has substantially changed, measuring code coverage of the changed source code; And if the source coat has not been substantially changed, outputting an existing code coverage value.
실시 형태에 따른 소스 코드의 코드 커버리지 측정 방법은, 서버가 복수의 장치들에서 수집된 코드 커버리지 로그들을 수신하여 코드 커버리지를 측정하는 방법으로서, 상기 복수의 장치들로부터 수신되는 코드 커버리지 로그들을 수신되는 시간 순서대로 대기열에 저장하는 단계; 및 상기 대기열에 저장된 코드 커버리지 로그들을 이용하여 상기 코드 커버리지를 측정하는 단계;를 포함한다.Code coverage measurement method of the source code according to the embodiment, the server receives the code coverage logs collected from a plurality of devices to measure the code coverage, the code coverage logs received from the plurality of devices Storing in a queue in chronological order; And measuring the code coverage using the code coverage logs stored in the queue.
본 발명에 따른 코드 커버리지 측정 방법과 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체를 사용하면, 코드 커버리지를 측정하고자 하는 소스 코드에 탐침을 효율적으로 삽입할 수 있다. 따라서, 탐침이 삽입된 소스 코드의 바이너리(binary) 크기를 줄일 수 있어 소스 코드의 코드 커버리지 값을 측정할 때 따르는 성능 부작용을 최소화할 수 있는 이점이 있다.Using a method of measuring code coverage according to the present invention and a computer-readable recording medium having recorded thereon a program for executing the code coverage, the probe can be efficiently inserted into the source code for which the code coverage is to be measured. Therefore, the binary size of the source code into which the probe is inserted can be reduced, thereby minimizing the performance side effects of measuring the code coverage value of the source code.
또한, 소스 코드를 컴파일 한 후에, 소스 코드에 변경이 이루어질 때마다 전체 소스 코드에 대해서 커버리지 측정용 실행 파일을 생성해야하는 반복적인 과정을 생략할 수 있다. 따라서, 변경되지 안흔ㄴ 소스 코드에 대해서는 커버리지 측정 준비 과정이 생략될 수 있으므로, 소스 코드의 코드 커버리지 측정 준비 시간을 줄일 수 있는 이점이 있다.In addition, after compiling the source code, the repetitive process of generating an execution file for coverage measurement for the entire source code whenever a change is made to the source code can be omitted. Therefore, since the coverage measurement preparation process may be omitted for the unchanged source code, there is an advantage of reducing the code coverage measurement preparation time of the source code.
또한, 소스 코드의 코드 커버리지 측정한 후에, 소스 코드에 변경이 이루어지더라도 변경되지 않은 소스 코드 부분의 커버리지 값은 그대로 유지하여 전체 소스 코드의 코드 커버리지를 다시 측정하지 않을 수 있다. 따라서, 코드 커버리지 테스트가 된 부분을 다시 테스트하지 않아도 되기 때문에, 특정 커버리지 기준값을 달성하는데 들어가는 시간을 줄일 수 있는 이점이 있다.In addition, after the code coverage measurement of the source code, even if a change is made in the source code, the coverage value of the unchanged source code part may be maintained as it is, so that the code coverage of the entire source code may not be measured again. Therefore, since the code coverage test portion does not need to be tested again, there is an advantage that the time taken to achieve a specific coverage reference value can be reduced.
또한, 소정의 소스 코드가 하나의 장치가 아닌 복수의 장치들에서 코드 커버리지 테스트가 수행된 경우에, 복수의 장치들에서 수집된 코드 커버리지 테스트를 자동으로 취합하여 소스 코드의 코드 커버리지를 신속하게 측정할 수 있다. In addition, when a code coverage test is performed on a plurality of devices in which a given source code is not one device, the code coverage test collected in the plurality of devices is automatically collected to quickly measure the code coverage of the source code. can do.
도 1은 본 발명의 제1 실시 형태에 따른 코드 커버리지 측정 방법을 나타내는 순서도.1 is a flowchart showing a code coverage measuring method according to the first embodiment of the present invention.
도 2는 도 1에 도시된 소스 코드에 탐침을 삽입하는 단계를 구체화한 순서도.2 is a flow chart embodying the step of inserting a probe into the source code shown in FIG.
도 3은 탐침의 삽입 위치를 결정하는 방법을 설명하기 위한 제어 흐름 그래프의 일 예.3 is an example of a control flow graph for explaining a method of determining an insertion position of a probe.
도 4는 도 2에 도시된 소스 코드에 탐침을 삽입하는 방법을 구현할 수 있는 탐침 삽입 장치의 블록도.4 is a block diagram of a probe insertion apparatus that may implement a method of inserting a probe into the source code shown in FIG.
도 5는 본 발명의 제2 실시 형태에 따른 코드 커버리지 측정 방법을 나타내는 순서도.5 is a flowchart illustrating a code coverage measurement method according to the second embodiment of the present invention.
도 6은 도 5에 도시된 해당 소스 코드가 기존에 컴파일 수행했던 소스 코드이지 여부를 판별하는 단계(10)를 구체화한 순서도.FIG. 6 is a flowchart detailing step 10 of determining whether the corresponding source code shown in FIG. 5 is a source code that has been previously compiled.
도 7은 본 발명의 제3 실시 형태에 따른 코드 커버리지 측정 방법을 나타내는 순서도.7 is a flowchart showing a code coverage measurement method according to the third embodiment of the present invention.
도 8은 도 7에 도시된 변경된 소스 코드가 실질적으로 변경되었는지 여부를 판별하는 단계(20)를 구체화한 순서도.FIG. 8 is a flow chart embodying step 20 for determining whether the changed source code shown in FIG. 7 has been substantially changed.
도 9는 제4 실시 형태에 따른 코드 커버리지 측정 방법을 설명하기 위한 시스템도.9 is a system diagram for explaining a code coverage measurement method according to the fourth embodiment.
도 10은 제4 실시 형태에 따른 코드 커버리지를 측정하는 방법을 설명하기 위한 순서도.10 is a flowchart for explaining a method for measuring code coverage according to the fourth embodiment.
도 11은 도 10에 도시된 코드 커버리지 측정 방법의 첫 번째 예를 설명하기 위한 도면.FIG. 11 is a diagram for describing a first example of the method for measuring code coverage shown in FIG. 10. FIG.
도 12은 도 10에 도시된 코드 커버리지 측정 방법의 두 번째 예를 설명하기 위한 도면.FIG. 12 is a diagram for describing a second example of the code coverage measurement method shown in FIG. 10. FIG.
이하, 본 발명의 바람직한 실시예의 상세한 설명이 첨부된 도면들을 참조하여 설명된다. 도면들 중 인용부호들 및 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 인용부호들로 표시됨을 유의해야 한다. 참고로 본 발명을 설명함에 있어서 관련된 공지 기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 이하 첨부된 도면을 참조하여 본 발명의 실시 형태에 따른 코드 커버리지 측정 방법을 설명한다.DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, detailed descriptions of preferred embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that reference numerals and like elements among the drawings are denoted by the same reference numerals as much as possible even if they are shown in different drawings. For reference, in the following description of the present invention, if it is determined that a detailed description of related known functions or configurations may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted. Hereinafter, a method of measuring code coverage according to an embodiment of the present invention will be described with reference to the accompanying drawings.
도 1은 본 발명의 제1 실시 형태에 따른 코드 커버리지 측정 방법을 나타내는 순서도이다.1 is a flowchart showing a code coverage measurement method according to the first embodiment of the present invention.
도 1을 참조하면, 제1 실시 형태에 따른 코드 커버리지 측정 방법은, 소스 코드에 탐침(probe)을 삽입하는 단계(100), 실행 파일을 생성하는 단계(300) 및 코드 커버리지를 측정하는 단계(500)를 포함할 수 있다.Referring to FIG. 1, the method for measuring code coverage according to the first embodiment includes inserting a probe into source code 100, generating an executable file 300, and measuring code coverage ( 500).
소스 코드에 탐침을 삽입하는 단계(100)는 코드 커버리지를 측정하기 위한 탐침을 소스 코드에 삽입하는 단계이다. 이 단계는, 도 2를 참조하여 구체적으로 후술하도록 한다.Inserting a probe into the source code 100 is inserting a probe into the source code to measure code coverage. This step will be described later in detail with reference to FIG. 2.
실행 파일을 생성하는 단계(300)는, 탐침이 삽입된 소스 코드를 컴파일하여 실행 파일을 생성하는 단계이다. Generating an executable file 300 is a step of generating an executable file by compiling source code into which a probe is inserted.
코드 커버리지를 측정하는 단계(500)는 생성된 실행 파일을 이용하여 코드 커버리지를 측정하는 단계이다.Measuring the code coverage 500 is a step of measuring the code coverage using the generated executable file.
도 2는 도 1에 도시된 소스 코드에 탐침을 삽입하는 단계를 구체화한 순서도이다.FIG. 2 is a flowchart illustrating the steps of inserting a probe into the source code shown in FIG. 1.
소스 코드에 탐침을 삽입하는 단계는, 추상 구문 트리(abstract syntax tree, AST)를 생성하는 단계(110), 제어 흐름 그래프(Control Flow Graph, CFG)를 생성하는 단계(120) 및 탐침을 삽입하는 단계(130)를 포함할 수 있다.Inserting the probe into the source code includes generating an abstract syntax tree (AST) (110), generating a control flow graph (CFG) (120) and inserting the probe Step 130 may include.
추상 구문 트리를 생성하는 단계(110)는, 소스 코드로부터 추상 구문 트리를 생성할 수 있다. 추상 구문 트리는, 파서(parser)를 이용하여 생성할 수 있다. 여기서, 파서는 예를 들어 C/C++ 파서일 수 있다. 소스 코드를 C/C++ 파서로 입력시키면 C/C++ 파서는 추상 구문 트리를 생성할 수 있다.Generating an abstract syntax tree 110 may generate an abstract syntax tree from source code. An abstract syntax tree can be created using a parser. Here, the parser may be a C / C ++ parser, for example. By entering the source code into the C / C ++ parser, the C / C ++ parser can generate an abstract syntax tree.
제어 흐름 그래프를 생성하는 단계(120)는 앞서 생성된 추상 구문 트리를 해석하여 제어 흐름 그래프를 생성한다.Generating a control flow graph (120) generates a control flow graph by interpreting the abstract syntax tree generated above.
탐침을 삽입하는 단계(130)는, 앞서 생성된 추상 구문 트리와 제어 흐름 그래프를 이용하여 탐침을 삽입하는 단계이다. 구체적인 탐침 삽입 방법을 이하에서 구체적으로 설명하도록 한다.Inserting a probe 130 is a step of inserting a probe using the abstract syntax tree and the control flow graph generated above. Specific probe insertion method will be described in detail below.
탐침은 추상 구문 트리와 제어 흐름 그래프를 이용하여 삽입한다. 구체적으로, 제어 흐름 그래프를 참조하여 탐침을 삽입하고, 추상 구문 트리 내의 분기문의 조건의 개수를 판별하여 탐침을 삽입할 수 있다. Probes are inserted using abstract syntax trees and control flow graphs. Specifically, the probe may be inserted with reference to the control flow graph, and the probe may be inserted by determining the number of conditions of the branch statement in the abstract syntax tree.
제어 흐름 그래프를 참조하여 탐침을 삽입하는 방법과 추상 구문 트리 내의 분기문의 조건의 개수를 판별하여 탐침을 삽입하는 방법은 각자 병렬적으로 수행될 수 있다. 이하에서 각각 나눠서 설명하도록 한다.A method of inserting a probe by referring to a control flow graph and a method of inserting a probe by determining the number of conditions of branch statements in an abstract syntax tree may be performed in parallel. The following description will be divided into each.
제어 흐름 그래프를 참조하여 탐침을 삽입하는 방법은, 제어 흐름 그래프에서 탐침의 삽입 위치를 결정한 후, 탐침을 삽입할 수 있다. In the method of inserting the probe with reference to the control flow graph, after determining the insertion position of the probe in the control flow graph, the probe may be inserted.
제어 흐름 그래프에서 탐침의 삽입 위치를 결정하는 방법은, 제어 흐름 그래프에서 기저 경로(basis path)들을 검색한 후, 각 기저 경로당 하나의 탐침을 삽입하는 것으로 결정될 수 있다. The method for determining the insertion position of the probe in the control flow graph may be determined by searching for base paths in the control flow graph and then inserting one probe for each base path.
여기서, 기저 경로란, 분기문의 한 가지(brench)에서 다음 분기문을 만나기 전까지의 경로를 의미하는데, 기저 경로는 더 이상 나눌 수 없는 최소의 수행 흐름이다. 도 3을 참조하여 제어 흐름 그래프에서 탐침의 삽입 위치를 결정하는 방법의 일 예를 설명하도록 한다.Here, the base path means a path from one branch of a branch statement until the next branch statement is met, and the base path is a minimum execution flow that can no longer be divided. An example of a method of determining an insertion position of a probe in a control flow graph will be described with reference to FIG. 3.
도 3은 탐침의 삽입 위치를 결정하는 방법을 설명하기 위한 제어 흐름 그래프의 일 예이다.3 is an example of a control flow graph for explaining a method of determining an insertion position of a probe.
도 3에 도시된 제어 흐름 그래프에서 기저 경로를 검색한다. 기저 경로는 앞에서 설명한 바와 같이 분기문(if)의 한 가지에서 다음 분기문(if)을 만나기 전까지의 경로이므로, 도 3에 도시된 제어 흐름 그래프에서의 기저 경로는 5개(path 1, path 2, path 3, path 4, path 5)이다. The base path is retrieved from the control flow graph shown in FIG. Since the base path is a path from one branch of the branch (if) to the next branch (if) as described above, five base paths in the control flow graph shown in FIG. 3 (path 1, path 2). , path 3, path 4, path 5).
5개의 기저 경로들(path 1, path 2, path 3, path 4, path 5) 각각에 하나의 탐침(P1, P2, P3, P4, P5)을 삽입한다.One probe (P1, P2, P3, P4, P5) is inserted into each of the five base paths (path 1, path 2, path 3, path 4, and path 5).
다시, 도 2를 참조하여, 추상 구문 트리 내의 분기문의 조건의 개수를 판별하여 탐침을 삽입하는 방법을 설명한다.Referring back to FIG. 2, a method of inserting a probe by determining the number of conditions of branch statements in the abstract syntax tree will be described.
추상 구문 트리 내의 분기문의 조건의 개수를 판별하여 탐침을 삽입하는 방법은, 추상 구문 트리에서 조건의 개수가 2개 이상인 분기문을 검색하고, 검색된 분기문의 형태를 변경한 후, 탐침을 삽입하는 것일 수 있다. The method of inserting a probe by determining the number of conditions of a branch statement in the abstract syntax tree is to search for a branch statement having two or more conditions in the abstract syntax tree, change the form of the found branch statement, and then insert a probe. Can be.
여기서, 분기문은 실행 흐름을 결정하는 문으로서, for문, if문 및 while문을 포함할 수 있다. 그리고, 분기문의 형태를 변경한다는 의미는 검색된 분기문의 실질적인 의미는 변경하지 않고, 탐침을 삽입할 수 있도록 형식을 변경하는 것을 의미한다.Here, the branch statement is a statement that determines the execution flow, and may include a for statement, an if statement, and a while statement. In addition, to change the form of the branch statement means to change the format so that the probe can be inserted, without changing the actual meaning of the searched branch statement.
이하에서는, 조건이 2개인 분기문(if문)의 형태를 변경하는 하나의 방법을 예를 들어 설명하도록 한다.Hereinafter, one method of changing the form of a branching statement (if statement) having two conditions will be described as an example.
[분기문 예][Example of Quarter]
If (A && B)If (A && B)
상기 [분기문 예]는 if문이고, 조건이 2개(A, B)이며, 2개의 조건(A, B)은 1개의 논리 연산자(&&)로 결합되어 있다. 상기 [분기문의 예]의 진리표는 아래의 <표 1>과 같다.[Example of the branch statement] is an if statement, two conditions (A and B), and two conditions (A and B) are combined by one logical operator (&&). The truth table of [Example of Quarter] is shown in <Table 1> below.
AA BB DecisionDecision
1 (true)1 (true) 1 (true)1 (true) 1 (true)1 (true)
1 (true)1 (true) 0 (false)0 (false) 0 (false)0 (false)
0 (false)0 (false) Don’t careDo n’t care 0 (false)0 (false)
상기 [분기문 예]는 형식적으로 탐침을 삽입할 수 없는 형태를 갖고 있다. 따라서, 상기 [분기문 예]는 탐침을 삽입할 수 있는 형태로 변경해야 한다. 상기 [분기문 예]의 실질적인 의미는 변경하지 않으면서 탐침을 삽입할 수 있는 형태로 변경한 후 탐침을 삽입하면, 아래의 [분기문 변형 예1]과 같을 수 있다.The branching example has a form in which the probe cannot be inserted formally. Therefore, the [branch example] should be changed to a form in which the probe can be inserted. If the actual meaning of the [branch example] is changed to a form in which the probe can be inserted without changing, the probe may be inserted as shown in [Branch Modification Example 1] below.
[분기문 변형 예1] [Variation Example 1]
If ( ( A ? probe (m), 1 : probe (n), 0 ) && ( B ? probe(o), 1 : probe (p), 0 ) )If ((A? Probe (m), 1: probe (n), 0) && (B? Probe (o), 1: probe (p), 0))
상기 [분기문 변형 예1]은 논리 연산자(&&)는 그대로 존재하고, 탐침을 삽입하기 위해 각 조건을 삼항 연산자로 변경하였다. 이렇게 변경하여도 상기 [분기문 예]와의 실질적인 의미는 동일하다. 이러한 상기 [분기문 변형 예1]는 내부에 분기점이 3개(?, &&, ?)가 존재하고, 총 4개의 탐침(m, n, o, p)이 존재한다.In the [branch modification example 1], the logical operator & is still present, and each condition is changed to a ternary operator in order to insert a probe. Even if this change is made, the actual meaning of the [branch example] is the same. The branching modification example 1 has three branching points (?, &&,?) And four probes (m, n, o, p) in total.
상기 [분기문 예]의 다른 변형 예는 아래의 [분기문 변형 예2]와 같을 수 있다.Other modifications of the [branch example] may be the same as the following [branch variant 2].
[분기문 변형 예2] [Variation Example 2]
If ( A ? ( B ? probe (a), 1 : probe (b), 0 ) : probe (c), 0 )If (A? (B? Probe (a), 1: probe (b), 0): probe (c), 0)
상기 [분기문 변형 예2]는 논리 연산자(&&)를 삼항 연산자로 변경하였다. 이렇게 변경하여도 상기 [분기문 예]와의 실질적인 의미는 동일하다. 이러한 상기 [분기문 변형 예2]는 내부에 분기점이 2개(?, ?)이 존재하고, 총 3개의 탐침(a, b, c)이 존재한다. In [Branch Modification Example 2], the logical operator & is changed to a ternary operator. Even if this change is made, the actual meaning of the [branch example] is the same. In the above [Branch Modification Example 2], two branch points (?,?) Exist inside, and a total of three probes a, b, and c exist.
상기 [분기문 변형 예2]는, 상기 [분기문 변형 예1]과 대비하였을 때, 조건을 삼항 연산자로 변경하는 것이 아니라, 논리 연산자를 삼항 연산자로 변경함으로써 분기점의 개수와 탐침의 개수를 각각 1개씩 더 줄일 수 있다. 분기점의 개수와 탐침의 개수는 코드 커버리지 측정을 위한 성능 부하를 결정하는 결정적인 요소이므로, 상기 [분기문 예]를 [분기문 변형 예1]이 아닌, [분기문 변형 예2]로 변경함으로써, 코드 커버리지 측정 성능을 향상시킬 수 있다.Compared to the above [Variation Modification Example 1], the [branch modification example 2] does not change the condition to the ternary operator, but rather changes the logical operator to the ternary operator to change the number of branch points and the number of probes, respectively. We can reduce one more. Since the number of branch points and the number of probes are the decisive factors for determining the performance load for the code coverage measurement, by changing the [branch example] to [branch variant 2] instead of [branch variant 1], Code coverage measurement performance can be improved.
도 4는 도 2에 도시된 소스 코드에 탐침을 삽입하는 방법을 구현할 수 있는 탐침 삽입 장치의 블록도이다. FIG. 4 is a block diagram of a probe insertion apparatus that may implement a method of inserting a probe into the source code shown in FIG. 2.
도 4를 참조하면, 탐침 삽입 장치(400)는, 파서(410), 제어 흐름 그래프 생성기(430) 및 소스 코드 재기록기(450)를 포함할 수 있다.Referring to FIG. 4, the probe insertion apparatus 400 may include a parser 410, a control flow graph generator 430, and a source code rewriter 450.
파서(410)는 입력되는 소스 코드를 파싱하여 추상 구문 트리를 생성한다. 여기서, 파서(410)는 C/C++ 파서일 수 있다.The parser 410 parses input source code to generate an abstract syntax tree. Here, the parser 410 may be a C / C ++ parser.
제어 흐름 그래프 생성기(430)는 파서(410)에서 출력된 추상 구문 트리를 입력으로 하여 이를 해석하여 제어 흐름 그래프(430)를 생성한다.The control flow graph generator 430 receives the abstract syntax tree output from the parser 410 as an input and interprets it to generate the control flow graph 430.
소스 코드 재기록기(450)는 제어 흐름 그래프 생성기(430)에서 출력된 제어 흐름 그래프와 파서(410)에서 출력된 추상 구문 트리를 이용하여 탐침이 삽입된 소스 코드를 출력한다. 제어 흐름 그래프와 추상 구문 트리를 이용하여 탐침을 삽입하는 방법은 도 2 내지 도 3에서 상세히 설명하였으므로, 이에 대한 설명은 생략하기로 한다.The source code rewriter 450 outputs the source code into which the probe is inserted using the control flow graph output from the control flow graph generator 430 and the abstract syntax tree output from the parser 410. Since the method of inserting the probe using the control flow graph and the abstract syntax tree has been described in detail with reference to FIGS. 2 to 3, a description thereof will be omitted.
도 5는 본 발명의 제2 실시 형태에 따른 코드 커버리지 측정 방법을 나타내는 순서도이다.5 is a flowchart showing a code coverage measurement method according to the second embodiment of the present invention.
도 5에 도시된 제2 실시 형태에 따른 코드 커버리지 측정 방법은, 적어도 1회 이상 컴파일이 수행되었던 소스 코드(이하, ‘이전 소스 코드’)의 내용이 개발자나 기타 프로그램에 의해 변경된 경우에 있어서, 변경된 소스 코드의 코드 커버리지를 측정하는 방법에 관한 것이다.In the code coverage measurement method according to the second embodiment illustrated in FIG. 5, when the contents of source code (hereinafter, referred to as “previous source code”) that have been compiled at least once are changed by a developer or other program, A method for measuring code coverage of modified source code.
*도 5를 참조하면, 제2 실시 형태에 따른 코드 커버리지 측정 방법은, 기존에 컴파일을 수행하였던 소스 코드인지 여부를 판별하는 단계(10), 소스 코드에 탐침을 삽입하는 단계(100), 실행 파일을 생성하는 단계(300) 및 코드 커버리지를 측정하는 단계(500)를 포함할 수 있다.Referring to FIG. 5, in the code coverage measurement method according to the second embodiment, a step 10 of determining whether the source code has been previously compiled, a step 100 of inserting a probe into the source code, and an execution The method may include generating a file 300 and measuring code coverage 500.
여기서, 기존에 컴파일을 수행하였던 소스 코드인지 여부를 판별하는 단계(10)를 제외하고, 소스 코드에 탐침을 삽입하는 단계(100), 실행 파일을 생성하는 단계(300) 및 코드 커버리지를 측정하는 단계(500)는 도 1에 도시된 소스 코드에 탐침을 삽입하는 단계(100), 실행 파일을 생성하는 단계(300) 및 코드 커버리지를 측정하는 단계(500)와 동일하므로, 이하에서는 기존에 컴파일을 수행하였던 소스 코드인지 여부를 판별하는 단계(10)를 구체적으로 설명하도록 한다.Here, except for the step 10 of determining whether the source code has been previously compiled, inserting a probe into the source code 100, generating an executable file 300, and measuring code coverage Step 500 is the same as the step 100 of inserting the probe into the source code shown in FIG. 1, generating the executable 300, and measuring the code coverage 500, and thus will be compiled below. It will be described in detail step 10 for determining whether or not the source code was performed.
기존에 컴파일을 수행했던 소스 코드인지 여부를 판별하는 단계(10)는, 소스 코드에 탐침을 삽입(100)하기 전에, 해당 소스 코드가 기존에 컴파일 수행하여 실행 파일을 생성했던 것인지 여부를 판별하는 단계이다. The step 10 of determining whether the source code has been previously compiled is to determine whether the source code has been previously compiled to generate an executable file before inserting the probe 100 into the source code. Step.
판별 결과, 해당 소스 코드가 기존에 컴파일을 수행하지 않았던 것이라면 기존 것과 다른 소스 코드로 인식하고 소스 코드에 탐침을 삽입(100)하고, 탐침이 삽입된 소스 코드를 컴파일하여 새로운 실행 파일을 생성(300)한다. 그리고, 새로운 실행 파일을 저장(400)한 후, 새로운 실행 파일의 코드 커버리지를 측정(500)한다. As a result of the determination, if the corresponding source code has not been compiled previously, the source code is recognized as a different source code from the existing one, the probe is inserted into the source code (100), and the source code into which the probe is inserted is generated to generate a new executable file (300). )do. After storing the new executable file 400, the code coverage of the new executable file is measured 500.
한편, 판별 결과, 해당 소스 코드가 기존에 컴파일을 수행했던 것이라면, 기존에 컴파일을 수행하여 미리 저장된 실행 파일을 불러와 코드 커버리지를 측정하는 단계(500)로 이동한다. 그러면, 이하에서는, 변경된 소스 코드가 기존에 컴파일 수행했던 것인지를 어떻게 판별하는지를 도 6을 참조하여 설명하도록 한다.On the other hand, if the determination result, if the source code has been previously compiled, go to step (500) to measure the code coverage by performing a previously compiled to load a pre-stored executable file. Next, how to determine whether the changed source code has been previously compiled will be described with reference to FIG. 6.
도 6은 도 5에 도시된 해당 소스 코드가 기존에 컴파일 수행했던 소스 코드이지 여부를 판별하는 단계(10)를 구체화한 순서도이다.FIG. 6 is a flowchart in which step 10 of determining whether the corresponding source code illustrated in FIG. 5 is the source code that has been previously compiled is illustrated.
도 6을 참조하면, 변경된 소스 코드가 기존에 컴파일 수행했던 소스 코드이지 여부를 판별하는 단계(10)는, 전처리된 소스 코드를 생성하는 단계(11), 노이즈를 제거하는 단계(12), 고유값을 생성하는 단계(13), 생성된 고유값이 이전 고유값과 동일한지 여부를 판별하는 단계(14) 및 미리 저장된 실행 파일을 출력하는 단계(15)를 포함할 수 있다. 여기서, 노이즈를 제거하는 단계(12)는 생략될 수도 있다.Referring to FIG. 6, the step 10 of determining whether the changed source code is the source code that has been previously compiled may include generating the preprocessed source code (11), removing noise (12), and uniqueness. The method may include generating a value 13, determining whether the generated eigenvalue is the same as a previous eigenvalue 14, and outputting a pre-stored executable file 15. Here, step 12 of removing noise may be omitted.
전처리된 소스 코드를 생성하는 단계(11)는, 변경된 소스 코드를 전처리(preprocessing)하여 전처리된 소스 코드를 생성하는 단계이다. The generating 11 of the preprocessed source code is a step of generating preprocessed source code by preprocessing the changed source code.
여기서, 전처리된 소스 코드는 탐침을 삽입할 수 있는 또는 컴파일을 수행할 수 있는 형상이 고정된 소스 코드이다. Here, the preprocessed source code is a source code having a fixed shape capable of inserting a probe or performing compilation.
여기서, 전처리는, 변경된 소스 코드를 해석하여 포함 관계 및 매크로 정의를 반영한 컴파일용 소스 코드를 생성하는 과정을 의미한다. 포함 관계를 반영한다는 것은, 전처리의 대상인 변경된 소스 코드 내에 시스템 헤더(system header)나 사용자 헤더(user header)가 포함(include)된 경우, 변경된 소스 코드에 상기 시스템 헤더나 사용자 헤더를 삽입하는 것을 의미한다. 그리고, 매크로 정의를 반영한다는 것은, 변경된 소스 코드 내에 정의된 매크로를 매크로 정의를 따르는 확장 문자열로 치환하는 것을 의미한다.Here, the preprocessing refers to a process of generating the source code for compilation reflecting the inclusion relationship and the macro definition by analyzing the changed source code. Reflecting the inclusion relationship means inserting the system header or the user header into the changed source code when the system header or the user header is included in the changed source code to be preprocessed. do. And, reflecting the macro definition means replacing the macro defined in the changed source code with an extension string that follows the macro definition.
노이즈를 제거하는 단계(12)는, 전처리된 소스 코드의 노이즈를 제거하는 단계이다. 여기서, 노이즈란, 전처리 시점에 의존하는 요소들을 의미한다. 전처리 시점에 의존하는 요소는, 예를 들면, 전처리가 수행된 시간에 관한 정보 및 날짜에 관한 정보일 수 있다. 이러한 노이즈는, 정규 표현식(regular expression)을 사용하여 제거할 수 있다. 여기서, 정규 표현식은 특정한 규칙을 가진 문자열의 집합을 표현하는데 사용하는 형식 언어를 의미한다.Removing noise 12 is removing noise of preprocessed source code. Here, the noise means elements that depend on the preprocessing time point. The element that depends on the preprocessing time point may be, for example, information about the time when the preprocessing was performed and information about the date. Such noise can be removed using regular expressions. Here, regular expression means a formal language used to express a set of strings with specific rules.
고유값을 생성하는 단계(13)는, 노이즈가 제거된 전처리된 소스 코드에 대해 정규화를 수행하여 형상 식별이 가능한 고유값을 생성하는 단계이다. 정규화를 수행한다는 것은 해쉬 알고리즘(hash algorithm)을 사용하여 전처리된 소스 코드 전체의 고유값을 생성하는 것을 의미한다. 여기서, 해쉬 알고리즘은 MD5(Message-Digest algorithm 5) 함수를 이용할 수 있다. 소스 코드에 주석을 삽입한다거나 띄어쓰기를 하는 등의 실질적인 의미를 변경하는 것이 아닌 것에 의해서는 소스 코드 전체의 고유값은 변경되지 않는다.Generating a eigenvalue 13 is a step of generating a eigenvalue capable of shape identification by performing normalization on the preprocessed source code from which noise is removed. Performing normalization means using a hash algorithm to generate eigenvalues throughout the preprocessed source code. Here, the hash algorithm may use a message-digest algorithm 5 (MD5) function. Intrinsic values of the entire source code are not changed by changing the actual meaning of the source code, such as commenting or spacing.
생성된 고유값이 이전 고유값과 동일한지 여부를 판별하는 단계(14)는, 생성된 고유값이 소정의 저장소에 미리 저장된 이전 고유값과 동일한지 여부를 판별하는 단계이다. 여기서, 상기 소정의 저장소에는 소정의 고유값들과 그 고유값들 각각에 대응하는 실행 파일들이 저장되어 있다. Determining whether or not the generated eigenvalue is equal to the previous eigenvalue is step 14 of determining whether the generated eigenvalue is the same as the previous eigenvalue previously stored in a given reservoir. Here, the predetermined storage stores predetermined eigenvalues and executable files corresponding to each of the eigenvalues.
만약, 생성된 고유값이 이전 고유값과 동일하면, 상기 소정의 저장소에 저장된 실행 파일을 불러온다(15). 그리고, 불려온 실행 파일의 코드 커버리지를 측정(500)한다. If the generated eigenvalue is the same as the previous eigenvalue, the executable file stored in the predetermined storage is loaded (15). Then, the code coverage of the loaded executable file is measured (500).
한편, 생성된 고유값이 이전 고유값과 다르면, 전처리된 소스 코드에 탐침을 삽입(100)한다. 그리고, 도 5에 도시된 바와 같이, 실행 파일을 생성(300)하고, 추후에 다시 이용할 수 있도록 생성된 실행 파일을 생성된 고유값과 함께 상기 소정의 저장소에 저장한다(400). 마지막으로, 생성된 실행 파일의 코드 커버리지를 측정(500)한다. If the generated eigenvalue is different from the previous eigenvalue, the probe is inserted into the preprocessed source code (100). As shown in FIG. 5, an executable file is generated 300, and the generated executable file is stored in the predetermined storage along with the generated unique value to be used again later (400). Finally, code coverage of the generated executable file is measured 500.
이와 같이, 도 5에 도시된 코드 커버리지 측정 방법은, 적어도 1회 이상 컴파일이 수행되었던 소스 코드가 개발자나 프로그램 등에 의해 변경된 경우에, 그 변경된 내용이 소스 코드의 실질적인 변경인지 아니면 실질적이지 않은 변경인지를 판별한 후, 그 변경된 내용이 실질적이지 않은 변경인 경우에는 기존에 컴파일이 수행되었던 실행 파일을 불러오고, 불려온 실행 파일의 코드 커버리지를 측정한다. 따라서, 적어도 1회 이상 컴파일 수행되었던 소스 코드에 주석이나 띄어쓰기 등과 같은 실질적인 변경이 이뤄진 경우에는, 변경된 소스 코드에 다시 탐침을 삽입한다거나 다시 실행 파일을 생성하는 과정을 다시 반복할 필요가 없다. 따라서, 적어도 1회 이상 컴파일 수행했던 소스 코드에 대해서는 코드 커버리지를 측정하기 위한 준비 시간을 단축할 수 있는 이점이 있다.As described above, the method of measuring the code coverage shown in FIG. 5 is, when the source code that has been compiled at least once is changed by a developer, a program, or the like, whether the changed content is a substantial change or a substantial change in the source code. If the changed content is not a substantial change, the executable file, which has been previously compiled, is loaded and the code coverage of the loaded executable file is measured. Therefore, when substantial changes such as comments or spacing have been made to the source code that has been compiled at least once, there is no need to repeat the process of inserting the probe into the changed source code or generating the executable file again. Therefore, there is an advantage in that preparation time for measuring code coverage can be shortened for source code that has been compiled at least once.
도 7은 본 발명의 제3 실시 형태에 따른 코드 커버리지 측정 방법을 나타내는 순서도이다.7 is a flowchart showing a code coverage measurement method according to the third embodiment of the present invention.
도 7에 도시된 제3 실시 형태에 따른 코드 커버리지 측정 방법은, 적어도 1회 이상 코드 커버리지가 측정되었던 소스 코드(이하, ‘이전 소스 코드’)의 내용이 개발자나 기타 프로그램에 의해 변경된 경우에 있어서, 변경된 소스 코드의 코드 커버리지를 측정하는 방법에 관한 것이다.In the code coverage measurement method according to the third embodiment shown in FIG. The present invention relates to a method for measuring code coverage of modified source code.
도 7을 참조하면, 제3 실시 형태에 따른 코드 커버리지 측정 방법은, 변경된 소스 코드가 실질적으로 변경되었는지 여부를 판별하는 단계(20), 기존 코드 커버리지 값을 출력하는 단계(30), 코드 커버리지를 측정하는 단계(40) 및 변경된 함수의 고유값과 함수 커버리지 값을 저장하는 단계(50)를 포함할 수 있다.Referring to FIG. 7, in the code coverage measurement method according to the third embodiment, determining whether the changed source code is substantially changed (20), outputting an existing code coverage value (30), and performing code coverage It may include the step of measuring 40 and the step 50 of storing the eigenvalues and function coverage values of the changed function.
변경된 소스 코드가 실질적으로 변경되었는지 여부를 판별하는 단계(20)는, 적어도 1회 이상 코드 커버리지를 측정했던 이전 소스 코드가 형식적인 변경이 아닌, 실질적으로 변경되었는지를 판별하는 단계이다.Determining whether or not the changed source code has been substantially changed is a step of determining whether the previous source code that measured the code coverage at least one or more times is substantially changed, not a formal change.
판별 결과, 만약 변경된 소스 코드가 실질적으로 변경된 것이 아닌 경우에는, 변경된 소스 코드의 코드 커버리지 측정하지 않고, 기존에 측정했던 코드 커버리지 값을 불러와 출력한다(30).As a result of the determination, if the changed source code is not substantially changed, the code coverage value which has been previously measured is retrieved and output without the code coverage measurement of the changed source code (30).
한편, 변경된 소스 코드가 실질적으로 변경된 것이라면, 변경된 소스 코드의 코드 커버리지를 측정하고(40), 소스 코드 내에서 변경된 함수의 고유값과 함수 커버리지 값을 저장한다(50). 여기서, 변경된 함수의 고유값과 함수 커버리지 값은 추후에 다시 이용될 수 있도록 소정의 저장소에 저장될 수 있다.Meanwhile, if the changed source code is substantially changed, the code coverage of the changed source code is measured (40), and the unique value and the function coverage value of the changed function in the source code are stored (50). Here, the changed eigenvalues and function coverage values may be stored in a predetermined repository for later use.
이하에서는 도 8을 참조하여 변경된 소스 코드가 실질적으로 변경되었는지 여부를 어떻게 판별하는지를 구체적으로 설명하도록 한다.Hereinafter, a method of determining whether the changed source code is substantially changed will be described in detail with reference to FIG. 8.
도 8은 도 7에 도시된 변경된 소스 코드가 실질적으로 변경되었는지 여부를 판별하는 단계(20)를 구체화한 순서도이다.FIG. 8 is a flowchart embodying step 20 for determining whether the changed source code shown in FIG. 7 has been substantially changed.
도 8을 참조하면, 변경된 소스 코드가 기존에 코드 커버리지를 측정했던 것인지 여부를 판별하는 단계(20)는, 전처리된 소스 코드를 생성하는 단계(21), 노이즈를 제거하는 단계(22), 함수별 고유값을 생성하는 단계(23), 적어도 하나 이상의 변경된 함수가 존재하는지를 판별하는 단계(24) 및 변경된 함수와 변경되지 않은 함수를 분류하는 단계(25)를 포함할 수 있다. 여기서, 노이즈를 제거하는 단계(22)는 생략될 수도 있다.Referring to FIG. 8, the step 20 of determining whether the changed source code has previously measured code coverage includes generating 21 preprocessed source code, removing noise 22, and function. The method may include generating a star eigenvalue 23, determining whether at least one changed function exists 24, and classifying the changed and unchanged functions 25. Here, step 22 of removing noise may be omitted.
전처리된 소스 코드를 생성하는 단계(21)와 노이즈를 제거하는 단계(22)는, 도 6에 도시된 전처리된 소스 코드를 생성하는 단계(11)와 노이즈를 제거하는 단계(12)와 동일하므로, 그 설명은 전술한 것으로 대체한다.The step 21 of generating preprocessed source code and the step 22 of removing noise are the same as the step 11 of generating preprocessed source code and step 12 of removing noise shown in FIG. , The description is replaced by the foregoing.
함수별 고유값을 생성하는 단계(23)는, 전처리된 소스 코드 내에 존재하는 복수의 함수들 별로 정규화를 수행하여 형상 식별이 가능한 함수별 고유값을 생성하는 단계이다. 따라서, 생성되는 함수별 고유값의 개수는 함수의 개수에 따라 결정된다. 여기서, 정규화를 수행한다는 것은 해쉬 알고리즘(hash algorithm)을 사용하여 전처리된 소스 코드 내의 복수의 함수들 별로 각각의 고유값을 생성하는 것을 의미한다. 특정 함수에 주석을 삽입한다거나 띄어쓰기를 하는 등의 실질적인 의미를 변경하는 것이 아닌 형식적인 변경에 의해서는 해당 함수의 고유값은 변경되지 않는다.The step 23 of generating a function-specific eigenvalue is a step of generating a function-specific eigenvalue whose shape can be identified by performing normalization for a plurality of functions existing in the preprocessed source code. Therefore, the number of eigenvalues for each function is determined according to the number of functions. Here, performing normalization means generating a unique value for each of a plurality of functions in the preprocessed source code using a hash algorithm. Intrinsic values of a function are not changed by a formal change, not by changing the actual meaning of the function, such as inserting a comment or spacing.
전처리된 소스 코드 내의 복수의 함수들 별로 고유값을 생성한 후, 복수의 함수들 중에서 적어도 하나 이상의 변경된 함수가 존재하는지 여부를 판별한다(24). 여기서, 변경된 함수가 존재하는지 여부는, 소정의 저장소에 미리 저장된 이전 소스 코드의 함수별 고유값들과 생성된 변경된 소스 코드의 함수별 고유값들을 일대일로 비교하여 판별할 수 있다.After generating eigenvalues for each of the plurality of functions in the preprocessed source code, it is determined whether at least one or more changed functions exist among the plurality of functions (24). Here, whether or not the changed function exists may be determined by comparing one-to-one unique values of functions of the previous source code previously stored in a predetermined storage with the unique values of each function of the generated changed source code.
판별 결과, 만약 변경된 소스 코드의 함수별 고유값들이 이전 소스 코드의 함수별 고유값들과 모두 동일하면, 기존 코드 커버리지 값을 출력한다(30). As a result of the determination, if the function-specific eigenvalues of the changed source code are all the same as the function-specific eigenvalues of the previous source code, the existing code coverage value is output (30).
한편, 변경된 소스 코드의 함수별 고유값들 중 적어도 하나 이상이 이전 소스 코드의 함수별 고유값들과 일치하지 않으면, 복수의 함수들을 변경된 함수와 변경되지 않은 함수를 분류하고(25), 코드 커버리지를 측정한다(40). 여기서, 코드 커버리지를 측정하는 단계(40)는, 변경되지 않은 함수의 함수 커버리지 값을 상기 소정의 저장소에서 불러와 변경된 소스 코드의 코드 커버리지를 계산한다. On the other hand, if at least one or more of the function-specific eigenvalues of the changed source code does not match the function-specific eigenvalues of the previous source code, a plurality of functions are classified into the changed function and the unchanged function (25), code coverage Measure (40). Here, the step 40 of measuring the code coverage loads the function coverage value of the unchanged function from the given repository and calculates the code coverage of the changed source code.
제3 실시 형태에 따른 코드 커버리지 측정 방법을 종래의 코드 커버리지 측정 방법과 비교하면, 예를 들어, 이전 소스 코드는 100개의 함수를 포함하고, 상기 이전 소스 코드의 코드 커버리지 값은 100(%)이였는데, 상기 이전 소스 코드의 100개의 함수들 중 1개의 함수가 실질적으로 변경된 경우, 종래의 코드 커버리지 측정 방법에 의하면 코드 커버리지 값은 0(%) (왜냐하면, 종래의 코드 커버리지 측정 방법은 소스 코드가 실질적 또는 형식적으로 변경되면 새로운 소스 코드로 인식하기 때문에)이 되지만, 제3 실시 형태에 따른 코드 커버리지 측정 방법에 의하면 코드 커버리지 값은 0이 아닌 99가 출력된다. 따라서, 변경되지 않은 함수의 함수 커버리지는 그대로 유지되기 때문에, 추후에 변경되지 않은 함수를 다시 테스트하지 않아도 되는 이점이 있다.Comparing the code coverage measurement method according to the third embodiment with the conventional code coverage measurement method, for example, the previous source code includes 100 functions, and the code coverage value of the previous source code was 100 (%). When one of the 100 functions of the previous source code is substantially changed, according to the conventional code coverage measurement method, the code coverage value is 0 (%) (because the conventional code coverage measurement method is a Or if it is changed formally, it is recognized as a new source code). However, according to the code coverage measurement method according to the third embodiment, the code coverage value is 99 instead of 0. Therefore, since the function coverage of the unchanged function is maintained, there is an advantage that it is not necessary to retest the unchanged function later.
도 9는 제4 실시 형태에 따른 코드 커버리지 측정 방법을 설명하기 위한 시스템도이다.9 is a system diagram for explaining a code coverage measurement method according to the fourth embodiment.
도 9를 참조하면, 제4 실시 형태에 따른 코드 커버리지 측정 방법이 수행되는 시스템은 복수의 장치들(910, 930)과 서버(950)를 포함할 수 있다.Referring to FIG. 9, the system in which the code coverage measuring method according to the fourth embodiment is performed may include a plurality of devices 910 and 930 and a server 950.
복수의 장치들(910, 930)은 서버(950)로부터 전송되거나 사용자에 의해 직접 업로드된 소스 코드의 코드 커버리지를 측정할 수 있다. The plurality of devices 910, 930 may measure the code coverage of the source code transmitted from the server 950 or directly uploaded by the user.
복수의 장치들(910, 930) 각각은 로그 수집 에이전트를 포함할 수 있다. Each of the plurality of devices 910 and 930 may include a log collection agent.
로그 수집 에이전트는, 복수의 장치들(910, 930) 각각의 코드 커버리지 측정을 제어할 수 있다. 구체적으로, 로그 수집 에이전트는, 복수의 장치들(910, 930) 각각의 코드 커버리지 측정의 시작과 종료를 제어할 수 있으며, 복수의 장치들(910, 930) 각각의 코드 커버리지 측정 수행 현황 정보를 파악할 수 있다. The log collection agent may control code coverage measurement of each of the plurality of devices 910 and 930. In detail, the log collecting agent may control the start and end of code coverage measurement of each of the plurality of devices 910 and 930, and may perform code coverage measurement performance status information of each of the plurality of devices 910 and 930. I can figure it out.
로그 수집 에이전트는 수집된 코드 커버리지 로그를 서버(950)로 전송할 수 있다. 여기서, 로그 수집 에이전트는 수집된 코드 커버리지 로그를 서버(950)의 갱신 요청에 따라 전송할 수도 있고, 서버(950)의 요청없이 미리 설정된 임의의 시점에 수집된 코드 커버리지 로그를 서버(950)로 자동 전송할 수도 있다. 여기서, 임의의 시점은 코드 커버리지 측정이 종료되었을 때일 수도 있고, 서버(950)가 요청한 임의의 시점일 수도 있다. The log collection agent may transmit the collected code coverage log to the server 950. Here, the log collection agent may transmit the collected code coverage log according to the update request of the server 950, and automatically transmit the collected code coverage log to the server 950 at any predetermined time without the request of the server 950. You can also send. Here, the arbitrary time point may be when the code coverage measurement is finished, or may be any time point requested by the server 950.
로그 수집 에이전트는 수집된 코드 커버리지 로그를 서버(950)로 전송하기 전에, 수집된 코드 커버리지 로그에 대해서 정규화를 수행하여 수집된 코드 커버리지 로그의 고유값을 생성할 수 있다. 그리고, 수집된 코드 커버리지 로그를 서버(950)로 전송할 때, 생성된 고유값도 함께 전송할 수 있다. 여기서, 고유값은 수집된 코드 커버리지 로그를 해쉬 알고리즘을 사용하여 생성된 형상 식별이 가능한 문자열일 수 있다.The log collection agent may generate a unique value of the collected code coverage log by performing normalization on the collected code coverage log before transmitting the collected code coverage log to the server 950. In addition, when the collected code coverage log is transmitted to the server 950, the generated unique value may also be transmitted. Here, the eigenvalue may be a character string capable of shape identification generated by using a hash algorithm on the collected code coverage log.
복수의 장치들(910, 930)은 스마트폰, 태블릿 PC, 랩탑, 데스트탑 등일 수 있으며, 유선 또는 무선으로 서버(950)와 데이터 통신을 수행할 수 있다.The plurality of devices 910 and 930 may be smartphones, tablet PCs, laptops, desktops, and the like, and may perform data communication with the server 950 by wire or wirelessly.
서버(950)는 복수의 장치들(910, 930)과 데이터 통신을 수행할 수 있다.The server 950 may perform data communication with the plurality of devices 910 and 930.
서버(950)는 복수의 장치들(910, 930)로부터 코드 커버리지 로그를 수신하고, 수신된 코드 커버리지 로그들을 저장하며, 저장된 코드 커버리지 로그들을 소정의 방법으로 취합하여 코드 커버리지를 측정할 수 있다. The server 950 may receive code coverage logs from the plurality of devices 910 and 930, store the received code coverage logs, and collect the stored code coverage logs by a predetermined method to measure code coverage.
서버(950)는 복수의 장치들(910, 930)로 코드 커버리지 로그를 요청하는 갱신 요청을 할 수 있다.The server 950 may make an update request for requesting a code coverage log to the plurality of devices 910 and 930.
도 10을 참조하여, 서버(950)가 복수의 장치들(910, 930)에서 수집된 코드 커버리지 로그를 취합하여 코드 커버리지를 측정하는 방법을 구체적으로 설명하도록 한다.Referring to FIG. 10, a method in which the server 950 collects code coverage logs collected from the plurality of devices 910 and 930 to measure code coverage will be described in detail.
도 10은 제4 실시 형태에 따른 코드 커버리지를 측정하는 방법을 설명하기 위한 순서도이다.10 is a flowchart for explaining a method for measuring code coverage according to the fourth embodiment.
도 10을 참조하면, 제4 실시 형태에 따른 코드 커버리지 측정 방법은, 서버(950)가 복수의 장치들(910, 930)로부터 코드 커버리지 로그를 수신하는 단계, 서버(950)가 수신된 코드 커버리지 로그들을 저장하는 단계(951) 및 서버(950)가 저장된 코드 커버리지 로그들을 이용하여 코드 커버리지를 측정하는 단계(952)를 포함할 수 있다.Referring to FIG. 10, in the code coverage measurement method according to the fourth embodiment, the server 950 receives a code coverage log from a plurality of devices 910 and 930, and the server 950 receives code coverage. Saving logs 951 and server 950 may include measuring code coverage using stored code coverage logs.
여기서, 서버(950)가 복수의 장치들(910, 930)로부터 코드 커버리지 로그를 수신하기 전에, 서버(950)가 복수의 장치들(910, 930)에게 코드 커버리지 로그를 달라는 갱신 요청을 할 수도 있다. 갱신 요청은 이 요청을 받은 현재의 코드 커버리지 로그를 달라는 요청일 수도 있고, 미래의 임의의 시점(특정 시간 또는 특정 시간대)에 코드 커버리지 로그를 달라는 요청일 수도 있다.Here, before the server 950 receives the code coverage log from the plurality of devices 910 and 930, the server 950 may request an update request for the code coverage log from the plurality of devices 910 and 930. have. The update request may be a request to change the current code coverage log from which the request was received, or may be a request to change the code coverage log at any point in time (at a specific time or at a specific time).
서버(950)가 수신된 코드 커버리지 로그들을 저장하는 단계(951)는, 서버(950)가 복수의 장치들(910, 930)로부터 수신되는 코드 커버리지 로그들을 대기열(queue)에 저장하는 단계일 수 있다.The step 951 in which the server 950 stores the received code coverage logs may be a step in which the server 950 stores the code coverage logs received from the plurality of devices 910 and 930 in a queue. have.
서버(950)가 코드 커버리지를 측정하는 단계(952)는, 대기열에 저장된 코드 커버리지 로그들을 소정의 방법으로 취합하여 측정 대상 소스 코드의 코드 커버리지를 측정하는 단계일 수 있다.The step 952 of the server 950 measuring code coverage may be a step of collecting code coverage logs stored in a queue in a predetermined method to measure code coverage of the source code to be measured.
서버(950)가 수신된 코드 커버리지 로그들을 저장하고(951), 코드 커버리지를 측정하는(952) 구체적인 방법을 두 가지 예를 들어 설명하도록 한다.The server 950 stores the received code coverage logs (951), and describes a specific method for measuring the code coverage (952) with two examples.
첫 번째 예는, 측정 대상인 소스 코드 전체가 복수의 장치들(910, 930)에서 각각 개별적으로 코드 커버리지 테스트가 수행된 후, 서버(950)가 복수의 장치들(910, 930)로부터 코드 커버리지 로그들을 수신한 경우이다. The first example is that the code coverage log from the plurality of devices (910, 930) by the server 950 after the code coverage test is performed on each of the plurality of devices (910, 930) individually for the entire source code to be measured If you receive a
두 번째 예는, 측정 대상인 소스 코드가 복수개로 나눠져 복수의 장치들(910, 930)로 분배되어 복수의 장치들(910, 930)에서 코드 커버리지 테스트가 수행된 후, 서버(950)가 복수의 장치들(910, 930)로부터 코드 커버리지 로그들을 수신한 경우이다.In the second example, the source code to be measured is divided into a plurality of devices and distributed to the plurality of devices 910 and 930 so that the code coverage test is performed on the plurality of devices 910 and 930, and then the server 950 receives the plurality of source codes. This is the case when code coverage logs are received from the devices 910 and 930.
첫 번째 예와 두 번째 예의 근본적인 차이점은, 복수의 장치들(910, 930)에서 테스트된 소스 코드들이 서로 동일한지 아니면 서로 다른 것인지 여부이다. 첫 번째 예는 복수의 장치들(910, 930)에서 테스트된 소스 코드들이 서로 동일한 경우이고, 두 번째 예는 복수의 장치들(910, 930)에서 테스트된 소스 코드들이 서로 다른 경우이다. 먼저, 첫 번째 예에 따른 코드 커버리지 측정 방법을 도 11을 참조하여 이하에서 설명하도록 한다.The fundamental difference between the first example and the second example is whether the source codes tested in the plurality of devices 910, 930 are the same or different. The first example is when the source codes tested in the plurality of devices 910 and 930 are the same, and the second example is when the source codes tested in the plurality of devices 910 and 930 are different. First, the code coverage measurement method according to the first example will be described below with reference to FIG. 11.
도 11은 도 10에 도시된 코드 커버리지 측정 방법의 첫 번째 예를 설명하기 위한 도면이다.FIG. 11 is a diagram for describing a first example of the method for measuring code coverage shown in FIG. 10.
도 11에 도시된 첫 번째 예는, 도 11의 (a)에 도시된 표와 같이, 특정 시점들(9:00, 9:10, 9:20)에서 제1 장치(910)로부터 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)를 수신하고, 제2 장치(930)로부터 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)를 수신한 경우를 예정한 것이다. 도 11의 (a)의 코드 커버리지 로그들 각각은 복수의 부분들을 포함하는데, 도면에서는 복수의 부분들을 박스들로 표현하였고, 체크된 박스는 코드 커버리지 테스트가 수행된 부분이고, 체크되지 않은 박스는 코드 커버리지 테스트가 수행되지 않은 부분이다. 제1 코드 커버리지 로그와 제2 코드 커버리지 로그는 동일한 소스 코드를 대상으로 한 것이기 때문에, 각 로그의 데이터의 길이는 동일한 것으로 가정하였다.The first example shown in FIG. 11 is the first code from the first device 910 at certain times (9:00, 9:10, 9:20), as shown in the table shown in FIG. When the coverage logs log_1-1, log_1-2, log_1-3 are received, and the second code coverage logs log_2-1, log_2-2, log_2-3 are received from the second device 930. It is intended. Each of the code coverage logs of FIG. 11 (a) includes a plurality of parts, in which the plurality of parts are represented by boxes, and the checked box is the part where the code coverage test is performed, and the unchecked box is Code coverage test is not performed. Since the first code coverage log and the second code coverage log are for the same source code, it is assumed that the data length of each log is the same.
도 10에 도시된 서버(950)가 도 11의 (a)에 도시된 표와 같은 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)과 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)를 수신하면, 서버(950)는 대기열에 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)과 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)을 도 11의 (b)에 도시된 바와 같이 저장한다. 구체적으로, 대기열에는 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)과 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)이 서버(950)에 수신된 순서대로 저장된다. 편의상 도면에서는 제1 코드 커버리지 로그가 제2 코드 커버리지 로그보다 먼저 서버(950)에 수신되는 것으로 가정한다.The server 950 illustrated in FIG. 10 may include the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2 as shown in the table of FIG. Upon receiving -1, log_2-2, log_2-3, the server 950 queues the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2. -1, log_2-2, log_2-3) are stored as shown in FIG. Specifically, the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2-1, log_2-2, log_2-3 are stored in the queue in the server 950. Stored in the order received. For convenience, it is assumed that the first code coverage log is received by the server 950 before the second code coverage log.
서버(950)의 대기열에 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)과 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)이 저장되면, 서버(950)는 저장된 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)을 취합하여 측정 대상 소스 코드의 코드 커버리지를 측정한다. When the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2-1, log_2-2, log_2-3 are stored in the queue of the server 950, The server 950 collects the stored code coverage logs log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, and log_2-3 to measure the code coverage of the measurement target source code.
여기서, 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)을 취합하여 측정 대상 소스 코드의 코드 커버리지를 측정하는 하나의 방법은, 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)이 대기열에 저장되는 순서대로 차례대로 누적하여 상기 코드 커버리지를 측정하는 방법이다. 구체적으로, 제일 먼저 수신된 제1 코드 커버리지 로그 1(log_1-1)의 코드 커버리지 값(40%)을 계산하고, 다음으로 제1 코드 커버리지 로그 1(log_1-1)과 제2 코드 커버리지 로그 1(log_2-1)을 누적하여 코드 커버리지 값(60%)을 계산한다. 이러한 방법으로 마지막으로 저장된 제2 코드 커버리지 로그 3(log_2-3)까지 누적하여 코드 커버리지 값(100%)을 계산한다. Here, one method of collecting code coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) to measure the code coverage of the source code to be measured is code The code coverage is measured by accumulating coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) in order of being stored in a queue. Specifically, the code coverage value (40%) of the first code coverage log 1 (log_1-1) received first is calculated, and then the first code coverage log 1 (log_1-1) and the second code coverage log 1 are calculated. Accumulate (log_2-1) to calculate the code coverage value (60%). In this way, the code coverage value (100%) is calculated by accumulating up to the last stored second code coverage log 3 (log_2-3).
그러나, 상기 방법은 코드 커버리지 로그의 데이터 크고 긴 경우에 효율적이지 못하며 계산 시간이 너무 오래 걸린다는 문제가 있다. 따라서, 다음과 같은 방법으로 코드 커버리지 값을 계산하면, 더 효율적이고 신속하게 코드 커버리지 값을 계산할 수 있다.However, this method has a problem that the data of the code coverage log is not efficient when the data is large and long, and the calculation takes too long. Therefore, by calculating the code coverage value in the following way, it is possible to calculate the code coverage value more efficiently and quickly.
코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)을 취합하여 측정 대상 소스 코드의 코드 커버리지를 측정하는 다른 방법은, 대기열에 저장된 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)과 동일한 데이터 크기를 갖는 가상의 코드 커버리지 로그를 만들고, 생성된 가상의 코드 커버리지 로그를 구성하는 복수의 부분들 각각에 대해서 코드 커버리지 테스트 여부를 판별한다. Another method of collecting code coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) to measure code coverage of the source code to be measured is code stored in a queue. Create a virtual code coverage log with the same data size as the coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3), and create the generated virtual code coverage log. It is determined whether the code coverage test is performed for each of the plurality of components.
구체적으로, 생성된 가상의 코드 커버리지 로그를 구성하는 복수의 부분들 각각에 대해서 코드 커버리지 테스트 여부를 판별하는 방법은, 모든 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)에서, 가상의 코드 커버리지 로그의 제1 부분과 대응되는 제1 부분들(1100)을 검색하고, 제1 부분들(1100) 중에서 하나라도 코드 커버리지 테스트된 것(체크된 것)이 존재하면, 가상의 코드 커버리지의 제1 부분은 테스트된 것으로 판별한다. 같은 방법으로 가상의 코드 커버리지의 모든 부분들에 대해서 테스트 여부를 판별하여 코드 커버리지 값을 계산한다. 이러한 방법에 의하면, 도 11의 (b)의 경우, 생성된 가상의 코드 커버리지 로그의 모든 부분들은 체크된 것으로 될 것이므로, 코드 커버리지 값은 100(%)이 될 것이다.Specifically, the method for determining whether the code coverage test for each of the plurality of parts constituting the generated virtual code coverage log, all code coverage logs (log_1-1, log_1-2, log_1-3, log_2- 1, log_2-2, log_2-3, search for the first portions 1100 corresponding to the first portion of the virtual code coverage log, and code coverage tested at least one of the first portions 1100 If (checked) is present, the first portion of the virtual code coverage is determined to be tested. In the same way, the code coverage value is calculated by determining whether or not all parts of the virtual code coverage are tested. According to this method, in the case of FIG. 11B, since all parts of the generated virtual code coverage log will be checked, the code coverage value will be 100 (%).
도 12은 도 10에 도시된 코드 커버리지 측정 방법의 두 번째 예를 설명하기 위한 도면이다.FIG. 12 is a diagram for describing a second example of the method for measuring code coverage shown in FIG. 10.
도 12에 도시된 첫 번째 예는, 도 12의 (a)에 도시된 표와 같이, 특정 시점들(9:00, 9:10, 9:20)에서 제1 장치(910)로부터 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)를 수신하고, 제2 장치(930)로부터 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)를 수신한 경우를 예정한 것이다. 도 12의 (a)의 코드 커버리지 로그들 각각은 복수의 부분들을 포함하는데, 도면에서는 복수의 부분들을 박스들로 표현하였고, 체크된 박스는 코드 커버리지 테스트가 수행된 부분이고, 체크되지 않은 박스는 코드 커버리지 테스트가 수행되지 않은 부분이다. 제1 코드 커버리지 로그와 제2 코드 커버리지 로그는 서로 다른 소스 코드를 대상으로 한 것이기 때문에, 각 로그의 데이터의 길이는 서로 다른 것으로 가정하였다.The first example shown in FIG. 12 is the first code from the first device 910 at certain times (9:00, 9:10, 9:20), as shown in the table shown in FIG. When the coverage logs log_1-1, log_1-2, log_1-3 are received, and the second code coverage logs log_2-1, log_2-2, log_2-3 are received from the second device 930. It is intended. Each of the code coverage logs of FIG. 12A includes a plurality of parts, in which the plurality of parts are represented by boxes, and a checked box is a part where a code coverage test is performed, and an unchecked box is shown in FIG. Code coverage test is not performed. Since the first code coverage log and the second code coverage log target different source codes, it is assumed that the data length of each log is different.
도 10에 도시된 서버(950)가 도 12의 (a)에 도시된 표와 같은 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)과 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)를 수신하면, 서버(950)는 대기열에 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)과 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)을 도 12의 (b)에 도시된 바와 같이 저장한다. 구체적으로, 대기열에는 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)과 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)이 서버(950)에 수신된 순서대로 저장된다. 편의상 제1 코드 커버리지 로그가 제2 코드 커버리지 로그보다 먼저 서버(950)에 수신되는 것으로 가정한다.The server 950 illustrated in FIG. 10 may include first code coverage logs log_1-1, log_1-2, log_1-3 and second code coverage logs log_2 as shown in the table of FIG. Upon receiving -1, log_2-2, log_2-3, the server 950 queues the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2. -1, log_2-2, log_2-3) are stored as shown in FIG. Specifically, the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2-1, log_2-2, log_2-3 are stored in the queue in the server 950. Stored in the order received. For convenience, it is assumed that the first code coverage log is received by the server 950 before the second code coverage log.
서버(950)의 대기열에 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)과 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)이 저장되면, 서버(950)는 저장된 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)을 취합하여 측정 대상 소스 코드의 코드 커버리지를 측정한다.When the first code coverage logs log_1-1, log_1-2, log_1-3 and the second code coverage logs log_2-1, log_2-2, log_2-3 are stored in the queue of the server 950, The server 950 collects the stored code coverage logs log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, and log_2-3 to measure the code coverage of the measurement target source code.
여기서, 도 12에 도시된 두 번째 예는 도 11에 도시된 첫 번째 예와는 달리 제1 코드 커버리지 로그와 제2 코드 커버리지 로그가 서로 다른 소스 코드를 대상으로 한 것이기 때문에 서로 다른 로그이다. 따라서, 도 12에 도시된 두 번째 예는, 대기열에 저장된 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)을 서로 같은 소스 코드를 대상으로 한 것들끼리 분류하는 단계가 코드 커버리지를 측정하기 앞서 수행되어야 한다.Here, unlike the first example illustrated in FIG. 11, the second example illustrated in FIG. 12 is a different log because the first code coverage log and the second code coverage log target different source codes. Accordingly, the second example shown in FIG. 12 uses the same source code as the code coverage logs stored in the queue (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3). The step of classifying the targets should be performed before measuring the code coverage.
여기서, 대기열에 저장된 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)을 서로 같은 소스 코드를 대상으로 한 것들끼리 분류하는 방법은, 고유값을 기준으로 분류할 수 있다. 도 10에 도시된 복수의 장치들(910, 930)은 서버(950)로 코드 커버리지 로그를 전송할 때, 코드 커버리지 로그와 함께 해당 코드 커버리지 로그의 고유값을 함께 전송할 수 있다. 상기 해당 코드 커버리지 로그의 고유값은 해쉬 알고리즘을 이용하여 생성될 수 있다. 상기 해당 코드 커버리지 로그의 고유값은 해당 코드 커버리지 로그 내의 복수의 부분들 각각이 테스트되었는지 여부와 상관없는 변하지 않는 고유의 값이다. 따라서, 서버(950)는 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)과 그들 각각의 고유값을 이용하여 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)을 서로 같은 소스 코드를 대상으로 한 것들끼리 분류할 수 있다. 이러한 방법으로 대기열에 저장된 모든 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)을 분류하면, 제1 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3)은 서로 같은 고유값을 갖고, 제2 코드 커버리지 로그들(log_2-1, log_2-2, log_2-3)도 서로 같은 고유값을 갖기 때문에, 서로 분류될 수 있다.Here, the method of classifying the code coverage logs stored in the queue (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) with the same source code, You can sort by eigenvalues. When the plurality of devices 910 and 930 illustrated in FIG. 10 transmit the code coverage log to the server 950, the plurality of devices 910 and 930 may transmit a unique value of the corresponding code coverage log together with the code coverage log. The unique value of the corresponding code coverage log may be generated using a hash algorithm. The unique value of the corresponding code coverage log is a unique value that does not change regardless of whether each of the plurality of portions in the corresponding code coverage log has been tested. Thus, the server 950 uses the code coverage logs (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) and their respective intrinsic values to determine the code coverage logs ( log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) can be classified among the targets of the same source code. In this way, if all the code coverage logs stored in the queue (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) are classified, the first code coverage logs (log_1-1) , log_1-2, log_1-3) have the same eigenvalues, and since the second code coverage logs log_2-1, log_2-2, log_2-3 also have the same eigenvalues, they may be classified. .
이렇게 대기열에 저장된 모든 코드 커버리지 로그들(log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3)은 고유값에 따라 분류된 후, 앞서 도 11에서 설명한 두 가지 방법으로 측정 대상 소스 코드의 코드 커버리지 값이 계산될 수 있다.After all the code coverage logs stored in the queue (log_1-1, log_1-2, log_1-3, log_2-1, log_2-2, log_2-3) are classified according to their eigenvalues, In this way, the code coverage value of the source code to be measured may be calculated.
이상 설명된 실시 형태는 다양한 컴퓨터 구성요소를 통하여 실행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터로 판독가능한 기록매체에 기록될 수 있다. 상기 컴퓨터로 판독가능한 기록매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. The above-described embodiments may be implemented in the form of program instructions that can be executed by various computer components, and recorded on a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
상기 컴퓨터로 판독가능한 기록매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다.Program instructions recorded on the computer-readable recording medium may be those specially designed and configured for the present invention, or may be known and available to those skilled in the computer software arts.
컴퓨터로 판독가능한 기록매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 실행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 실행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device may be configured to operate as one or more software modules to carry out the process according to the invention, and vice versa.
이상 첨부된 도면을 참조하여 본 발명의 실시 형태를 설명하였으나 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 실시 형태의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 예를 들어, 실시 형태에 구체적으로 나타난 각 구성 요소는 변형하여 실시할 수 있는 것이다. 그리고 이러한 변형과 응용에 관계된 차이점들은 첨부된 청구범위에서 규정하는 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다.The embodiments of the present invention have been described above with reference to the accompanying drawings, which are merely exemplary and are not intended to limit the present invention, and those skilled in the art do not depart from the essential characteristics of the present embodiment. It will be appreciated that various modifications and applications which are not illustrated above in the scope are possible. For example, each component specifically shown in embodiment can be modified and implemented. And differences relating to such modifications and applications will have to be construed as being included in the scope of the invention defined in the appended claims.

Claims (10)

  1. 소스 코드의 코드 커버리지를 측정하는 방법에 있어서,In the method of measuring the code coverage of the source code,
    상기 소스 코드에 탐침을 삽입하는 단계;Inserting a probe into the source code;
    상기 탐침이 삽입된 소스 코드를 컴파일하여 실행 파일을 생성하는 단계; 및Compiling the source code into which the probe is inserted to generate an executable file; And
    상기 생성된 실행 파일을 이용하여 상기 코드 커버리지를 측정하는 단계;를 포함하고,Measuring the code coverage using the generated executable file;
    상기 소스 코드에 탐침을 삽입하는 단계는,Inserting a probe into the source code,
    상기 소스 코드로부터 추상 구문 트리를 생성하는 단계;Generating an abstract syntax tree from the source code;
    상기 추상 구문 트리를 해석하여 제어 흐름 그래프를 생성하는 단계; 및Interpreting the abstract syntax tree to generate a control flow graph; And
    상기 추상 구문 트리와 상기 제어 흐름 그래프를 이용하여 상기 소스 코드에 상기 탐침을 삽입하는 단계;를 포함하는, 코드 커버리지 측정 방법.And inserting the probe into the source code using the abstract syntax tree and the control flow graph.
  2. 제 1 항에 있어서,The method of claim 1,
    상기 추상 구문 트리와 상기 제어 흐름 그래프를 이용하여 상기 소스 코드에 상기 탐침을 삽입하는 단계는,Inserting the probe into the source code using the abstract syntax tree and the control flow graph,
    상기 제어 흐름 그래프에서 기저 경로들을 검색한 후, 각 기저 경로당 하나의 제1 탐침을 삽입하는 단계; 및Retrieving base paths from the control flow graph and inserting one first probe for each base path; And
    상기 추상 구문 트리 내의 분기문의 조건의 개수를 판별하여 제2 탐침을 삽입하는 단계;Determining a number of conditions of a branch statement in the abstract syntax tree and inserting a second probe;
    를 포함하는, 코드 커버리지 측정 방법.Including, the code coverage measurement method.
  3. 제 2 항에 있어서,The method of claim 2,
    상기 추상 구문 트리 내의 분기문의 조건의 개수를 판별하여 제2 탐침을 삽입하는 단계는,Determining the number of conditions of the branch statement in the abstract syntax tree and inserting a second probe,
    상기 조건의 개수가 2개 이상인 분기문에 존재하는 논리 연산자를 삼항 연산자로 대체하고, 상기 제2 탐침을 삽입하는, 코드 커버리지 측정 방법.And replacing the logical operator existing in the branch statement having two or more conditions with a ternary operator and inserting the second probe.
  4. 제 1 항에 있어서,The method of claim 1,
    상기 소스 코드에 탐침을 삽입하는 단계 이전에,Before inserting the probe into the source code,
    상기 소스 코드가 기존에 컴파일을 수행하였던 것인지 여부를 판별하는 단계를 더 포함하고,Determining whether the source code has been previously compiled;
    상기 소스 코드가 기존에 컴파일을 수행하였던 것이면, 기존 실행 파일을 재사용하여 코드 커버리지를 측정하기 위한 준비 과정을 생략하는If the source code has been previously compiled, skipping the preparation process for measuring the code coverage by reusing the existing executable file
    , 코드 커버리지 측정 방법., How to measure code coverage.
  5. 제 4 항에 있어서,The method of claim 4, wherein
    상기 소스 코드가 기존에 컴파일을 수행하였던 것인지 여부를 판별하는 단계는, Determining whether or not the source code has been previously compiled,
    상기 소스 코드를 전처리하여 전처리된 소스 코드를 생성하는 단계;Preprocessing the source code to generate preprocessed source code;
    상기 전처리된 소스 코드의 노이즈를 제거하는 단계;Removing noise of the preprocessed source code;
    상기 노이즈가 제거된 전처리된 소스 코드의 고유값을 생성하는 단계;Generating an eigenvalue of the preprocessed source code from which the noise is removed;
    상기 생성된 고유값이 미리 저장된 이전 고유값과 동일한지 여부를 판별하는 단계;Determining whether the generated eigenvalue is equal to a previously stored eigenvalue;
    상기 생성된 고유값이 상기 이전 고유값과 동일하면, 상기 기존 실행 파일을 이용하여 상기 코드 커버리지를 측정하고,If the generated eigenvalue is the same as the previous eigenvalue, measure the code coverage using the existing executable file,
    상기 생성된 고유값이 상기 이전 고유값과 다르면, 상기 소스 코드에 상기 탐침을 삽입하는, 코드 커버리지 측정 방법.And inserting the probe into the source code if the generated eigenvalue is different from the previous eigenvalue.
  6. 소스 코드의 코드 커버리지를 측정하는 방법에 있어서,In the method of measuring the code coverage of the source code,
    상기 소스 코드가 실질적으로 변경되었는지 여부를 판별하는 단계;Determining whether the source code has been substantially changed;
    상기 소스 코드가 실질적으로 변경되었으면, 변경된 소스 코드의 코드 커버리지를 측정하는 단계; 및If the source code has substantially changed, measuring code coverage of the changed source code; And
    상기 소스 코트가 실질적으로 변경되지 않았으면, 기존 코드 커버리지 값을 출력하는 단계;If the source coat has not changed substantially, outputting an existing code coverage value;
    를 포함하는, 코드 커버리지 측정 방법.Including, the code coverage measurement method.
  7. 제 6 항에 있어서,The method of claim 6,
    상기 소스 코드가 실질적으로 변경되었는지 여부를 판별하는 단계는,Determining whether the source code has been substantially changed,
    상기 소스 코드를 전처리하여 전처리된 소스 코드를 생성하는 단계;Preprocessing the source code to generate preprocessed source code;
    상기 전처리된 소스 코드 내의 함수별 고유값들을 생성하는 단계;Generating unique values for each function in the preprocessed source code;
    상기 생성된 함수별 고유값들을 미리 저장된 기존 함수별 고유값들과 비교하여 적어도 하나 이상의 변경된 함수가 존재하는지 여부를 판별하는 단계; 및Comparing the generated unique values for each function with previously stored unique values for each function to determine whether at least one changed function exists; And
    상기 생성된 함수별 고유값들 중 적어도 하나 이상이 변경되었으면, 변경된 함수와 변경되지 않은 함수를 분류하는 단계;를 포함하고,And classifying the changed function and the unchanged function if at least one or more of the generated function-specific eigenvalues have changed.
    상기 소스 코드가 실질적으로 변경되었으면, 변경된 소스 코드의 코드 커버리지를 측정하는 단계는, 상기 변경되지 않은 함수의 함수 커버리지 값을 불러와 상기 변경된 소스 코드의 코드 커버리지를 계산하는, 코드 커버리지 측정 방법.And if the source code has substantially changed, measuring code coverage of the changed source code retrieves the function coverage value of the unchanged function to calculate code coverage of the changed source code.
  8. 서버가 복수의 장치들에서 수집된 코드 커버리지 로그들을 수신하여 코드 커버리지를 측정하는 방법에 있어서,A method of measuring code coverage by a server receiving code coverage logs collected from a plurality of devices, the method comprising:
    상기 복수의 장치들로부터 수신되는 코드 커버리지 로그들을 수신되는 시간 순서대로 대기열에 저장하는 단계; 및Storing code coverage logs received from the plurality of devices in a queue in the order in which they are received; And
    상기 대기열에 저장된 코드 커버리지 로그들을 이용하여 상기 코드 커버리지를 측정하는 단계;Measuring the code coverage using code coverage logs stored in the queue;
    를 포함하는, 코드 커버리지 측정 방법.Including, the code coverage measurement method.
  9. 제 8 항에 있어서,The method of claim 8,
    상기 코드 커버리지를 계산하는 단계 이전에,Prior to calculating the code coverage,
    상기 대기열에 저장된 코드 커버리지 로그들을 서로 같은 소스 코드를 대상으로 한 것들끼리 분류하는 단계를 더 포함하는, 코드 커버리지 측정 방법.And classifying the code coverage logs stored in the queue among targets of the same source code.
  10. 제 1 항 내지 제 9 항 중 어느 하나의 항에 따른 코드 커버리지 측정 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체.A computer-readable recording medium having recorded thereon a program for executing the method for measuring code coverage according to any one of claims 1 to 9.
PCT/KR2015/007395 2014-08-18 2015-07-16 Method for measuring code coverage and computer-readable recording medium having program for executing same recorded thereon WO2016027992A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020140107037A KR101667262B1 (en) 2014-08-18 2014-08-18 Method for measuring code coverage and computer readable recording medium having program the same
KR10-2014-0107037 2014-08-18

Publications (1)

Publication Number Publication Date
WO2016027992A1 true WO2016027992A1 (en) 2016-02-25

Family

ID=55350904

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2015/007395 WO2016027992A1 (en) 2014-08-18 2015-07-16 Method for measuring code coverage and computer-readable recording medium having program for executing same recorded thereon

Country Status (2)

Country Link
KR (1) KR101667262B1 (en)
WO (1) WO2016027992A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293865A (en) * 2016-08-09 2017-01-04 中国银行股份有限公司 The Compilation Method of computer source code and device, authentication method, Apparatus and system
CN111240772A (en) * 2020-01-22 2020-06-05 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and storage medium
CN114253862A (en) * 2021-12-29 2022-03-29 湖南泛联新安信息科技有限公司 Asynchronous event-driven automatic analysis method for HDL (hardware description language) code simulation coverage rate

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102016472B1 (en) * 2017-02-28 2019-09-02 슈어소프트테크주식회사 Method and apparatus for measuring code coverage and computer readable recording medium having program the same
KR101970717B1 (en) * 2017-05-18 2019-04-22 뱅크웨어글로벌 주식회사 Management method for java methods based on bytecode, development system and method for java software using the same
KR102114548B1 (en) * 2018-05-09 2020-05-25 한국과학기술원 Testing method and apparatus of target program using mutated program
KR102165037B1 (en) * 2018-12-03 2020-10-13 슈어소프트테크주식회사 Code coverage measuring apparatus, code coverage measuring method of the code coverage mearusing apparatus, and code coverage measuring system
CN114327491B (en) * 2022-03-07 2022-06-21 深圳开源互联网安全技术有限公司 Source code instrumentation method, apparatus, computer device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040051364A (en) * 2002-12-12 2004-06-18 한국전자통신연구원 Method for measuring path code coverage
KR20060045568A (en) * 2004-04-07 2006-05-17 마이크로소프트 코포레이션 Method and system for probe optimization while instrumenting a program
KR20070087400A (en) * 2006-02-23 2007-08-28 삼성전자주식회사 Method and system for test coverage analysis of operating system software
US20090287729A1 (en) * 2008-05-16 2009-11-19 Microsoft Corporation Source code coverage testing
KR20130052283A (en) * 2011-11-11 2013-05-22 포항공과대학교 산학협력단 Method for creating a feature model from legacy system source code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8495581B2 (en) * 2011-05-05 2013-07-23 International Business Machines Corporation Code evaluation based on failure prediction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040051364A (en) * 2002-12-12 2004-06-18 한국전자통신연구원 Method for measuring path code coverage
KR20060045568A (en) * 2004-04-07 2006-05-17 마이크로소프트 코포레이션 Method and system for probe optimization while instrumenting a program
KR20070087400A (en) * 2006-02-23 2007-08-28 삼성전자주식회사 Method and system for test coverage analysis of operating system software
US20090287729A1 (en) * 2008-05-16 2009-11-19 Microsoft Corporation Source code coverage testing
KR20130052283A (en) * 2011-11-11 2013-05-22 포항공과대학교 산학협력단 Method for creating a feature model from legacy system source code

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293865A (en) * 2016-08-09 2017-01-04 中国银行股份有限公司 The Compilation Method of computer source code and device, authentication method, Apparatus and system
CN111240772A (en) * 2020-01-22 2020-06-05 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and storage medium
CN114253862A (en) * 2021-12-29 2022-03-29 湖南泛联新安信息科技有限公司 Asynchronous event-driven automatic analysis method for HDL (hardware description language) code simulation coverage rate

Also Published As

Publication number Publication date
KR101667262B1 (en) 2016-10-19
KR20160021585A (en) 2016-02-26

Similar Documents

Publication Publication Date Title
WO2016027992A1 (en) Method for measuring code coverage and computer-readable recording medium having program for executing same recorded thereon
WO2014035043A1 (en) Apparatus and method for diagnosing malicious applications
Svajlenko et al. Evaluating clone detection tools with bigclonebench
WO2020233077A1 (en) System service monitoring method, device, and apparatus, and storage medium
WO2020015067A1 (en) Data acquisition method, device, equipment and storage medium
WO2016047866A1 (en) Method and device for database migration
WO2020253112A1 (en) Test strategy acquisition method, device, terminal, and readable storage medium
WO2019054613A1 (en) Method and system for identifying open source software package on basis of binary file
WO2010123168A1 (en) Database management method and system
WO2016111525A1 (en) Source code transfer control method, computer program therefor, and recording medium therefor
JP2010067188A (en) Information processor for supporting programming, information processing system, and programming support method and program
WO2019066222A1 (en) Method and system for identifying open source software package on basis of binary file
WO2022108318A1 (en) Apparatus and method for analyzing smart contract code vulnerabilities
WO2018016671A2 (en) Dangerous code detection system for checking security vulnerability and method thereof
WO2022181958A1 (en) Cloud migration data analysis method using system process information, and system therefor
WO2020050455A1 (en) Device for automatically identifying anti-analysis techniques by using signature extraction, and method therefor
WO2013125866A1 (en) Computer system and signature verification server
WO2016064024A1 (en) Abnormal connection detection device and method
WO2018236141A1 (en) Crash report grouping method, server and computer program
WO2018236120A1 (en) Method and device for identifying quasispecies by using negative marker
WO2018194196A1 (en) Method and system for detecting application of obfuscation to and evaluating security of elf file
WO2024090932A1 (en) Data loading profiling apparatus and method for automatically processing collected data
WO2013125867A1 (en) Computer system and system for compound rule creation on basis of file and behavior
US10891216B2 (en) Parallel data flow analysis processing to stage automated vulnerability research
WO2016137035A1 (en) Test case generation device and method, and computer-readable recording medium for recording program for executing same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15833311

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15833311

Country of ref document: EP

Kind code of ref document: A1