WO2016174743A1 - ソースコード等価性検証装置、および、ソースコード等価性検証方法 - Google Patents

ソースコード等価性検証装置、および、ソースコード等価性検証方法 Download PDF

Info

Publication number
WO2016174743A1
WO2016174743A1 PCT/JP2015/062852 JP2015062852W WO2016174743A1 WO 2016174743 A1 WO2016174743 A1 WO 2016174743A1 JP 2015062852 W JP2015062852 W JP 2015062852W WO 2016174743 A1 WO2016174743 A1 WO 2016174743A1
Authority
WO
WIPO (PCT)
Prior art keywords
source code
verification
equivalence
change
equivalence verification
Prior art date
Application number
PCT/JP2015/062852
Other languages
English (en)
French (fr)
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 株式会社日立製作所
Priority to PCT/JP2015/062852 priority Critical patent/WO2016174743A1/ja
Priority to JP2017515328A priority patent/JP6419953B2/ja
Priority to CN201580078612.5A priority patent/CN107533464A/zh
Priority to US15/561,207 priority patent/US20180181485A1/en
Publication of WO2016174743A1 publication Critical patent/WO2016174743A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/52Binary to binary

Definitions

  • the present invention verifies that the behavior between the source codes is equivalent when the source code is changed, and assists the developer to correct the behavior so as to be equivalent if the behavior is not equivalent, and , Concerning the verification method.
  • Patent Document 1 There is a technique described in Patent Document 1 as a method for verifying equivalence of source codes.
  • Japanese Patent Application Laid-Open No. 2004-228561 discloses a method of performing a test on a portion where a difference is caused by source code comparison and comparing the result.
  • Non-Patent Document 1 discloses a method for verifying that a behavior is retained using symbol execution.
  • Refactoring and language replacement are methods for improving software maintainability.
  • Refactoring is a general term for techniques for improving the design quality of software by changing the internal structure without changing the behavior of the software.
  • Language replacement is to re-create the same function as software developed using a programming language with low maintainability using another programming language with high maintainability.
  • This refactoring and language replacement technique is a promising technique for ensuring the maintainability of software that is becoming increasingly complex and large-scale.
  • the behavior of the target source code is changed when the software source code is changed or recreated, there is a possibility that a new defect may be mixed. Therefore, there is a possibility that the software developer fears that a defect will be mixed in software that has been operating correctly due to refactoring or language replacement, and may decide not to do so.
  • a method for verifying that there is no change in the behavior of the source code before and after the change of the source code is required.
  • both source codes are “equivalent” that the external behavior of the two source codes is the same, that is, the same output is obtained at runtime for any same input. It is defined as Further, verifying whether the source code before the change and the source code after the change are equivalent is referred to as “equivalence verification”.
  • Conditions required for the method for verifying that the source code before the change and the source code after the change are equivalent include the following conditions.
  • (1) One condition is that most of the work is automated, and there are few manual work. Traditionally, source code equivalence has been verified by manual review and testing. By realizing automatic verification using a tool, verification man-hours are reduced, and refactoring and the like are promoted.
  • (2) Another condition is to provide the developer with information that is the basis, information about the location to be corrected, and information regarding the correction method when it is determined that they are not equivalent by the equivalence verification method. By providing the developer with easy-to-understand information on points to be corrected and further providing information on the correction method, correction by the developer is facilitated, leading to a reduction in development period and man-hours.
  • Patent Document 1 requires a test and cannot satisfy the condition (1).
  • the method according to Non-Patent Document 1 generates a logical expression for verifying equivalence and verifies it using a solver, but does not provide information on a portion to be corrected or a correction method.
  • the condition (2) cannot be satisfied.
  • an object of the present invention is to provide a technique for presenting information on corrections in source code.
  • the disclosed source code equivalence verifying device uses the symbol execution calculation unit that executes symbol execution on the source code before change and the source code after change, and the symbol execution result of the symbol execution calculation unit, respectively.
  • an equivalence verification formula generator that generates an equivalence verification formula with the source code
  • an equivalence verification formula verifier that verifies the equivalence verification formula generated by the equivalence verification formula generator
  • an equivalence verification formula verifier Generation of a correction candidate that generates a correction candidate that makes the source code before the change and the source code after the change equivalent when the source code before the change and the source code after the change are not equivalent in the verification result of the equivalence verification expression
  • a verification result generation unit that generates a verification result report using the verification result by the equivalence verification formula verification unit and the correction candidate by the correction candidate generation unit.
  • the developer can confirm on the source code the part to be modified to make the source code before the change and the source code after the change equivalent.
  • 2 is a hardware configuration of the source code equivalence verification apparatus according to the first embodiment.
  • 3 is a software configuration of the source code equivalence verification apparatus according to the first embodiment. It is a function structure of a source code equivalence verification apparatus. It is a structure and data flow of the control part and memory
  • Symbol execution refers to execution using symbols instead of executing source code while substituting specific values for variables (input variables, global variables, etc.) used in source code when verifying source code
  • a combination of a variable state (hereinafter also referred to as a variable state) in a source code execution process and a conditional expression (hereinafter also referred to as a path constraint) for passing through the path in the source code (hereinafter referred to as a snapshot). This is a technique for obtaining the input / output relationship of the source code using the above.
  • FIG. 1 is an example of source code before change used for source code equivalence verification.
  • symbol execution is performed using the information processing apparatus for the source code C100 described in the C language in FIG. 1 as an example.
  • FIG. 2 is an example of a structure graph obtained as a result of analyzing the source code.
  • the information processing apparatus first generates a structure graph N100 shown in FIG. 2 by performing lexical analysis and syntax analysis similar to compilation on the source code C100.
  • the structure graph N100 is obtained by removing the information that is not related to the meaning of the language and extracting only the information that is related to the meaning (abstracted) from the syntax tree.
  • a control flow is shown.
  • a solid line arrow indicates an unconditional control flow, and a broken line arrow indicates a conditional control flow.
  • each control flow starting from the node N1 corresponding to the function entry point and ending at the node N5 corresponding to the return statement that is the exit of the function is illustrated.
  • a plurality of conditional control flows are output from the node N2 corresponding to the if statement, which indicates that different control flows are passed depending on whether or not the condition of the if statement is satisfied.
  • the information processing apparatus gives position information on the source code C100 corresponding to each node.
  • the information processing apparatus assigns a line number in the source code C100 as position information. For example, it can be seen that position information L4 is assigned to the node N2, and the corresponding if sentence is described in the fourth line of the source code C100.
  • FIG. 3 is an example of an execution tree resulting from symbol execution of the source code.
  • the information processing apparatus generates an execution tree S100 shown in FIG. 3 based on the structure graph N100.
  • Each node of the execution tree S100 is represented by a combination of the path constraint (upper column) and the variable state (middle column) described above, and further, position information (lower column) indicating the position via the source code is displayed.
  • a root node (root node) S101 of the execution tree S100 corresponds to an initial state of execution of the source code.
  • the information processing apparatus adds new nodes to the execution tree S100 each time the variable state is updated as the source code is executed.
  • the information processing apparatus When generating the execution tree S100, the information processing apparatus assigns a symbol variable corresponding to the value of the variable that becomes the input variable of the function foo.
  • the value of a variable serving as an input variable is a value of a variable that is given from outside the function and affects the operation of the function, and includes a function variable and a global variable that is accessed within the function.
  • a function argument a and a global variable g are input variables.
  • the information processing apparatus assigns “ ⁇ ” and “ ⁇ ” to the variables a and g as symbolic variables.
  • the information processing apparatus generates a root node S101 in the execution tree S100 based on the node N1 of the structure graph N100.
  • the information processing apparatus sets “no condition” indicating “no constraint” in the path constraint (upper column) S101a of the root node S101, and inputs variable a and g in the variable state (middle column) S101b.
  • the position information L2 acquired from the node N1 is set in the position information (lower column) S101c.
  • the information processing apparatus executes processing based on the next node N2 on the control flow of the node N1 in the structure graph N100.
  • the node N2 is a conditional branch node having two conditional control flows N21 and N22, a child node S102 corresponding to the conditional control flow N21, and a child node S105 corresponding to the conditional control flow N22.
  • variable state (middle column) in the node S102 is set to be the same as the variable state S101b of the parent node because the variable state is not changed by the if statement.
  • position information (lower column) is “L2, 4” by adding the position information (L4) of the node N2 to the position information S101c of the parent node S101, and the second and fourth lines of the source code. Means you have been through.
  • variable state (middle column) in the node S105 is set to be the same as the variable state S101b of the parent node because the variable state is not changed by the if statement. Further, the position information (lower column) is “L2, 4” by adding the position information (L4) of the node N2 in addition to the position information S101c of the parent node.
  • the information processing apparatus executes processing based on N3 which is the next node on the control flow N21 of the node N2.
  • the information processing apparatus generates a child node S103 of S102 as a node in the execution tree S100 corresponding to the node N3.
  • the information processing apparatus executes processing based on N5 which is the next node on the control flow of N3.
  • the information processing apparatus executes processing based on N4 which is the next node on the control flow N22 of N2.
  • the node N4 is a conditional branch node having two conditional control flows N41 and N42, and the information processing apparatus displays a child node S106 corresponding to the conditional control flow N41 and a child node S110 corresponding to the conditional control flow N42. , Respectively, under the node S105.
  • the information processing apparatus repeats the above operation for all branches until generation of all branches is completed.
  • the information processing apparatus finally obtains an execution tree S100 as shown in FIG. 3 from the structure graph N100 shown in FIG. 2 by the above operation.
  • child nodes corresponding to conditional branches are generated in the execution tree so that all possible control flows are covered.
  • a leaf node in an execution tree is to obtain a set of a set of a condition (path constraint) for an input value of a source code and a state (variable state) of an output variable.
  • the leaf node of the execution tree at the time when the symbol execution is completed is referred to as “snapshot”, and the set of snapshots is referred to as “symbol execution summary”.
  • symbol execution summary the set of snapshots.
  • the leaf nodes in the execution tree S100 are the three nodes S104, S109, and S113, which are snapshots, and these sets are the symbol execution summary S120. However, the variable states of variables r and a which are local variables are excluded.
  • the symbol execution is described using the source code written in the C language.
  • the present invention is not limited to the C language, and can be similarly applied to the source code written using another programming language. .
  • FIG. 4 shows the hardware configuration of the source code equivalence verification apparatus 1000 of this embodiment.
  • the source code equivalence verification apparatus is realized by, for example, a personal computer which is a general information processing apparatus as shown in FIG.
  • the source code equivalence verification device 1000 includes a central processing unit (CPU) 101, a main storage device 102, a network I / F 103, a graphic I / F 104, an input / output I / F 105, and an auxiliary storage device I / F 106 connected by a bus. It has become a form.
  • the CPU 101 controls each part of the source code equivalence verification apparatus 1000, loads the source code equivalence verification program 200 to the main storage device 102, and executes it.
  • the main storage device 102 is usually composed of a volatile memory such as a RAM, and a program executed by the CPU 101 and data to be referenced are loaded from an auxiliary storage device or the like and stored.
  • the network I / F 103 is an interface for connecting to the external network 150.
  • the graphic I / F 104 is an interface for connecting a display device 120 such as a Liquid Crystal Display (LCD).
  • a display device 120 such as a Liquid Crystal Display (LCD).
  • the input / output I / F 105 is an interface for connecting an input / output device.
  • a keyboard 131 and a mouse 132 as a pointing device are connected.
  • the auxiliary storage device I / F 106 is an interface for connecting an auxiliary storage device such as an HDD (Hard Disk Drive) 141 or a DVD (Digital Versatile Disk) drive device 142.
  • an auxiliary storage device such as an HDD (Hard Disk Drive) 141 or a DVD (Digital Versatile Disk) drive device 142.
  • the HDD 141 has a large storage capacity, and stores a source code equivalence verification program 200 for executing the processing of this embodiment.
  • the DVD drive device 142 is a device that writes data to or reads data from an optical disk such as a DVD or a CD.
  • the source code equivalence verification program 200 is provided by, for example, a CD-ROM. Can be installed.
  • the test data generation apparatus 1000 installs the source code equivalence verification program 200 in the personal computer as described above and executes each function.
  • FIG. 5 shows the software configuration of the source code equivalence verification apparatus of this embodiment.
  • a source code equivalence verification program 200 executed by the source code equivalence verification apparatus 1000 includes a source code reading module 2001, a structure graph generation module 2002, a symbol execution calculation module 2003, an equivalence verification expression generation module 2004, and an equivalence verification expression verification.
  • a module 2005, a correction candidate generation module 2006, and a verification result display module 2007 are included.
  • the program equivalence verification program 200 is application software that runs on the operating system (OS), and includes the OS and library program as the software configuration of the source code equivalence verification device, but is omitted in FIG. ing.
  • OS operating system
  • the source code reading module 2001 is a module that reads the source code before change and the source code after change from the HDD or another computer and stores them in the storage unit.
  • the structure graph generation module 2002 is a module that generates a structure graph (for example, N100 described above) by performing lexical analysis / syntactic analysis of a source code (for example, C100 described above) and extracting a control flow.
  • the symbol execution calculation module 2003 performs symbol execution based on the structure graph generated by the structure graph generation module 2002 to calculate an execution tree (for example, S100 described above) and collects the leaf nodes of the symbol execution summary (for example, This module generates S120) described above.
  • the equivalence determination formula generation module 2004 generates, for each combination of snapshots included in the symbol execution summary, the symbol execution summary of the source code before change and the symbol execution summary of the source code after change generated by the symbol execution calculation module 2003. Is a module that generates a path constraint conjunction expression, a path constraint equivalence determination expression, and a path equivalence verification expression for determining the equivalence of.
  • the equivalence verification formula verification module 2005 uses the path constraint conjunction formula, the path constraint equivalence judgment formula, and the path equivalence verification formula generated by the equivalence judgment formula generation module 2004 as a SAT (SATisfiability) solver or SMT (Satfiability Modulo Theories). This module solves a satisfiability problem using a solver.
  • SAT SATisfiability
  • SMT Statfiability Modulo Theories
  • the correction candidate generation module 2006 uses the verification result output from the equivalence verification formula verification module 2005 to determine which combination of the symbol execution summary of the source code before the change and the snapshot included in the symbol execution summary of the source code after the change. This module analyzes whether non-equivalence has occurred and derives correction candidates for logical equivalence in the case of non-equivalence.
  • the verification result generation module 2007 generates a verification result report using the verification results output from the equivalence verification formula verification module 2005, the correction candidates output from the correction candidate generation module 2006, symbol execution summary, and source code information. A module that displays or notifies.
  • FIG. 6 shows a functional configuration of the source code equivalence verification apparatus 1000.
  • the control unit 110 is realized by the CPU 101 and the main storage device 102 in FIG. 4, and the storage unit 140 is mainly realized by the HDD 141 in FIG. 4, but may include the main storage device 102.
  • the input device 130 includes the input / output I / F 105, the keyboard 131, the mouse 132, and the like of FIG. 4, and may further include a configuration for reading from the DVD drive device 142 via the auxiliary storage device I / F 106.
  • the output device 121 includes a graphic I / F 104, a display device 120, and the like, and may further include a configuration for writing to the DVD drive device 142 via the auxiliary storage device I / F 106.
  • the communication unit 103 represents the network I / F 103 in FIG. 4 and is connected to, for example, an external computer 160 via the network 150. Details of the control unit 110 and the storage unit 140 of FIG. 6 will be described with reference to FIG
  • FIG. 7 shows the configuration and data flow of the control unit 110 and the storage unit 140 of the source code equivalence verification apparatus 1000.
  • the source code input unit 111 reads the pre-change source code 301 and the post-change source code 302 to be verified, and stores them in the pre-change / post-change source code storage area 201.
  • the example in which the source code 301 before change and the source code 302 after change are described in C language has been described, but the structure graph generation unit 112 and symbol execution calculation corresponding to other programming languages are also described.
  • the unit 113 it is also possible to use source code written in another programming language. Different programming languages may be used for the source code 301 before change and the source code 302 after change.
  • the structure graph generation unit 112 performs source code analysis on the pre-change source code and the post-change source code stored in the pre-change / post-source code storage area 201, and the pre-change structure which is the analysis result
  • the graph and the post-change structure graph are stored in the pre-change / post-change structure graph storage area 202.
  • the symbol execution calculation unit 113 executes symbol calculation for each of the before / after structure graphs stored in the before / after structure graph storage area 202, and shows the calculation result (symbol execution result).
  • the symbol execution summary is stored in the before / after symbol execution result storage area 203.
  • the equivalence verification expression generation unit 114 stores the symbol execution summary of the source code before change and the symbol of the source code after change, which are stored in the pre-change / post-symbol execution result storage area 203, and are the pre-change / post-sign execution results. From the execution summary, for each combination of snapshots included in the symbol execution summary, a path constraint conjunction expression, a path constraint equivalence judgment expression, and a path equivalence verification expression for determining the equivalence of both are generated, and the equivalence Store in the verification expression storage area 204.
  • the equivalence verification formula verification unit 115 executes verification of the path constraint conjunction formula, the path constraint equivalence determination formula, and the path equivalence verification formula stored in the equivalence verification formula storage area 204, and the verification results thereof. Is stored in the equivalence verification formula result storage area 205.
  • the path constraint equivalence determination formula, and the path equivalence verification formula stored in the equivalence verification formula storage area 204 is unequal Then, it is determined which snapshot combination is non-equivalent, an operation for becoming equivalent is derived, and stored in the correction candidate storage area 206 as a correction candidate.
  • the verification result generation unit 117 generates the verification result report 310 using the verification results of the path constraint conjunction formula, the path constraint equivalence determination formula, and the equivalence verification formula, the correction candidate, the symbol execution summary, and the source code information. And stored in the verification result storage area 207 and displayed on the screen using the output device 121, or transmitted to the external computer 160 using the communication unit 103.
  • each unit included in the control unit 110 is realized by the source code equivalence verification apparatus 1000 executing each module of the source code equivalence verification program shown in FIG. .
  • FIG. 8 is a process flowchart of the source code equivalence verification apparatus. An example will be described in which the pre-change source code C100 shown in FIG. 1 is input as the pre-change source code, and the post-change source code C200 shown in FIG.
  • the source code input unit 111 reads the pre-change source code 301 to be verified and stores it in the pre-change / post-source code storage area 201. (P110).
  • the structure graph generation unit 112 executes source code analysis of the pre-change source code stored in the pre-change / post-change source code storage area 201, generates a pre-change structure graph N100 that is the analysis result, and The data is stored in the post-structure graph storage area 202 (P120).
  • the symbol execution calculation unit 113 performs symbol execution on the pre-change structure graph stored in the pre-change / post-structure graph storage area 202, generates the execution result as the change issue execution summary S120, It is stored in the subsequent symbol execution result storage area 203 (P130).
  • the post-change symbol execution summary is stored in the pre-change / post-symbol execution result storage area 203.
  • processing steps P110, P120, and P130 for the source code 301 before change can be executed independently of the processing steps P111, P121, and P131 for the source code 302 after change, both may be processed in parallel.
  • the structure graph generation and re-use can be performed by reusing the previous processing result stored in the pre-change / post-symbol execution result storage area 203. Symbolic execution calculations can be omitted.
  • the equivalence verification formula generator 114 generates an equivalence verification formula using the symbol execution summary of the source code before the change and the symbol execution summary of the source code after the change (P140).
  • FIG. 10 is an example of an execution tree resulting from symbol execution of the changed source code C200.
  • a specific processing procedure includes a symbol execution summary S120 shown in FIG. 3 generated from the pre-change source code C100 shown in FIG. 1 and a symbol execution summary S220 shown in FIG. 10 generated from the post-change source code C200 shown in FIG. It explains using.
  • FIG. 11 is a processing flowchart of the equivalence verification expression generation unit 114.
  • the equivalence verification formula generation unit 114 acquires the symbol execution summary of the source code before the change from the pre-change / post-symbol execution result storage area 203 (P141). The following process is executed for each snapshot of the change execution summary, and if there is no unprocessed snapshot before change (P142), the equivalence verification expression generation unit 114 ends the process.
  • the equivalence verification expression generation unit 114 selects one snapshot from the summary before the change issue execution (P143).
  • the equivalence verification formula generation unit 114 acquires a post-change symbol execution summary from the pre-change / post-symbol execution result storage area 203 (P144).
  • the equivalence verification expression generation unit 114 selects one snapshot for the post-change symbol execution summary (P146) and generates a path equivalence verification expression (P147). If there is no unprocessed snapshot after change (P145), the equivalence verification expression generation unit 114 returns to step P142. Therefore, the equivalence verification expression for all combinations of the pre-change snapshot and the post-change snapshot is returned.
  • the generation unit 114 generates a path equivalence verification formula.
  • the equivalence verification expression generation unit 114 generates a snapshot constraint expression by taking a conjunction of a path constraint and an equality condition of each variable state for each snapshot of the symbol execution summary.
  • the equivalence verification expression generation unit 114 selects a path constraint conjunction expression for determining whether there is a portion that overlaps both path constraints for the selected pre-change snapshot and post-change snapshot, and a selection.
  • Path constraint equivalence judgment formula for determining whether the path constraints of the modified snapshot and modified snapshot are equivalent, and within the range of paths corresponding to the selected snapshot before and modified
  • a path equivalence verification formula for verifying equivalence in the above is generated and recorded in the equivalence verification formula storage area 204.
  • the path constraint conjunction expression is a conjunction of the selected path constraint of the pre-change snapshot and the path constraint of the post-change snapshot.
  • the path constraint equivalence judgment formula is an expression for verifying that, when the path constraint conjunction formula is satisfied, a portion that overlaps both path constraints has already occurred, and a portion that does not overlap exists.
  • the path constraint equivalence judgment expression is represented by (A ⁇ B) ⁇ ( ⁇ A ⁇ B), where A is the path constraint of the selected snapshot before change and B is the path constraint of the snapshot after change. . If this expression is unsatisfiable, the path constraint A and the path constraint B all overlap and are equivalent.
  • the path equivalence verification expression consists of the negation expression of the conjunction of the equality constraint expression between the corresponding output variables, the snapshot constraint expression of the selected before-change snapshot, and the snapshot constraint expression of the selected after-change snapshot. It becomes the conjunction of When the source code before change and the source code after change are equivalent in the selected snapshot, that is, in the selected path, the output variable is equal to any input variable that passes through that path. The conjunction of the equality constraint is always valid.
  • the output variables g and R on the changed symbol execution summary side are replaced with g ′ and R ′, respectively, in order to avoid a collision with the variable name in the change execution summary.
  • one snapshot was selected at a time and a path equivalence verification formula was generated.
  • multiple snapshots may be selected at once. In that case, the selection of the snapshot constraint formula corresponding to the selected snapshot is used instead of the snapshot constraint formula used to generate the path equivalence verification formula.
  • the processing of the equivalence verification expression generation unit 114 is started after the processing of the symbol execution calculation unit 113 is completed.
  • generation of the snapshot is completed, generation of a path equivalence verification expression for the combination related to the snapshot may be started.
  • the equivalence verification formula verification unit 115 uses a SAT solver or the like for each of the plurality of path constraint conjunction formulas, path constraint equivalence determination formulas, and path equivalence verification formulas generated by the equivalence verification formula generation unit 114. Satisfiability is determined (P150). The equivalence verification expression verification unit 115 determines whether each of the expressions can be satisfied or not, and if the path equivalence verification expression can be satisfied, the value of the variable that the solver outputs is satisfied. The counterexample as an example is stored in the equivalence verification expression verification result storage area 205.
  • FIG. 12 is an example of a verification result 1200 of each path equivalence verification formula by the equivalence verification formula verification unit 115 in this example.
  • the path equivalence verification formula cannot be satisfied for all, so the post-change source code C100 and the post-change source code C200 are equivalent. It is determined.
  • the correction candidate generation unit 116 generates a correction operation that makes the changed source code equivalent in the case of non-equivalence, but does not execute anything because it is determined as equivalent in this example (P160).
  • FIG. 13 is an example of a verification result report.
  • the verification result generation unit 117 generates a verification result report 500 as shown in FIG. 13 based on the verification result (P170).
  • the verification result report 500 as the verification result 510, “equivalent” is displayed when all the path equivalence verification formulas cannot be satisfied, and “non-equivalent” when any of them can be satisfied. In this example, since all the path equivalence verification formulas are recorded as unsatisfactory, the verification result 510 is displayed as “equivalent”.
  • the verification result report 500 may include display of the source code 521 before change and the source code 522 after change using the source code information stored in the before / after source code storage area 201.
  • the verification result report 500 may include a display of the change issue execution summary 531 and the post-change symbol execution summary 532 using the symbol execution summary information stored in the before / after change execution result storage area 203. .
  • the symbol execution summary displays 531 and 532 in FIG. 13 the path constraints and variable states are displayed in one line for each snapshot.
  • the equivalence (referred to as path equivalence) between when a specific path of the source code before change and a specific path of the source code after change are combined is a combination of all paths.
  • Equivalence verification is realized by verifying against.
  • Fig. 14 shows an example of the changed source code that has been changed to be non-equivalent.
  • the source code C100 before change shown in FIG. 1 as the source code before change is changed, and the change shown in FIG. 14 as the source code after change which is a change not equivalent to C100.
  • a case where the post source code C300 is input will be described as an example.
  • FIG. 15 shows the processing contents in each step processing of FIG. 8 as described above.
  • the changed source code C300 starts from the changed source code C300 as shown in FIG.
  • An execution summary S320 is generated.
  • the equivalence verification expression generation unit 114 generates a path constraint conjunction expression, a path constraint equivalence determination expression, and a path equivalence verification expression for each combination of the pre-change snapshot and the post-change snapshot.
  • the equivalence verification expression verification unit 115 performs equivalence determination by determining satisfiability of all the generated path constraint conjunction expressions, path constraint equivalence determination expressions, and path equivalence verification expressions using a SAT solver or the like. .
  • FIG. 16 shows the verification result of each path equivalence verification formula.
  • FIG. 17 is a process flowchart in step P160 of the correction candidate generation unit 116.
  • the correction candidate generation unit 116 arranges the snapshot results before the change in rows and the snapshots after the change in columns in order to satisfy the satisfaction results of the respective expressions determined by the equivalence verification expression verification unit 115.
  • the verification result by the equivalence verification formula verification unit 115 will be described with reference to a verification table (see FIG. 18) described in squares.
  • the satisfaction determination result shown in FIG. 16 is the verification table 1800 of FIG.
  • the path constraint of the snapshot before change and the path constraint of the snapshot after change are non-equivalent, so it is expressed as path constraint non-equivalence.
  • the path equivalence verification expression cannot be satisfied, it means that the variable output state is equivalent in the range of the path indicated by the path constraint of the snapshot before the change and the path constraint of the snapshot after the change. If it is satisfiable, it is expressed as variable state inequality.
  • the correction candidate generating unit 116 determines that it is equivalent and ends the process (P162).
  • attention is paid to a cell whose variable state is non-equivalent (P163).
  • the correction candidate generation unit 116 proceeds to Step P165 if the focused cell is path constraint equivalent, and proceeds to Step P166 if the target cell is not equivalent to the path constraint (P163).
  • the correction candidate generating unit 116 changes the variable state of the snapshot after changing the focused cell.
  • the operation to replace the variable state of the snapshot before the change is saved as a correction candidate in the correction candidate storage area 206 (P165), and the process proceeds to Step P161.
  • the correction candidate generation unit 116 scans in the vertical direction of the target square in the verification table 1800, searches for other squares that are not equivalent to path constraints, and there is another square that is not equivalent to path constraints. Advances to step P167. If not, the process proceeds to Step P168 (P166).
  • the target square is not equivalent to the path constraint and the variable state is not equivalent, and the path constraint is not equivalent to the vertical direction from the target square. It is a state in which other cells exist.
  • the fact that other squares with non-equivalent path constraints exist in the vertical direction means that the path constraint of the snapshot after the change of the target square is the same as that of the snapshot before the change of the non-equivalent square in the vertical direction. Both path constraints indicate overlapping parts. Therefore, the correction candidate generation unit 116 sets an operation of decomposing the snapshot after the change of the focused cell using the path restriction of the snapshot before the change of the focused cell as the correction candidate in the correction candidate storage area 206. Save (P167) and go to Step P161.
  • the correction candidate generation unit 116 focuses on the cell 1804 in FIG. 18, and the cell 1803 becomes another cell that is not equivalent to the path constraint existing in the vertical direction. Detect and proceed to step P167.
  • the constraint terms that appear in common in the decomposition standard and the decomposition target are removed from the decomposition standard.
  • the decomposition criterion is ⁇ ( ⁇ > 1).
  • the mass 1803 is decomposed by adding the decomposition standard to the object to be decomposed with affirmative and negative.
  • FIG. 19 is an example of a snapshot disassembly operation and a variable state change operation, and is a result of disassembling the post-change snapshot S322 into a snapshot S3221 and a snapshot S3222.
  • the path constraint of the snapshot S3221 is added with ⁇ ( ⁇ > 1) which is an affirmative of the decomposition criterion, and the path constraint of the other snapshot S3222 is ⁇ ( ⁇ ( ⁇ > 1)) which is a negative of the decomposition criterion.
  • the variable states of both snapshots are the same as before decomposition.
  • the correction candidate generation unit 116 stores this decomposition operation in the correction candidate storage area 206.
  • the correction candidate generation unit 116 scans in the horizontal direction of the target cell in the verification table 1800, searches for other cells that are not path constraint non-equivalent, and there are other cells that are not path constraint non-equivalent Advances to Step P169 (P168). If there is no correction candidate, the correction candidate generation unit 116 ends the process.
  • the correction candidate generation unit 116 uses, as a correction candidate, an operation for integrating the snapshot after the change of the target square and the snapshot after the change of another square that is not equivalent to the path constraint in the horizontal direction.
  • the data is stored in the storage area 206 (P169), and the process proceeds to Step P161.
  • the path constraints of both snapshots are combined by disjunction, and either variable state is adopted as the variable state.
  • the correction candidate generation unit 116 reconstructs the verification table 1800 using a variable state change operation, a path constraint decomposition operation, or a path constraint integration operation stored in the correction candidate storage area 206 (P161).
  • the correction candidate generation unit 116 since the post-change snapshot S322 is decomposed into the snapshot S3221 and the snapshot S3222, the correction candidate generation unit 116 divides the column 1805 in FIG. 18 to verify the verification table 2000 shown in FIG. , And using the disassembled snapshot, again determine the satisfiability of the path constraint conjunction expression, path constraint equivalence judgment expression, and path equivalence verification expression for each cell, and update the validation table. After reconstructing the verification table, the correction candidate generating unit 116 returns to Step P162 and repeats the same process.
  • the verification table 2000 in FIG. 20 shows that the cell 2001 that is a combination of the pre-change snapshot S109 and the post-change snapshot S3222 is noted in step P163, and the path restrictions of the focused cell are equivalent.
  • the correction candidate generating unit 116 stores an operation for replacing the variable state of the post-change snapshot S3222 with the variable state of the pre-change snapshot S109 in the correction candidate storage area 206.
  • the corrected snapshot to which the operation of replacing the variable state of the pre-change snapshot S109 is applied becomes the snapshot S3223 of FIG. 19, and the correction candidate generation unit 116 proceeds to step P161.
  • the correction candidate generating unit 116 replaces the snapshot S3222 in FIG. 20 with the snapshot S3223 in FIG.
  • the correction candidate generation ends in step P162.
  • the operation stored in the correction candidate storage area 206 is applied to the changed source code, so that it becomes logically equivalent to the source code before the change.
  • FIG. 22 is an example of a verification result report 600 generated by the verification result generation unit 117.
  • the verification result report 600 as the verification result display 610, “equivalent” is displayed when all the path equivalence verification expression verification results cannot be satisfied, and “non-equivalent” when there is a satisfyable path equivalence verification expression. Is displayed. In this example, for example, “not equivalent” is displayed because the path equivalence verification formula when the snapshot S109 and the snapshot S322 are selected can be satisfied.
  • the verification result report 600 may include a display of the change issue execution summary 631 and the post-change symbol execution summary 632 using the symbol execution summary information stored in the pre-change / post-change symbol execution result storage area 203. At this time, the snapshot verification result 639 can be displayed on the display of the post-change symbol execution summary 632.
  • the verification result 639 of the snapshot refers to the verification result 1602 of each path equivalence verification formula shown in FIG. 16, and if all the verification results of the path equivalence verification formula that selected the snapshot are unsatisfactory, “ “Equivalent” or “Not Equivalent” is displayed if there is a satisfiable path equivalence verification formula.
  • other snapshots are displayed as “non-equivalent” because they include a satisfying path equivalence verification formula.
  • the verification result report may include a display of counterexample information 640 that is not equivalent using counterexample information stored in the equivalence verification formula verification result storage area 205.
  • a check box 638 for selecting a snapshot may be provided while the symbol execution summary is displayed, and a counter-example of the path equivalence verification formula for the selected combination of snapshots may be displayed.
  • the verification result report 600 may further include a display of the pre-change source code 621 and the post-change source code 622 using the source code information stored in the pre-change / post-source code storage area 201.
  • the path of the snapshot may be displayed on the source code from the position information of the snapshot.
  • the path of the snapshot S109 is displayed as an underline on the source code 621 before the change using the position information of the snapshot S109. Further, the path of the snapshot S322 is displayed as an underline on the changed source code 622 using the position information of the snapshot S322.
  • the background is displayed in a different color, highlighted by changing the font or character size, and the display of the portion other than the route is deleted. Then, the route is displayed in a different manner from other parts, such as displaying only the route.
  • the path corresponding to the selected snapshot is displayed on the source code, and the counter example corresponding to the combination of them is displayed. It becomes possible to narrow down the range to be investigated, and it becomes easy to find the cause that is not equivalent.
  • the verification result report 600 includes a display of a correction candidate 2501 to be equivalent to the correction target portion of the post-change symbol execution summary 632 using the correction candidate information stored in the correction candidate storage area 206. But it ’s okay.
  • the decomposition operation for the snapshot S322 after the change into the snapshots S3221 and S3222 shown in FIG. 19 is stored as the correction candidates in the correction candidate storage area 206
  • the snapshot S3221 A corresponding post-decomposition snapshot 2502 and a post-decomposition snapshot 2503 corresponding to the snapshot S3222 are displayed.
  • an operation for correcting the variable state from snapshot S3222 to snapshot S3223 is stored in the correction candidate storage area 206 as a correction candidate, so that the variable state 2504 of the post-decomposition snapshot 2503 includes It is displayed reflecting the variable status replacement.
  • the correction candidates are displayed on the path corresponding to the selected snapshot of the post-change source code. There are methods.
  • the verification result report 600 uses the source code information stored in the pre-change / post-change source code storage area 201 and the correction candidate information stored in the correction candidate storage area 206, to the post-change source code 622.
  • a display of modified source code 2505 modified to be logically equivalent to the unmodified source code by applying a modification candidate may be included.
  • the correction candidate information stored in the correction candidate storage area 206 is first the decomposition of the post-change snapshot S322 in which the decomposition criterion is ⁇ ( ⁇ > 1).
  • the decomposition criterion a branch by the if statement is added to the seventh line of the modified source code 2505 on the path through the modified snapshot S322, and a branch by the else statement indicating the negative path of the decomposition criterion is added to the tenth line. It has been added.
  • the disassembled snapshot S3221 that is, the disassembled snapshot 2502 in FIG. 22, there is no change in the variable state, so the 8th and 9th lines remain as they are.
  • the decomposed snapshot S3222 is subjected to a variable state change operation to become a snapshot S3223. Therefore, the 11th line of the modified source code 2505 is the source code for realizing the changed variable state.
  • the portion corrected by the path constraint decomposition operation or the variable state change operation is underlined.
  • the background is displayed in a different color, the font or character size is changed and highlighted, and the display of parts other than the correction part is displayed. Is displayed in a different manner from the other parts, such as deleting only and displaying only the route.
  • the modified source code is a source code that is mechanically applied with modifications that are logically equivalent to the pre-change source code, so readability and maintainability may be reduced, and may be difficult to use as is There is sex.
  • the developer can indicate which changes in the source code after the change are equivalent to the source code before the change. It becomes easy to consider how to correct it.
  • Source code equivalence verification device 101 ... CPU, 102 ... main storage device, 103 ... network I / F, 104 ... graphic I / F, 105 ... input / output I / F, 106 ... auxiliary storage device I / F, DESCRIPTION OF SYMBOLS 110 ... Control part, 120 ... Display / output device, 121 ... Output device, 130 ... Input device, 131 ... Keyboard, 132 ... Mouse, 140 ... Memory
  • symbol execution summary S104, S109, S113, S221 to S223, S321 to S323 ... Snapshot in symbol execution, S101a ... Path constraint of node of symbol execution tree, S101b ... Variable state of node of symbol execution tree, S101c ... Position information of node of symbol execution tree, N100 ... Structure graph, 1800, 2000, 2200 ... verification table, 500, 600 ... verification result report.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

ソースコード等価性検証装置は、変更前ソースコードと変更後ソースコードに対して、それぞれ記号実行する記号実行計算部、記号実行計算部の記号実行結果を用いて、変更前ソースコードと変更後ソースコードとの等価性検証式を生成する等価性検証式生成部、等価性検証式生成部で生成された等価性検証式を検証する等価性検証式検証部、等価性検証式検証部による等価性検証式の検証結果が、変更前ソースコードと変更後ソースコードとが非等価の場合に、変更前ソースコードと変更後ソースコードとが等価になるための修正候補を生成する修正候補生成部、および、等価性検証式検証部によるおける検証結果と修正候補生成部による前記修正候補を用いて、検証結果リポートを生成する検証結果生成部を有する。

Description

ソースコード等価性検証装置、および、ソースコード等価性検証方法
 本発明は、ソースコードを変更した際にソースコード間の振る舞いが等価であることを検証し、非等価である場合は等価となるように開発者が修正することを支援するための装置、および、検証方法に関する。
 ソースコードの等価性を検証するための手法として、特許文献1に記載の技術がある。特許文献1では、ソースコード比較によって差異が生じている部分にテストを実施し、その結果を比較する手法が開示されている。
 また、非特許文献1では、記号実行を用いて振る舞いが保持されていることを検証する手法が開示されている。
米国特許出願公開第2007/0033576号公報
S. Person, M. B. Dwyer, S. Elbaum, C. S. Pasareanu, "Differential Symbolic Execution", Proc. of ACM SIGSOFT Symposium on the Foundations of Software Engineering 2008, USA, 2008
 近年、情報処理社会が進展することにより、ソフトウエアシステムが一般社会に浸透し、ソフトウエアに求められる信頼性が非常に高度なものになってきている。一方で、ソフトウエアは、長年にわたる差分・派生開発によって複雑化および大規模化の一途をたどり、ソフトウエアの拡張しやすさや理解しやすさといった保守性の低下が問題となっている。
 ソフトウエアの保守性を向上させる方法としてリファクタリングや言語リプレースがある。リファクタリングは、ソフトウエアの振る舞いを変えずに、内部構造を変更することにより、ソフトウエアの設計品質を改善する手法の総称である。言語リプレースは、保守性の低いプログラミング言語を用いて開発されたソフトウエアに対して、そのソフトウエアと同じ機能を保守性の高い別のプログラミング言語を用いて作り直すことである。
 このリファクタリングや言語リプレースの手法は、複雑化および大規模化の一途をたどるソフトウエアの保守性を確保するために有望な技術である。しかし、ソフトウエアのソースコードの変更や作り直しの際に、対象となっているソースコードの振る舞いを変えてしまうと、新たに不具合を混入してしまう可能性がある。そのため、ソフトウエア開発者が、リファクタリングや言語リプレースが原因で正しく動作していたソフトウエアに不具合が混入することをおそれ、それらを行わない判断が有り得る。ソフトウエアの保守段階において、リファクタリングや言語リプレースを積極的に行うためには、ソースコードの変更前後で、両者のソースコードの振る舞いに変化が無いことを検証する手法が求められる。
 本明細書中において、2つのソースコードの外的な振る舞いが同じであること、すなわち、任意の同じ入力に対して、実行時に同じ出力が得られることを、両ソースコードが「等価」であると定義する。また、変更前のソースコードと変更後のソースコードが、等価であるかどうかを検証することを「等価性検証」ということにする。
 変更前のソースコードと変更後のソースコードが等価であることを検証する手法に求められる条件としては以下のような条件がある。
(1)1つの条件は、その作業の大部分が自動化されており、人手による作業が少ないことである。従来、ソースコードの等価性は、人手によるレビューやテストによって検証されていた。これをツールによる自動的な検証を実現にすることにより、検証工数が削減され、リファクタリング等が促進される。
(2)もう1つの条件は、等価性検証手法により非等価であると判断された場合に、その根拠となる情報や修正すべき箇所や修正方法に関する情報を開発者に提供することである。開発者に分かりやすく修正すべき箇所の情報を提供し、さらに修正方法についての情報を提供することにより、開発者による修正が容易となり、開発期間や工数の短縮につながる。
 特許文献1による手法は、テストを必要としており、(1)の条件を満たすことができない。また、非特許文献1による方法は、等価性を検証するための論理式を生成し、ソルバを用いて検証しているが、修正すべき箇所の情報や修正方法の提供を行っていないため、(2)の条件を満たすことができない。
 そこで、本発明では、記号実行を用いたソースコード等価性検証装置において、検証結果が非等価である場合に、非等価となった変更後のソースコードを開発者が等価となるように修正するために、ソースコード上の修正関する情報を提示するための技術を提供することを目的とする。
 開示するソースコード等価性検証装置は、変更前ソースコードと変更後ソースコードに対して、それぞれ記号実行する記号実行計算部、記号実行計算部の記号実行結果を用いて、変更前ソースコードと変更後ソースコードとの等価性検証式を生成する等価性検証式生成部、等価性検証式生成部で生成された等価性検証式を検証する等価性検証式検証部、等価性検証式検証部による等価性検証式の検証結果が、変更前ソースコードと変更後ソースコードとが非等価の場合に、変更前ソースコードと変更後ソースコードとが等価になるための修正候補を生成する修正候補生成部、および、等価性検証式検証部によるおける検証結果と修正候補生成部による前記修正候補を用いて、検証結果リポートを生成する検証結果生成部を有する。
 開示するソースコード等価性検証装置によれば、変更前ソースコードと変更後ソースコードとを等価にするために修正すべき箇所を、開発者がソースコード上で確認することが可能となる。
ソースコード等価性検証に用いる変更前ソースコードの例である。 ソースコードをソースコード解析した結果の構造グラフの例である。 ソースコードを記号実行した結果の実行木の例である。 実施例1のソースコード等価性検証装置のハードウエア構成である。 実施例1のソースコード等価性検証装置のソフトウエア構成である。 ソースコード等価性検証装置の機能構成である。 ソースコード等価性検証装置の制御部および記憶部の構成並びにデータフローである。 ソースコード等価性検証装置の処理フローチャートである。 ソースコード等価性検証に用いる変更後ソースコードの例である。 ソースコードを記号実行した結果の実行木の例である。 等価性検証式生成部の処理フローチャートである。 等価性検証式検証部による各パス等価性検証式の検証結果の例である。 検証結果リポートの例である。 非等価となるように変更した変更後ソースコードの例である。 ソースコードを記号実行した結果の実行木の例である。 各パス等価性検証式の検証結果の例である。 修正候補生成部の一部の処理フローチャートである。 検証表の例である。 スナップショット分解操作と変数状態の変更操作の例である。 スナップショット分解操作を適用した検証表の例である。 変数状態の変更操作を適用した検証表の例である。 検証結果リポートの例である。
 本実施形態の前提となる技術である記号実行について説明する。記号実行とは、ソースコードの検証に際し、ソースコード中に用いられている変数(入力変数、グローバル変数等)に具体的な値を代入しつつソースコードを実行する代わりに、記号を用いて実行し、ソースコードの実行過程における変数の状態(以下、変数状態とも称する。)とソースコード中の当該パスを経るための条件式(以下、パス制約とも称する。)との組み合わせ(以下、スナップショットとも称する。)を用いてソースコードの入出力関係を求める技術である。
 記号実行によれば、ソースコードが取り得る全てのパスを網羅してソースコードを検証することができる。図1は、ソースコード等価性検証に用いる変更前ソースコードの例である。以下、図1のC言語で記述されたソースコードC100について情報処理装置を用いて記号実行を行う場合を例として説明する。
 図2は、ソースコードをソースコード解析した結果の構造グラフの例である。記号実行において、情報処理装置は、まずソースコードC100を対象に、コンパイルと同様の字句分析や構文分析を行うことにより、図2に示す構造グラフN100を生成する。構造グラフN100は、ソースコードの抽象構文木(構文木から、言語の意味に関係ない情報を取り除き、意味に関係ある情報のみを取り出した(抽象した)木構造のデータ構造)の各ノード間の制御フローを示しており、実線矢印は条件の付かない制御フロー、破線矢印は条件付き制御フローを表している。
 図2に示す関数fooの構造グラフN100では、関数のエントリーポイントに対応するノードN1から始まり、関数の出口であるreturn文に対応するノードN5に終わる各制御フローが図示されている。また、if文に対応するノードN2からは複数の条件付き制御フローが出ており、if文の条件の成立/不成立に応じて異なる制御フローを通ることを示している。
 構造グラフN100の生成にあたって、情報処理装置は、各ノードに対応するソースコードC100上の位置情報を付与する。図2に示す例においては、情報処理装置は、ソースコードC100中の行番号を位置情報として付与している。例えば、ノードN2にはL4という位置情報が付与され、対応するif文がソースコードC100の4行目に記載されていることが分かる。
 図3は、ソースコードを記号実行した結果の実行木の例である。情報処理装置は、構造グラフN100に基づき、図3に示す実行木S100を生成する。実行木S100の各ノードには、前述したパス制約(上欄)と変数状態(中欄)との組み合わせで表され、さらに、ソースコード上で経由した位置を表す位置情報(下欄)が表されている。実行木S100の根ノード(ルートノード)S101は、ソースコードの実行の初期状態に対応する。情報処理装置は、ソースコードの実行に伴って変数状態が更新される度に実行木S100に新たなノードを追加していく。
 実行木S100の生成に際し、情報処理装置は、関数fooの入力変数となる変数の値に対応する記号変数を割り当てる。入力変数となる変数の値とは、関数外部から与えられて、当該関数の動作に影響を与える変数の値であり、関数の引数や関数内でアクセスするグローバル変数を含む。
 例示するソースコードC100においては、関数の引数aとグローバル変数gが入力変数となる。本例では、情報処理装置は、変数aとgに「α」と「γ」を記号変数として割り当てている。
 情報処理装置は、構造グラフN100のノードN1に基づき、実行木S100に根ノードS101を生成する。本例では、情報処理装置は、根ノードS101のパス制約(上欄)S101aに、「制約無し」を示す「no condition」を設定し、変数状態(中欄)S101bに、入力変数aとgの値がそれぞれ割り当てられた記号変数αとγであることを示す「a=α,g=γ」を設定している。また、位置情報(下欄)S101cに、ノードN1から取得した位置情報L2を設定する。
 情報処理装置は、構造グラフN100においてノードN1の制御フロー上の次ノードN2に基づき処理を実行する。情報処理装置は、ノードN2は2つの条件付き制御フローN21とN22を持つ条件分岐ノードであり、条件付き制御フローN21に対応する子ノードS102を、条件付き制御フローN22に対応する子ノードS105を、それぞれノードS101の子ノードとして生成する。
 ノードN2における条件式は「g==1」であり、S101bにおける変数gの変数状態はγであるため、条件付き制御フローN21における分岐条件は「γ=1」と表現できる。そのため、ノードS102のパス制約(上欄)は、S101aにおけるパス制約「制約無し」と合わせて「γ=1」と設定される。
 ノードS102における変数状態(中欄)は、if文によって変数状態が変化しないため親ノードの変数状態S101bと同一に設定される。また、位置情報(下欄)は、親ノードS101の位置情報S101cに加えて、ノードN2の位置情報(L4)が追加され「L2,4」となり、ソースコードの2行目と4行目を経由してきたことを意味する。
 条件付き制御フローN22における分岐条件は、制御フローN22がif文の条件が成立しなかった場合に対応するフローであることから、「¬(γ=1)」と表現できる。そのため、ノードS105のパス制約(上欄)は、S101aにおけるパス制約「制約無し」と合わせて「¬(γ=1)」と設定される。
 ノードS105における変数状態(中欄)は、if文によって変数状態が変化しないため親ノードの変数状態S101bと同一に設定される。また、位置情報(下欄)は、親ノードの位置情報S101cに加えて、ノードN2の位置情報(L4)が追加され「L2,4」となる。
 情報処理装置は、ノードN2の制御フローN21上の次ノードであるN3に基づき処理を実行する。情報処理装置は、ノードN3に対応する実行木S100におけるノードとしてS102の子ノードS103を生成する。
 ノードS103においては、条件分岐が無いため、パス制約(上欄)はS102と同一に設定する。また、ノードN3において変数rに値1を代入しているため変数状態(中欄)に「r=1」を追加する。位置情報(下欄)にはS102における位置情報にノードN3の位置情報である「L5」を追加する。
 情報処理装置は、N3の制御フロー上の次ノードであるN5に基づき処理を実行する。ノードN5に対応する実行木S100におけるノードとしてS103の子ノードS104を生成する。ノードN5は変数rを返り値とするreturn文に対応しているため、変数状態(中欄)には、返り値を表すこととする変数Rに対して変数rの現在の値である1を割り当てた「R=1」を追加する。return文により関数の実行は終わるため、実行木S100における、この枝の生成は終了し、まだ生成の終わっていない枝の生成へと移行する。
 情報処理装置は、N2の制御フローN22上の次ノードであるN4に基づき処理を実行する。ノードN4は2つの条件付き制御フローN41とN42を持つ条件分岐ノードであり、情報処理装置は、条件付き制御フローN41に対応する子ノードS106を、条件付き制御フローN42に対応する子ノードS110を、それぞれノードS105の下に生成する。
 ノードN4におけるif文の条件式は「a>1」であり、変数状態よりaに対応する値はαであるため、条件付き制御フローN41における分岐条件は「α>1」と表現される。そのため、S106におけるパス制約(上欄)はS105におけるパス制約「¬(γ=1)」と「α>1」との連言である「¬(γ=1)∧(α>1)」を設定する。
 以下、情報処理装置は、各枝に対して、全ての枝の生成が終了するまで上記の作業を繰り返す。
 ノードN6に対する処理では、情報処理装置は、ノードS107の子ノードS108を生成している。ノードN6では変数gの値をg-1に更新している。この時、変数gに対応する値はS107の変数状態(中欄)からγであると分かる。そこで、子ノードS108では、情報処理装置は、変数gに対する変数状態(中欄)を「g=γ―1」に更新する。このように、記号変数を含む計算に対しては具体的な値ではなく式のままの形で変数状態を保持する。
 情報処理装置は、上記の操作によって、最終的に図2に示す構造グラフN100から図3に示すような実行木S100を得る。記号実行においては取り得る全ての制御フローが網羅されるように条件分岐に応じた子ノードが実行木に生成される。
 実行木における葉ノードは、ソースコードの入力値に対する条件(パス制約)と、出力変数の状態(変数状態)の組の集合を求めることであるということができる。以下の説明において、記号実行が終了した時点における実行木の葉ノードを「スナップショット」と称し、スナップショットの集合のことを「記号実行サマリ」と称する。ただし、変数状態に含まれる変数のうち、ローカル変数(関数の引数を含む)は関数の実行完了時点で破棄されるため、スナップショットおよび記号実行サマリからローカル変数の変数状態は除外することとする。
 実行木S100における葉ノードはS104、S109、S113の3ノードであり、これらはそれぞれスナップショットとなり、これらの集合が記号実行サマリS120となる。ただし、ローカル変数である変数rおよびaの変数状態は除外する。
 本例では、C言語で記述されたソースコードを用いて記号実行を説明したが、C言語に限定されず他のプログラミング言語を用いて記述されたソースコードに対しても同様に実施可能である。
 以下、図4から図13を用いて、実施例1のソースコード等価性検証装置1000の構成と処理について説明する。
 図4は、本実施例のソースコード等価性検証装置1000のハードウエア構成である。ソースコード等価性検証装置は、例えば、図4に示されるような一般的な情報処理装置であるパーソナルコンピュータで実現される。ソースコード等価性検証装置1000は、Central Processing Unit(CPU)101、主記憶装置102、ネットワークI/F103、グラフィックI/F104、入出力I/F105、補助記憶装置I/F106が、バスにより結合された形態になっている。
 CPU101は、ソースコード等価性検証装置1000の各部を制御し、主記憶装置102にソースコード等価性検証プログラム200をロードして実行する。
 主記憶装置102は、通常、RAMなどの揮発メモリで構成され、CPU101が実行するプログラム、参照するデータが補助記憶装置などからロードされて、記憶される。
 ネットワークI/F103は、外部ネットワーク150と接続するためのインターフェースである。
 グラフィックI/F104は、Liquid Crystal Display(LCD)などの表示装置120を接続するためのインターフェースである。
 入出力I/F105は、入出力装置を接続するためのインターフェースである。図4の例では、キーボード131とポインティングデバイスのマウス132が接続されている。
 補助記憶装置I/F106は、HDD(Hard Disk Drive)141やDVD(Digital Versatile Disk)ドライブ装置142などの補助記憶装置を接続するためのインターフェースである。
 HDD141は、大容量の記憶容量を有しており、本実施例の処理を実行するためのソースコード等価性検証プログラム200が格納されている。
 DVDドライブ装置142は、DVDやCDなどの光学ディスクにデータを書き込んだり、光学ディスクからデータを読み込んだりする装置であり、ソースコード等価性検証プログラム200は、例えば、CD-ROMにより提供されたものをインストールすることができる。
 本実施例のテストデータ生成装置1000は、上記のようなパーソナルコンピュータに、ソースコード等価性検証プログラム200をインストールして、各機能を実行するものである。
 図5は、本実施例のソースコード等価性検証装置のソフトウエア構成である。ソースコード等価性検証装置1000で実行するソースコード等価性検証プログラム200は、ソースコード読み込みモジュール2001、構造グラフ生成モジュール2002、記号実行計算モジュール2003、等価性検証式生成モジュール2004、等価性検証式検証モジュール2005、修正候補生成モジュール2006、および、検証結果表示モジュール2007を含む。
 なお、プログラム等価性検証プログラム200は、Operating System(OS)上で動作するアプリケーションソフトウエアであり、ソースコード等価性検証装置のソフトウエア構成として、OSやライブラリプログラムも含むが、図5では省略している。
 ソースコード読み込みモジュール2001は、検証対象の変更前ソースコードと変更後ソースコードをHDDや他の計算機から読み込み、記憶部に格納するモジュールである。
 構造グラフ生成モジュール2002は、ソースコード(たとえば、前述したC100)の字句解析・構文解析を行い、制御フローを抽出することにより、構造グラフ(たとえば、前述したN100)を生成するモジュールである。
 記号実行計算モジュール2003は、構造グラフ生成モジュール2002が生成した構造グラフに基づき、記号実行を行って実行木(たとえば、前述したS100)を計算し、その葉ノードを集めた記号実行サマリ(たとえば、前述したS120)を生成するモジュールである。
 等価性判定式生成モジュール2004は、記号実行計算モジュール2003が生成した変更前ソースコードの記号実行サマリおよび変更後ソースコードの記号実行サマリから、記号実行サマリに含まれるスナップショットの組み合わせごとに、両者の等価性を判定するための、パス制約連言式、パス制約等価判定式、およびパス等価性検証式を生成するモジュールである。
 等価性検証式検証モジュール2005は、等価性判定式生成モジュール2004が生成したパス制約連言式、パス制約等価判定式、およびパス等価性検証式をSAT(SATisfiability)ソルバやSMT(Satisfiability Modulo Theories)ソルバを用いて充足可能性問題として解くモジュールである。
 修正候補生成モジュール2006は、等価性検証式検証モジュール2005が出力した検証結果を用いて、変更前ソースコードの記号実行サマリおよび変更後ソースコードの記号実行サマリに含まれるスナップショットの、どの組み合わせで非等価が生じているかを解析し、非等価である場合の論理的に等価となるための修正候補を導出するモジュールである。
 検証結果生成モジュール2007は、等価性検証式検証モジュール2005が出力した検証結果や修正候補生成モジュール2006が出力した修正候補や、記号実行サマリ、ソースコードの情報を用いて、検証結果リポートを生成し、表示または通知するモジュールである。
 図6は、ソースコード等価性検証装置1000の機能構成である。制御部110は、図4のCPU101、主記憶装置102により実現し、記憶部140は主に図4のHDD141により実現するが、主記憶装置102を含めることもある。入力装置130は、図4の入出力I/F105、キーボード131、マウス132などを含み、さらに補助記憶装置I/F106を介してDVDドライブ装置142から読み込む構成を含めても良い。出力装置121は、グラフィックI/F104、表示装置120などを含み、さらに補助記憶装置I/F106を介してDVDドライブ装置142へ書き込む構成を含めても良い。通信部103は、図4のネットワークI/F103を表わすが、ネットワーク150を介して例えば外部計算機160と接続されている。図6の制御部110および記憶部140の詳細は、図7を用いて説明する。
 図7は、ソースコード等価性検証装置1000の制御部110および記憶部140の構成並びにデータフローである。ソースコード入力部111は、検証対象とする変更前ソースコード301および変更後ソースコード302を読み込み、変更前/後ソースコード記憶領域201にそれぞれ格納する。
 本実施例では、変更前ソースコード301と変更後ソースコード302がC言語で記述された例を用いて説明しているが、他のプログラミング言語にも対応した構造グラフ生成部112および記号実行計算部113を用いることにより、他のプログラミング言語で記述されたソースコードを用いることも可能である。また、変更前ソースコード301と変更後ソースコード302とで異なるプログラミング言語を用いても良い。
 構造グラフ生成部112は、変更前/後ソースコード記憶領域201に格納されている、変更前ソースコードおよび変更後ソースコードに対してそれぞれソースコード解析を実行し、その解析結果である変更前構造グラフおよび変更後構造グラフを変更前/後構造グラフ記憶領域202に格納する。
 記号実行計算部113は、変更後構造グラフを変更前/後構造グラフ記憶領域202に格納されている、変更前/後構造グラフのそれぞれを記号実行し、その計算結果(記号実行結果)である記号実行サマリを変更前/後記号実行結果記憶領域203に格納する。
 等価性検証式生成部114は、変更前/後記号実行結果記憶領域203に格納されている、変更前/後記号実行結果である、変更前ソースコードの記号実行サマリおよび変更後ソースコードの記号実行サマリから、記号実行サマリに含まれるスナップショットの組み合わせごとに、両者の等価性を判定するためのパス制約連言式、パス制約等価判定式、およびパス等価性検証式を生成し、等価性検証式記憶領域204に格納する。
 等価性検証式検証部115は、等価性検証式記憶領域204に格納されている、パス制約連言式、パス制約等価判定式、およびパス等価性検証式の検証を実行し、これらの検証結果を等価性検証式結果記憶領域205に格納する。
 修正候補生成部116は、等価性検証式記憶領域204に格納されている、パス制約連言式、パス制約等価判定式、およびパス等価性検証式のいずれかの検証結果が非等価である場合に、どのスナップショットの組み合わせで非等価になるかを判別し、等価となるための操作を導出し、修正候補として修正候補記憶領域206に格納する。
 検証結果生成部117は、パス制約連言式、パス制約等価判定式、および等価性検証式の検証結果や、修正候補、記号実行サマリ、ソースコードの情報を用いて、検証結果リポート310を生成し、検証結果記憶領域207に格納するとともに出力装置121を用いて画面に表示する、または、通信部103を用いて外部計算機160に送信する。
 以上の説明から明らかなように、制御部110に含まれる各部の動作は、図5に示したソースコード等価性検証プログラムの各モジュールをソースコード等価性検証装置1000が実行することによって実現される。
 図8は、ソースコード等価性検証装置の処理フローチャートである。変更前ソースコードとして図1に示す変更前ソースコードC100を、変更後ソースコードとしてC100と等価に変更した図9に示す変更後ソースコードC200を入力した場合を例として説明する。
 ソースコード入力部111は、検証対象とする変更前ソースコード301を読み込、変更前/後ソースコード記憶領域201にそれぞれ格納する。(P110)。構造グラフ生成部112は、変更前/後ソースコード記憶領域201に格納されている変更前ソースコードのソースコード解析を実行し、その解析結果である変更前構造グラフN100を生成し、変更前/後構造グラフ記憶領域202に格納する(P120)。記号実行計算部113処は、変更前/後構造グラフ記憶領域202に格納されている変更前構造グラフに対して記号実行し、その実行結果を変更前記号実行サマリS120として生成し、変更前/後記号実行結果記憶領域203に格納する(P130)。
 変更後ソースコード302に対しても同様に、ソースコード入力部111の処理(P111)、構造グラフ生成処理部112の処理(P121)、および記号実行計算部113の処理(P131)を実行し、変更後記号実行サマリを変更前/後記号実行結果記憶領域203に格納する。
 変更前ソースコード301に対する処理ステップP110、P120、P130は、変更後ソースコード302に対する処理ステップP111、P121、P131は、独立に実行することができるため、両者を並列に処理しても良い。
 また、以前に同じ内容のソースコードに対して処理を実行した場合には、変更前/後記号実行結果記憶領域203に格納されている以前の処理結果を再利用することにより、構造グラフ生成と記号実行計算を省略することができる。
 等価性検証式生成部114は、変更前ソースコードの記号実行サマリと変更後ソースコードの記号実行サマリを用いて等価性検証式を生成する(P140)。図10は、変更後ソースコードC200を記号実行した結果の実行木の例である。具体的な処理手順を図1に示す変更前ソースコードC100から生成した図3に示す記号実行サマリS120と、図9に示す変更後ソースコードC200から生成した図10に示す記号実行サマリS220とを用いて説明する。
 図11は、等価性検証式生成部114の処理フローチャートである。等価性検証式生成部114は、変更前/後記号実行結果記憶領域203から変更前ソースコードの記号実行サマリを取得する(P141)。変更前記号実行サマリの各スナップショットに対して、下記に示す処理を実行し、未処理の変更前スナップショットが無くなれば(P142)、等価性検証式生成部114部は処理を終了する。
 等価性検証式生成部114部は、変更前記号実行前サマリからスナップショットを1つ選択する(P143)。等価性検証式生成部114部は、変更前/後記号実行結果記憶領域203から変更後記号実行サマリを取得する(P144)。等価性検証式生成部114部は、変更後記号実行サマリに対して、スナップショットを1つ選択し(P146)、パス等価性検証式を生成する(P147)。未処理の変更後スナップショットが無くなれば(P145)、等価性検証式生成部114部はステップP142に戻るため、変更前スナップショットと変更後スナップショットの全ての組み合わせに対して、等価性検証式生成部114部はパス等価性検証式を生成する。
 等価性検証式生成部114部は、記号実行サマリの各スナップショットに対して、パス制約と各変数状態の等号条件との連言を取ることによりスナップショット制約式を生成する。
 例えば、スナップショットS104、S109、S113に対しては、それぞれ(γ=1)∧(g=γ)∧(R=1)、¬(γ=1)∧(α>1)∧(g=γ-1)∧(R=α)、¬(γ=1)∧¬(α>1)∧(g=γ-1)∧(R=―α)という制約式が生成される。この際、前述のようにローカル変数である変数rおよび変数aに対する変数状態の等号制約は除外される。
 さらに、等価性検証式生成部114は、選択された変更前スナップショットと変更後スナップショットに対して両者のパス制約に重なる部分が存在するかを判定するためのパス制約連言式と、選択された変更前スナップショットと変更後スナップショットのパス制約が等価であるかを判定するためのパス制約等価判定式と、選択された変更前スナップショットと変更後スナップショットに対応するパスの範囲内での等価性を検証するためのパス等価性検証式を生成し、等価性検証式記憶領域204に記録する。
 パス制約連言式は、選択された変更前スナップショットのパス制約と変更後スナップショットのパス制約の連言となる。このパス制約連言式が充足可能である時、両パス制約を満たす入力が生じるため、両者のパス制約に重なる部分が生じていることが分かる。
 パス制約等価性判定式は、パス制約連言式が充足した際に、既に両者のパス制約に重なる部分が生じている上で、重なっていない部分が存在しないことを検証する式である。パス制約等価性判定式は、選択された変更前スナップショットのパス制約をAとし、変更後スナップショットのパス制約をBとした際、(A∧¬B)∨(¬A∧B)で表す。この式が充足不可であった場合、パス制約Aとパス制約Bは全て重なっており等価である。
 パス等価性検証式は、対応する出力変数間の等号制約式の連言の否定式と、選択した変更前スナップショットのスナップショット制約式と、選択した変更後スナップショットのスナップショット制約式との連言となる。変更前ソースコードと変更後ソースコードが、選択されたスナップショットすなわち選択されたパスにおいて等価である時、そのパスを通る任意の入力変数に対して出力変数が等しくなるため、対応する出力変数間の等号制約の連言が常に成立する。
 例えば変更前記号実行サマリS120中のスナップショットS104と変更後記号実行サマリS220中のスナップショットS221を選択した際、パス制約連言式は、(γ=1)∧(γ=1)、パス制約等価性検証式は、((γ=1)∧¬(γ=1))∨((γ=1)∧¬(γ=1))、パス等価性検証式は、¬((R=R’)∧(g=g’))∧((γ=1)∧(g=γ)∧(R=1))∧((γ=1)∧(g’=γ)∧(R’=1))となる。ただし、変更後記号実行サマリ側の出力変数gとRに対しては、変更前記号実行サマリ中の変数名との衝突を回避するため、それぞれg’とR’に置換している。
 上記の説明例では、一度に1つずつのスナップショットを選択し、パス等価性検証式を生成した。しかし、一度に複数のスナップショットを選択しても良い。その場合、パス等価性検証式生成に用いるスナップショット制約式の代わりに、選択したスナップショットに対応するスナップショット制約式の選言を用いる。
 また、上記の説明例では、記号実行計算部113の処理が完了してから、等価性検証式生成部114の処理を開始しているが、記号実行計算部113の処理中に、一部のスナップショットの生成が完了した時点で、当該スナップショットに係る組み合わせに対するパス等価性検証式の生成を開始しても良い。
 等価性検証式検証部115は、等価性検証式生成部114が生成した複数のパス制約連言式、パス制約等価判定式、およびパス等価性検証式に対して、それぞれSATソルバ等を用いて充足可能性を判定する(P150)。等価性検証式検証部115は、それぞれの式に対して、充足可能か不可能かの結果と、パス等価性検証式が充足可能な場合にはソルバが出力する充足するような変数の値の例である反例とを等価性検証式検証結果記憶領域205に格納する。
 図12は、本例における、等価性検証式検証部115による各パス等価性検証式の検証結果1200の例である。変更前スナップショットと変更後スナップショットの組み合わせ9通りのうち、全てに対してパス等価性検証式が充足不可能であると判定されるため、変更後ソースコードC100と変更後ソースコードC200は等価と判定される。
 修正候補生成部116は、非等価の場合の変更後ソースコードを等価にする修正操作を生成するが、本例においては等価と判定されるため何も実行しない(P160)。
 図13は、検証結果リポートの例である。検証結果生成部117は、検証結果に基づき、図13に示すような検証結果リポート500を生成する(P170)。
 検証結果リポート500には、検証結果510として、全てのパス等価性検証式が充足不可能な場合には「等価」と、いずれかが充足可能な場合には「非等価」と表示される。本例では、全てのパス等価性検証式が充足不可能と記録されているため検証結果510は「等価」と表示されている。
 また、検証結果リポート500は、変更前/後ソースコード記憶領域201に格納されているソースコード情報を用いて、変更前ソースコード521および変更後ソースコード522の表示を含んでも良い。
 さらに、検証結果リポート500は、変更前/後記号実行結果記憶領域203に格納されている記号実行サマリ情報を用いて、変更前記号実行サマリ531および変更後記号実行サマリ532の表示を含んでも良い。図13における記号実行サマリ表示531および532においては、スナップショットごとにそのパス制約と変数状態とを1行で表示している。
 図8と図14から図22を用いて、実施例2のソースコード等価性検証装置の処理の具体例について説明する。本実施例では、変更前ソースコードの特定のパスを通ったときと変更後ソースコードの特定のパスを通ったときとの間の等価性(パス等価性と呼ぶ)を、全てのパスの組み合わせに対して検証することにより等価性検証を実現する。
 図14は、非等価となるように変更した変更後ソースコードの例である。以下、図8に示すソースコード等価性検証の処理過程に関して、変更前ソースコードとして図1に示す変更前ソースコードC100を、C100と非等価な変更である変更後ソースコードとして図14に示す変更後ソースコードC300を入力した場合を例として説明する。
 図15は、図8の各ステップ処理における処理内容は上述の通りであり、記号実行計算部113の処理(P131)において、変更後ソースコードC300からは図15に示すような実行木S300および記号実行サマリS320が生成される。
 等価性検証式生成部114では、上述の通り、変更前スナップショットと変更後スナップショットとの組み合わせのそれぞれに対して、パス制約連言式、パス制約等価判定式、およびパス等価性検証式を生成する(P140)。例えば変更前記号実行サマリS120中のスナップショットS109と変更後記号実行サマリS322中のスナップショットS221を選択した際、パス制約連言式は、(¬(γ=1)∧(α>1))∧¬(γ=1)、パス制約等価性検証式は、((¬(γ=1)∧(α>1))∧¬(¬(γ=1)))∨(¬(¬(γ=1)∧(α>1))∧¬(γ=1))、パス等価性検証式は、¬((R=R’)∧(g=g’))∧(¬(γ=1)∧(α>1)∧(g=γ-1)∧(R=α))∧(¬(γ=1)∧(g’=γ-1)∧(R’=-α))となる。
 等価性検証式検証部115は、生成された全てのパス制約連言式、パス制約等価判定式、およびパス等価性検証式の充足可能性をSATソルバ等により判定することにより、等価判定を行う。
 図16は、各パス等価性検証式の検証結果である。例えば変更前記号実行サマリS120中のスナップショットS109と変更後記号実行サマリS322中のスナップショットS221を選択した際のパス等価性判定式は、充足可能であり、α=2、γ=0、R=2、g=-1、R’=-2、g’=-1という反例が得られるので、それらを記録する。
 図17は、修正候補生成部116のステップP160における処理フローチャートである。修正候補生成部116は、等価性検証式検証部115が判定する各式の充足結果を便宜上、変更前のスナップショットを行に並べて、変更後のスナップショットを列に並べた表形式にして、等価性検証式検証部115による検証結果をマスに記載した検証表(図18参照)を用いて説明する。本例では、図16に示す充足判定結果は、図18の検証表1800となる。行方向に変更前スナップショット、列方向に変更後スナップショットを並べ、各マスに、パス制約連言式、パス制約等価判定式、およびパス等価性検証式の充足可能性の判定結果を記載する。パス制約連言式が充足不可のマスでは、パス制約連言不可として他の判定結果は省略する。パス制約連言式が充足可の場合は、パス制約等価判定式の充足結果を表す。パス制約等価判定式が充足可能の場合は、変更前スナップショットのパス制約と変更後スナップショットのパス制約が非等価のため、パス制約非等価と表わし、充足不可の場合はパス制約等価と表わす。パス等価性検証式が充足不可能の場合は、変更前スナップショットのパス制約と変更後スナップショットのパス制約が示すパスの範囲において変数出力状態が等価であることを意味するため、変数状態等価と表わし、充足可能の場合は変数状態非等価と表す。
 修正候補生成部116は、検証表の中に変数状態非等価のマスが存在しなければ、等価と判定し、処理を終了する(P162)。少なくとも1つの変数状態が非等価のとき、変数状態が非等価のマスに着目する(P163)。本例では、図18の検証表1800において変更前スナップショットS109と変更後スナップショットS322に対応するマス1804が変数状態非等価のため、このマス1804に着目する。
 修正候補生成部116は、着目したマスがパス制約等価である場合、ステップP165へ進み、パス制約非等価の場合は、ステップP166へ進む(P163)。
 変更前のスナップショットのパス制約と変更後のスナップショットのパス制約が等価である場合、両者は同等の条件分岐を経てスナップショットを生成しているが、変数状態が異なっているため非等価であるという状況である。変更後のスナップショットの変数状態を変更前のスナップショットの変数状態に置き換えると、着目したマスにおいて等価となるため、修正候補生成部116は、着目したマスの変更後のスナップショットの変数状態を変更前のスナップショットの変数状態に置き換える操作を、修正候補として修正候補記憶領域206に保存し(P165)、ステップP161に進む。
 修正候補生成部116は、検証表1800の中の着目しているマスの縦方向に走査し、パス制約非等価である他のマスを探し、パス制約非等価である他のマスが存在する場合は、ステップP167へ進む。存在しない場合、ステップP168へ進む(P166)。
 パス制約非等価である他のマスが存在する場合は、着目しているマスはパス制約が非等価で変数状態も非等価であり、その着目しているマスから縦方向にパス制約非等価の他のマスが存在する状態である。縦方向にパス制約非等価の他のマスが存在するというのは、着目しているマスの変更後スナップショットのパス制約は、縦方向に存在するパス制約非等価のマスの変更前スナップショットのパス制約とも、重なる部分を持つことを示す。よって、修正候補生成部116は、着目しているマスの変更後スナップショットを、着目しているマスの変更前スナップショットのパス制約を用いて分解する操作を修正候補として修正候補記憶領域206に保存し(P167)、ステップP161に進む。
 本例では、修正候補生成部116は、図18において、マス1804に着目しており、マス1803が縦方向に存在するパス制約非等価の他のマスとなるため、ステップP166において、マス1803を検知し、ステップP167に進む。修正候補生成部116は、マス1803における変更前スナップショットS113のパス制約¬(γ=1)∧¬(α>1)を分解基準とし、マス1804の変更後スナップショットS322のパス制約¬(γ=1)を分解対象として、分解する(P167)。分解基準と分解対象はそれぞれパス制約のため、複数の制約項を連言でつないだ形をとる。分解の際は、分解基準から、分解基準と分解対象に共通で現れている制約項を取り除く。ここで本例では、共通で現れる制約項は、¬(γ=1)であるため、分解基準は¬(α>1)とする。この分解基準を分解対象に肯定と否定で付加することで、マス1803を分解する。
 図19は、スナップショット分解操作と変数状態の変更操作の例であり、変更後スナップショットS322をスナップショットS3221とスナップショットS3222に分解した結果である。スナップショットS3221のパス制約は、分解基準の肯定である¬(α>1)を付加されており、他方のスナップショットS3222のパス制約は分解基準の否定である¬(¬(α>1))を付加されている。両スナップショットの変数状態は分解前と同様である。修正候補生成部116は、この分解操作を修正候補記憶領域206に保存する。
 修正候補生成部116は、検証表1800の中の着目しているマスの横方向に走査し、パス制約非等価である他のマスを探し、パス制約非等価である他のマスが存在する場合はステップP169へ進む(P168)。存在しなかった場合、修正候補無しとして修正候補生成部116は、処理を終了する。
 パス制約非等価である他のマスが存在する場合は、着目しているマスはパス制約が非等価で変数状態も非等価であり、その着目しているマスから横方向にパス制約非等価のマスが存在する状態である。この横方向にパス制約非等価のマスが存在するというのは、着目しているマスの変更前スナップショットのパス制約は、その横方向に存在するパス制約非等価の他のマスの変更後スナップショットのパス制約とも、重なる部分を持つことを示す。よって、修正候補生成部116は、着目しているマスの変更後スナップショットと、横方向に存在するパス制約非等価の他のマスの変更後スナップショットを統合する操作を修正候補として、修正候補記憶領域206に保存し(P169)、ステップP161に進む。統合操作は、両スナップショットのパス制約は選言で結合し、変数状態はどちらか任意の変数状態を採用する。
 修正候補生成部116は、修正候補記憶領域206に保存された変数状態の変更操作、パス制約の分解操作、またはパス制約の統合操作を用いて、検証表1800の再構築する(P161)。本例では、変更後スナップショットS322が、スナップショットS3221とスナップショットS3222に分解操作されているため、修正候補生成部116は、図18の列1805を分割して、図20に示す検証表2000を作成し、分解されたスナップショットを用いて改めて各マスのパス制約連言式、パス制約等価判定式、パス等価性検証式の充足可能性を判定し、検証表を更新する。修正候補生成部116は、検証表を再構築後に、ステップP162に戻り同じ処理を繰り返す。
 本例では、図20の検証表2000は、変更前スナップショットS109と変更後スナップショットS3222の組み合わせであるマス2001が、ステップP163において着目され、着目されたマスのパス制約が等価であるため、ステップP165に進み、修正候補生成部116は、変更後スナップショットS3222の変数状態を、変更前スナップショットS109の変数状態に置き換える操作を、修正候補記憶領域206に保存する。この変更前スナップショットS109の変数状態に置き換える操作を適用した、修正後のスナップショットは、図19のスナップショットS3223となり、修正候補生成部116は、ステップP161に進む。修正候補生成部116は、ステップP161では、図20におけるスナップショットS3222を、図19のスナップショットS3223に置き換え、図21に示すような検証表2200を構築する。検証表2200では、検証表2000で変数状態が非等価であったマス2001が、マス2201のように修正される。以上の操作によって、検証表2200には変数状態が非等価であるマスが存在しないため、ステップP162において、修正候補生成を終了する。修正候補生成を終了した際は修正候補記憶領域206に保存された操作を変更後ソースコードに適用することで、変更前ソースコードと論理的に等価になる。
 図22は、検証結果生成部117が生成する検証結果リポート600の例である。検証結果リポート600には、検証結果表示610として、全てのパス等価性検証式検証結果が充足不可能な場合に「等価」、充足可能なパス等価性検証式がある場合に「非等価」と表示される。本例では、例えばスナップショットS109とスナップショットS322を選択したときのパス等価性検証式が充足可能であるため「非等価」と表示される。
 検証結果リポート600には、変更前/後記号実行結果記憶領域203に格納されている記号実行サマリ情報を用いて、変更前記号実行サマリ631および変更後記号実行サマリ632の表示を含んでも良い。このとき、変更後記号実行サマリ632の表示に、スナップショットの検証結果639を表示することができる。
 スナップショットの検証結果639は、図16に示す各パス等価性検証式の検証結果1602を参照し、当該スナップショットを選択したパス等価性検証式の検証結果の全てが充足不可能であれば「等価」、充足可能なパス等価性検証式があれば「非等価」を表示する。本例では、スナップショットS104を選択している全てのパス等価性検証式、スナップショットS113を選択している全てのパス等価性検証式、および、スナップショットS321を選択している全てのパス等価性検証式は充足不可能であるため、対応する検証結果が「等価」と表示されている。一方、それ以外のスナップショットにおいては、充足可能なパス等価性検証式を含むため「非等価」と表示されている。
 検証結果リポートは、等価性検証式検証結果記憶領域205に格納されている反例情報を用いて、非等価となるような反例情報640の表示を含んでも良い。この時、記号実行サマリの表示中にスナップショットを選択するためのチェックボックス638を設け、選択したスナップショットの組み合わせに対するパス等価性検証式の反例を表示するようにしても良い。
 図22に示す例では、スナップショットS103とスナップショットS322に対応するチェックボックスを選択した際に、図16にあるスナップショットS109とスナップショットS322から生成されたパス等価性検証式の反例1601から得られた情報が表示されている。
 検証結果リポート600には、さらに、変更前/後ソースコード記憶領域201に格納されているソースコード情報を用いて、変更前ソースコード621および変更後ソースコード622の表示を含んでも良い。このとき、スナップショットを選択するためのチェックボックス638を用いて選択されたスナップショットに対して、当該スナップショットが持つ位置情報から、ソースコード上においてそのスナップショットの経路を表示させても良い。
 図22に示す例では、変更前ソースコード621上に、スナップショットS109の位置情報を用いてスナップショットS109の経路を下線で表示している。また、変更後ソースコード622上に、スナップショットS322の位置情報を用いてスナップショットS322の経路を下線で表示している。
 経路を表示する方法としては、図22に示す下線で表示する方法の他にも、背景を別の色で表示する、字体や文字サイズを変えて強調表示する、経路以外の部分の表示を消去して経路のみを表示するようにするなど、他の部分と異なる態様で表示する。
 あるスナップショットの組み合わせに対する等価性検証結果が非等価であり、非等価である原因を調査する場合、そのスナップショットの経路上に原因が存在しており、経路以外の箇所は当該スナップショットの結果には影響を与えないため調査不要である。
 選択したスナップショットに対応する経路がソースコード上に表示され、また、それらの組み合わせに対応する反例が表示されることにより、非等価となる入力および出力に対して、開発者がソースコード上で調査すべき範囲を絞り込むことが可能となり、非等価である原因を発見することが容易となる。
 検証結果リポート600には、修正候補記憶領域206に格納されている修正候補情報を用いて、変更後記号実行サマリ632の修正対象箇所に対して、等価となるための修正候補2501の表示を含んでも良い。
 図22に示す例では、変更後のスナップショットS322に対して、図19に示すスナップショットS3221とS3222への分解操作が修正候補として修正候補記憶領域206に格納されているため、スナップショットS3221に対応する分解後スナップショット2502とスナップショットS3222に対応する分解後スナップショット2503が表示される。また、分解後の操作として、スナップショットS3222をスナップショットS3223に変数状態を修正する操作が修正候補として修正候補記憶領域206に格納されているため、分解後スナップショット2503の変数状態2504に、その変数状態の置き換えを反映して表示されている。
 修正候補を表示する方法としては、図22に示す変更後記号実行サマリに修正候補を表示する方法の他にも、変更後ソースコードの選択したスナップショットに対応する経路上に修正候補を表示するなどの方法がある。
 非等価であるスナップショットの組み合わせに対して、変更後スナップショットのパス制約と変数状態をどのように修正すれば等価となるかという修正候補が表示されることにより、非等価となる入力および出力に対して、開発者がソースコード上で修正すべき箇所や修正方法を絞り込むことが可能となり、非等価を修正することが容易となる。
 検証結果リポート600には、変更前/後ソースコード記憶領域201に格納されているソースコード情報と修正候補記憶領域206に格納されている修正候補情報を用いて、変更後ソースコード622に対して修正候補を適用し、変更前ソースコードと論理的に等価となるように修正された修正後ソースコード2505の表示を含んでも良い。
 図22に示す例では、修正候補記憶領域206に格納されている修正候補情報は、まず、分解基準を¬(α>1)とする変更後スナップショットS322の分解である。その分解基準によってif文による分岐を、変更後スナップショットS322の通る経路上である修正後ソースコード2505の7行目に加え、分解基準の否定の経路を示すelse文による分岐を10行目に追加している。分解されたスナップショットS3221、つまり図22における分解後スナップショット2502は、変数状態に変更は無いため8行目と9行目はそのままとなる。分解されたスナップショットS3222は、変数状態の変更操作がされてスナップショットS3223となるため、修正後ソースコード2505の11行目は変更された変数状態を実現するソースコードとなる。
 このとき、パス制約の分解操作や変数状態の変更操作によって修正された箇所を下線で表示している。修正箇所を表示する方法としては、図22に示す下線で表示する方法の他にも、背景を別の色で表示する、字体や文字サイズを変えて強調表示する、修正箇所以外の部分の表示を消去して経路のみ表示されるようにするなど、他の部分と異なる態様で表示する。
 修正後ソースコードは、論理的に変更前ソースコードと等価となるような修正を機械的に適用したソースコードのため、可読性や保守性が低くなる可能性があり、そのまま用いることが困難な可能性がある。しかし、非等価である変更前/後ソースコードに対して、変更後ソースコードにどのような修正を行うと変更前ソースコードと等価になるかを示すことにより、開発者がソースコード上でどのように修正するかを検討することが容易となる。
 1000…ソースコード等価性検証装置、101…CPU、102…主記憶装置、103…ネットワークI/F、104…グラフィックI/F、105…入出力I/F、106…補助記憶装置I/F、110…制御部、120…表示・出力装置、121…出力装置、130…入力装置、131…キーボード、132…マウス、140…記憶部、141…HDD、142…DVDドライブ、150…外部ネットワーク、160…外部計算機、200…ソースコード等価性検証プログラム、201…変更前/後ソースコード記憶領域、202…変更前/後構造グラフ記憶領域、203…変更前/後記号実行結果記憶領域、204…等価性検証式記憶領域、205…等価性検証式検証結果記憶領域、206…修正候補記憶領域、207…検証結果記憶領域、111…ソースコード入力部、112…構造グラフ生成部、113…記号実行計算部、114…等価性検証式生成部、115…等価性検証式検証部、116…修正候補生成部、117…検証結果生成部、C100,C200、C300…ソースコード、S100、S200、S300…記号実行の実行木、S120、S220、S320…記号実行サマリ、S104、S109、S113、S221~S223、S321~S323…記号実行におけるスナップショット、S101a…記号実行木のノードのパス制約、S101b…記号実行木のノードの変数状態、S101c…記号実行木のノードの位置情報、N100…構造グラフ、1800、2000、2200…検証表、500、600…検証結果リポート。

Claims (12)

  1.  変更前ソースコードと変更後ソースコードに対して、それぞれ記号実行する記号実行計算部、
     前記記号実行計算部の記号実行結果を用いて、前記変更前ソースコードと前記変更後ソースコードとの等価性検証式を生成する等価性検証式生成部、
     前記等価性検証式生成部で生成された前記等価性検証式を検証する等価性検証式検証部、
     前記等価性検証式検証部による前記等価性検証式の検証結果が、前記変更前ソースコードと前記変更後ソースコードとが非等価の場合、前記変更前ソースコードと前記変更後ソースコードとが等価になるための修正候補を生成する修正候補生成部、および、
     前記等価性検証式検証部による前記検証結果と前記修正候補生成部による前記修正候補を用いて、検証結果リポートを生成する検証結果生成部を有することを特徴とするソースコード等価性検証装置。
  2.  請求項1に記載のソースコード等価性検証装置において、前記等価性検証式生成部は、前記等価性検証式として、前記変更前ソースコードおよび前記変更後ソースコードの記号実行サマリを構成する各スナップショットの組み合わせに対するパス制約連言式、パス制約等価判定式、およびパス等価性検証式を生成することを特徴とするソースコード等価性検証装置。
  3.  請求項2に記載のソースコード等価性検証装置において、前記等価性検証式検証部は、前記パス制約連言式、前記パス制約等価判定式、および前記パス等価性検証式を検証することを特徴とするソースコード等価性検証装置。
  4.  請求項3に記載のソースコード等価性検証装置において、前記等価性検証式検証部による前記検証結果が、前記変更前ソースコードと前記変更後ソースコードとが非等価の場合、前記修正候補生成部は、前記変更後ソースコードが前記変更前ソースコードに等価になるための前記修正候補となる、変数状態の変更操作、パス制約の分解操作、およびパス制約の統合操作の少なくとも一つ操作を生成することを特徴とするソースコード等価性検証装置。
  5.  請求項4に記載のソースコード等価性検証装置において、前記等価性検証式検証部による前記検証結果が非等価である場合、前記検証結果生成部は、前記修正候補生成部が生成する前記検証結果リポートに前記操作の表示を含むことを特徴とするソースコード等価性検証装置。
  6.  請求項4に記載のソースコード等価性検証装置において、前記等価性検証式検証部による前記検証結果が非等価の場合、前記検証結果生成部は、前記修正候補生成部が生成する前記操作を、前記変更後ソースコードに適用し、前記変更前ソースコードと等価になるように修正された前記変更後ソースコードを、前記検証結果リポートに含むことを特徴とするソースコード等価性検証装置。
  7.  ソースコード等価性検証装置によるソースコード等価性検証方法であって、前記ソースコード等価性検証装置は、
     変更前ソースコードと変更後ソースコードのそれぞれを記号実行し、
     前記記号実行の結果を用いて、前記変更前ソースコードと前記変更後ソースコードとの等価性検証式を生成し、
     前記等価性検証式を検証し、
     前記等価性検証式の検証結果が、前記変更前ソースコードと前記変更後ソースコードとが非等価の場合、前記変更前ソースコードと前記変更後ソースコードとが等価になるための修正候補を生成し、
     前記等価性検証式の前記検証結果と前記修正候補を用いて、検証結果リポートを生成することを特徴とするソースコード等価性検証方法。
  8.  請求項7に記載のソースコード等価性検証方法において、前記ソースコード等価性検証装置は、
     前記等価性検証式として、前記変更前ソースコードおよび前記更後ソースコードの記号実行サマリを構成する各スナップショットの組み合わせに対するパス制約連言式、パス制約等価判定式、およびパス等価性検証式を生成することを特徴とするソースコード等価性検証方法。
  9.  請求項8に記載のソースコード等価性検証方法において、前記ソースコード等価性検証装置は、
     前記パス制約連言式、前記パス制約等価判定式、および前記パス等価性検証式を検証することを特徴とするソースコード等価性検証方法。
  10.  請求項9に記載のソースコード等価性検証方法において、前記ソースコード等価性検証装置は、
     前記検証結果が、前記変更前ソースコードと前記変更後ソースコードとが非等価の場合、前記変更後ソースコードが前記変更前ソースコードに等価になるための前記修正候補となる、変数状態の変更操作、パス制約の分解操作、およびパス制約の統合操作の少なくとも一つ操作を生成することを特徴とするソースコード等価性検証方法。
  11.  請求項10に記載のソースコード等価性検証方法において、前記ソースコード等価性検証装置は、
     前記検証結果が非等価の場合、前記検証結果リポートに前記操作の表示を含むことを特徴とするソースコード等価性検証方法。
  12.  請求項10に記載のソースコード等価性検証方法において、前記ソースコード等価性検証装置は、
     前記検証結果が非等価の場合、前記操作を、前記変更後ソースコードに適用し、前記変更前ソースコードと等価になるように修正された前記変更後ソースコードを、前記検証結果リポートに含むことを特徴とするソースコード等価性検証方法。
PCT/JP2015/062852 2015-04-28 2015-04-28 ソースコード等価性検証装置、および、ソースコード等価性検証方法 WO2016174743A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/JP2015/062852 WO2016174743A1 (ja) 2015-04-28 2015-04-28 ソースコード等価性検証装置、および、ソースコード等価性検証方法
JP2017515328A JP6419953B2 (ja) 2015-04-28 2015-04-28 ソースコード等価性検証装置、および、ソースコード等価性検証方法
CN201580078612.5A CN107533464A (zh) 2015-04-28 2015-04-28 源代码等价性检查装置以及源代码等价性检查方法
US15/561,207 US20180181485A1 (en) 2015-04-28 2015-04-28 Source code equivalence verification device and source code equivalence verification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/062852 WO2016174743A1 (ja) 2015-04-28 2015-04-28 ソースコード等価性検証装置、および、ソースコード等価性検証方法

Publications (1)

Publication Number Publication Date
WO2016174743A1 true WO2016174743A1 (ja) 2016-11-03

Family

ID=57199649

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/062852 WO2016174743A1 (ja) 2015-04-28 2015-04-28 ソースコード等価性検証装置、および、ソースコード等価性検証方法

Country Status (4)

Country Link
US (1) US20180181485A1 (ja)
JP (1) JP6419953B2 (ja)
CN (1) CN107533464A (ja)
WO (1) WO2016174743A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018133034A (ja) * 2017-02-17 2018-08-23 三菱重工エンジニアリング株式会社 ソフトウェア試験装置、ソフトウェア試験システム、ソフトウェア試験方法およびプログラム
KR20190129549A (ko) * 2018-05-11 2019-11-20 니덱모빌리티코리아 주식회사 비언어 요구사항 정보에 대한 소스코드 추적이 가능한 시스템 및 방법
JP2020038521A (ja) * 2018-09-05 2020-03-12 株式会社日立製作所 ソースコード生成支援装置およびソースコード生成支援方法
US11461079B2 (en) 2020-06-22 2022-10-04 Fujitsu Limited Non-transitory computer-readable medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10176086B2 (en) * 2016-10-03 2019-01-08 Fujitsu Limited Event-driven software test sequence determination
US20180240356A1 (en) * 2017-02-21 2018-08-23 Microsoft Technology Licensing, Llc Data-driven feedback generator for programming assignments
US11487641B1 (en) * 2019-11-25 2022-11-01 EMC IP Holding Company LLC Micro services recommendation system for identifying code areas at risk
CN113110874B (zh) * 2021-04-14 2024-05-17 北京沃东天骏信息技术有限公司 用于生成代码结构图的方法和装置
CN117743658B (zh) * 2024-02-20 2024-04-19 成都融见软件科技有限公司 一种约束信息的集中可视化方法、电子设备及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014126985A (ja) * 2012-12-26 2014-07-07 Hitachi Ltd ソースコード等価性検証装置、および、ソースコード等価性検証方法
JP2014186477A (ja) * 2013-03-22 2014-10-02 International Business Maschines Corporation 情報処理装置、情報処理方法、及び、プログラム

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6553362B2 (en) * 2000-07-14 2003-04-22 Hewlett-Packard Development Company, L.P. Case-reduced verification condition generation system and method using weakest precondition operator expressed using strongest postcondition operators
US20060041873A1 (en) * 2004-08-19 2006-02-23 Cisco Technology, Inc. Computer system and method for verifying functional equivalence
US8683441B2 (en) * 2006-01-11 2014-03-25 International Business Machines Corporation Software equivalence checking
CN103645987B (zh) * 2013-12-20 2016-01-20 南京大学 基于代码生成和符号执行的访问控制策略测试自动生成方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014126985A (ja) * 2012-12-26 2014-07-07 Hitachi Ltd ソースコード等価性検証装置、および、ソースコード等価性検証方法
JP2014186477A (ja) * 2013-03-22 2014-10-02 International Business Maschines Corporation 情報処理装置、情報処理方法、及び、プログラム

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MASATOSHI YOSHIDA: "Shiyo Kijutsu o Hitsuyo to shinai Yukai Regression Kenchi Framework no Teian", LECTURE NOTE/SOFTWARE GAKU 36, SOFTWARE KOGAKU NO KISO XVII, 30 November 2010 (2010-11-30), pages 181 - 182 *
TAKESHI MATSUMOTO: "C Base Koi Sekkei ni Okeru Tokasei Kensho Framework to Hanrei Kaiseki Shuho no Teian", THE 18TH WORKSHOP ON CIRCUITS AND SYSTEMS IN KARUIZAWA RONBUNSHU, 26 April 2005 (2005-04-26), pages 557 - 562 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018133034A (ja) * 2017-02-17 2018-08-23 三菱重工エンジニアリング株式会社 ソフトウェア試験装置、ソフトウェア試験システム、ソフトウェア試験方法およびプログラム
WO2018151277A1 (ja) * 2017-02-17 2018-08-23 三菱重工エンジニアリング株式会社 ソフトウェア試験装置、ソフトウェア試験システム、ソフトウェア試験方法およびプログラム
US10915438B2 (en) 2017-02-17 2021-02-09 Mitsubishi Heavy Industries Engineering, Ltd. Software-testing device, software-testing system, software-testing method, and program
KR20190129549A (ko) * 2018-05-11 2019-11-20 니덱모빌리티코리아 주식회사 비언어 요구사항 정보에 대한 소스코드 추적이 가능한 시스템 및 방법
KR102091420B1 (ko) * 2018-05-11 2020-03-20 니덱모빌리티코리아 주식회사 비언어 요구사항 정보에 대한 소스코드 추적이 가능한 시스템 및 방법
JP2020038521A (ja) * 2018-09-05 2020-03-12 株式会社日立製作所 ソースコード生成支援装置およびソースコード生成支援方法
US11461079B2 (en) 2020-06-22 2022-10-04 Fujitsu Limited Non-transitory computer-readable medium

Also Published As

Publication number Publication date
US20180181485A1 (en) 2018-06-28
JP6419953B2 (ja) 2018-11-07
JPWO2016174743A1 (ja) 2018-01-25
CN107533464A (zh) 2018-01-02

Similar Documents

Publication Publication Date Title
JP6419953B2 (ja) ソースコード等価性検証装置、および、ソースコード等価性検証方法
Gervasi et al. Lightweight validation of natural language requirements
US20160034270A1 (en) Estimating likelihood of code changes introducing defects
US20170235661A1 (en) Integration of Software Systems via Incremental Verification
US8515727B2 (en) Automatic logic model build process with autonomous quality checking
Könighofer et al. Repair with on-the-fly program analysis
Segall et al. Simplified modeling of combinatorial test spaces
Lahiri et al. Automatic rootcausing for program equivalence failures in binaries
Schneid et al. Automated regression tests: a no-code approach for BPMN-based process-driven applications
Brown et al. Guidance for using formal methods in a certification context
Sun et al. BPELDebugger: An effective BPEL-specific fault localization framework
US10970183B1 (en) System and method for improving model performance
JP6279750B2 (ja) ソースコード等価性検証装置
Khalid Towards an automated tool for software testing and analysis
Sinha et al. Reliability and availability prediction of embedded systems based on environment modeling and simulation
Liu et al. Using contracts and boolean queries to improve the quality of automatic test generation
Manolios et al. A model-based framework for analyzing the safety of system architectures
CN110399156B (zh) 面向航天软件的在轨升级方法
Erazo et al. Maritaca: from textual use case descriptions to behavior models
JP2016126700A (ja) プログラム検証装置、プログラム検証方法及びプログラム検証プログラム
Burnard et al. Verifying and validating automatically generated code
WO2016151703A1 (ja) ソースコード等価性検証装置、および、ソースコード等価性検証方法
Ukai et al. Test design as code: JCUnit
Chaari et al. Efficient exploration of safety-relevant systems through a link between analysis and simulation
Yayan et al. Tailored Mutation-based Software Fault Injection Tool (IM-FIT) for Industrial Robotic Systems

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: 15890727

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15561207

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2017515328

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15890727

Country of ref document: EP

Kind code of ref document: A1