IC3 accelerated verification method and system based on unsatisfactory core
By constructing an unsatisfiable kernel library, the IC3 algorithm can be solved quickly using existing unsatisfiable kernel information. This solves the problem of excessively long solution time for the IC3 algorithm in the verification of complex software programs, reduces the number of constraint solutions by 50%, and improves verification efficiency.
Patent Information
- Application Number
- CN202411388748.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The IC3 algorithm frequently calls the SMT solver when verifying complex software programs, resulting in excessively long solution times. Furthermore, it fails to effectively reuse existing solution information, leading to repeated calculations and impacting verification efficiency.
An unsatisfiable kernel library is constructed, which can be used to quickly solve the subsequent parts of the problem, reducing the number of SMT solutions and time. The unsatisfiable kernel library is initialized in the IC3 algorithm, and the library is checked for the existence of a matching unsatisfiable kernel before solving to skip duplicate solutions.
Significantly reduces the number of constraint solutions, shortens the solution time, and improves the speed and efficiency of software program verification, with the number of constraint solutions reduced by 50%.
Smart Images

Figure CN118897808A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software engineering, and in particular to an IC3 accelerated verification method and system based on unsatisfiable cores. Background Art
[0002] Model checking is an automated technique used to verify that a system design meets specific specifications. It is primarily used in hardware circuits, software programs, and protocol verification. It systematically checks all possible states of a model to ensure that its behavior conforms to expectations. As system size and complexity increase, traditional model checking methods face the problem of state space explosion, significantly reducing the efficiency and feasibility of the verification process.
[0003] The IC3 (Incremental Construction of Inductive Clauses for IndubitableCorrectness) algorithm, an incremental state-space search method, has made significant progress in this field. The IC3 algorithm is an incremental state-space search algorithm for incremental verification, primarily used in the verification of hardware and software systems. Proposed by Aaron Bradley in 2011, the IC3 algorithm quickly became a key technology in symbolic model checking for its efficiency and flexibility. The core idea of the IC3 algorithm is to gradually construct a set of inductive clauses that can prove the safety of a system. The algorithm iteratively enhances this set of clauses until all reachable states are covered, ensuring that all states of the system satisfy the given safety properties. The IC3 algorithm uses a recursive and incremental approach to verify invariants. Through recursive solution, the algorithm gradually generates and verifies new clauses, adding only necessary clauses at each iteration, avoiding large computational overhead. This incremental construction approach enables the algorithm to efficiently handle large state spaces. IC3 primarily involves two phases: the blocking phase and the propagation phase. The main purpose of the blocking phase is to ensure that inductive clauses hold in the system through conflict analysis and counterexample blocking. The main purpose of the propagation phase is to verify and strengthen the system's inductive clauses by gradually propagating reachable states through forward state expansion.
[0004] The IC3 algorithm is based on the SMT (Satisfiability Modulo Theories) solver. The SMT solver is used to determine whether a logical formula is satisfiable under a specific theory. In the IC3 algorithm, the SMT solver is used in several key steps, including state verification, clause generation, and conflict analysis. A clause is a disjunction composed of several literals, such as A cube is a conjunction of several literals, such as A literal is a propositional variable or its negation. For example, if x is a propositional variable, then x or ¬x is a literal, " " indicates logical AND, " " represents logical negation. However, the SMT solver is called too many times throughout the process. As the complexity of the test case increases, the number of solves and the solution time also increase. The SMT solution time accounts for a large proportion of the entire process. The Unsatisfiable Core (UNSAT Core) is an important information that appears when solving Boolean formulas. When using an SMT (Satisfiability Modulo Theories) solver to verify a logical formula, if the formula is found to be unsatisfiable, the SMT solver will return the Unsatisfiable Core, which is the smallest subset that causes the formula to be unsatisfiable. Summary of the Invention
[0005] Technical problem to be solved by the present invention: In response to the above-mentioned problems of the prior art, an IC3 accelerated verification method and system based on unsatisfiable cores are provided. The present invention aims to utilize the similarities between a large number of constraint solutions in the IC3 algorithm, construct an unsatisfiable core library according to the previous constraint solutions, and quickly implement the solution of the subsequent part of the problem based on the existing unsatisfiable cores, which can reduce the number of SAT solutions and thus reduce the running time of the IC3 algorithm, thereby accelerating the verification speed of the IC3 algorithm.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: An IC3 accelerated verification method based on unsatisfiable cores is used to verify a software program model modeled using the Lustre language. The IC3 accelerated verification method includes inputting the Lustre file of the program model to be verified into an IC3 algorithm model using an SMT solver to solve the model to obtain a verification result of whether the program model to be verified meets the specified security attributes or specifications. The IC3 algorithm model using the SMT solver to solve the model includes: initializing an unsatisfiable core library, the unsatisfiable core library is used to store the unsatisfiable cores obtained from the solver in the previous solving process, and each time the IC3 algorithm model calls the SMT solver to perform a formula Before solving, the unsatisfiable core library is checked. If an unsatisfiable core matching the current formula is found in the unsatisfiable core library, the unsatisfiable core is directly obtained and the solution process of calling the SMT solver is skipped. Otherwise, the SMT solver is called to solve the formula. After calling the SMT solver to solve the formula, if the SMT solver determines that the current formula is unsatisfiable, the unsatisfiable core returned by the SMT solver is updated to the unsatisfiable core library. If the SMT solver determines that the current formula is satisfiable, the SMT solver returns a set of assignments that satisfy the current formula. The unsatisfiable core library includes an unsatisfiable core library for storing unsatisfiable cores matching the formula shown in the following formula: , In the above formula, Security attributes are used to define security conditions or constraints that a software system should satisfy. is the forward state set, which is the state set that can be reached from the initial state set I through the k-step migration relation T. The forward state set is in conjunction normal form, and its format is ,in ~ For clauses, is logical AND; To transfer the relationship in one step; For clause, clause ,in ~ For text, is a logical OR; For Clause After one step of migration, the negative state is a logical NOT; the unsatisfiable core library further includes an unsatisfiable core library for storing unsatisfiable cores matching the formula shown below: , In the above formula, is the initial state set, For clause, clause ,in ~ For text, is a logical OR, For logical AND, It is logical NOT.
[0007] Optionally, the checking of the unsatisfiable core library before each call of the SMT solver to solve a formula in the IC3 algorithm model includes: arranging the clauses and texts of the formula to be solved in an orderly manner into a formula information list; traversing the unsatisfiable core library to determine whether there is an unsatisfiable core included in the formula information list in the unsatisfiable core library; if there is an unsatisfiable core included in the formula information list, determining that an unsatisfiable core matching the current formula is found in the unsatisfiable core library; otherwise, determining that no unsatisfiable core matching the current formula is found in the unsatisfiable core library.
[0008] Optionally, the unsatisfiable core library is a list of variable length composed of units, and each unit is a list for storing an unsatisfiable core matching a specified formula.
[0009] Optionally, after calling the SMT solver to solve the formula, if the SMT solver determines that the current formula is unsatisfiable, the unsatisfiable core returned by the SMT solver is updated to the unsatisfiable core library, including: obtaining the result of calling the SMT solver to solve the formula, if the result of the formula solution is that the current formula is satisfiable, the SMT solver returns a set of assignments that satisfy the current formula; if the result of the formula solution is that the current formula is unsatisfiable, obtaining the unsatisfiable core of the current formula through the SMT solver, and converting the unsatisfiable core information returned by the SMT solver into a format suitable for storage in the unsatisfiable core library, and storing it in the unsatisfiable core library.
[0010] Optionally, the execution steps of the IC3 algorithm model include: Initialize loop variable k; Forward process: Execute the forward solution of IC3 algorithm and call SMT solver to solve the formula. If the solution reaches the fixed point, the property is determined to be true, and the program model to be verified meets the specified security property or specification verification result, and then the process ends and exits. If the solution does not reach the fixed point, the process enters the block process. Block process: Executes the block process of the IC3 algorithm and calls the SMT solver to solve the formula. If a true counterexample is found after the solution, the property is judged to be invalid, and the program model to be verified does not meet the specified security properties or standard verification results, and the process ends and exits. If no true counterexample is found, the loop variable k is increased by 1 and the forward process is entered.
[0011] In addition, the present invention also provides an IC3 accelerated verification system based on an unsatisfiable core, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the IC3 accelerated verification method based on an unsatisfiable core.
[0012] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program or instruction. The computer program or instruction is programmed or configured to execute the IC3 accelerated verification method based on unsatisfiable cores through a processor.
[0013] In addition, the present invention also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the unsatisfiable core-based IC3 accelerated verification method through a processor.
[0014] Compared with the prior art, the present invention mainly has the following advantages: 1. The present invention builds and utilizes an unsatisfiable kernel library to quickly solve the subsequent problems based on the existing unsatisfiable kernels. Reusing previous SMT solution results can avoid repeated calculations of already solved problems, thereby reducing calculation time and accelerating verification speed. 2. Since the present invention does not need to use the SMT solver to re-solve some of the problems, the algorithm can reduce the number of calls to the SMT solver, thereby reducing overall resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Schematic diagram of the basic process of the method of the embodiment of the present invention.
[0016] Figure 2 Schematic diagram of the execution framework of the IC3 algorithm in an embodiment of the present invention.
[0017] Figure 3 This is a data structure that cannot satisfy the core library in the embodiment of the present invention.
[0018] Figure 4 The flowchart of using an unsatisfiable core library to determine reuse in an embodiment of the present invention is shown.
[0019] Figure 5 This is a flowchart of updating an unsatisfiable core library in an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The present invention is further described below with reference to the accompanying drawings and specific preferred embodiments of the specification, but the scope of protection of the present invention is not limited thereby. The present invention aims to solve the following technical problems: the IC3 algorithm can be used in software program verification to check and verify whether the software program meets functional requirements, security and other specifications. When using the IC3 algorithm for software program verification, two major challenges are faced: due to the complexity of the software program, the IC3 algorithm needs to frequently call the SMT solver to solve the constraints during the verification process, resulting in a long solution time, affecting the verification efficiency; during the operation of the IC3 algorithm, a large number of constraint solutions have similarities, but the existing IC3 algorithm fails to effectively reuse the existing solution information, resulting in repeated calculations, further exacerbating the problem of long solution time. To this end, the present invention proposes an IC3 accelerated verification method and system based on unsatisfiable kernels, which aims to quickly solve the subsequent part of the problem by constructing an unsatisfiable kernel library and using the existing unsatisfiable kernels, thereby effectively reducing the number and time of solutions and improving the speed and efficiency of software program verification.
[0021] like Figure 1 and Figure 2 As shown, the IC3 accelerated verification method based on unsatisfiable cores in this embodiment is used to verify a software program model modeled using the Lustre language. The IC3 accelerated verification method includes inputting the Lustre file of the program model to be verified into the IC3 algorithm model of the SMT solver for solving to obtain a verification result of whether the program model to be verified meets the specified security attributes or specifications, and the IC3 algorithm model of the SMT solver is used for solving the problem. The method includes: initializing an unsatisfiable core library, the unsatisfiable core library is used to store unsatisfiable cores obtained from the solver in the previous solving process, and storing the unsatisfiable cores in the IC3 algorithm model. 3. The algorithm model checks the unsatisfiable core library each time before calling the SMT solver to solve the formula. If an unsatisfiable core that matches the current formula is found in the unsatisfiable core library, the unsatisfiable core is directly obtained and the solution process of calling the SMT solver this time is skipped. Otherwise, the SMT solver is called to solve the formula. After calling the SMT solver to solve the formula, if the SMT solver determines that the current formula is unsatisfiable, the unsatisfiable core returned by the SMT solver is updated to the unsatisfiable core library. If the SMT solver determines that the current formula is satisfiable, the SMT solver returns a set of assignments that satisfy the current formula.
[0022] like Figure 2 As shown, the execution steps of the IC3 algorithm model in this embodiment include: Initialize loop variable k; Forward process: Execute the forward solution of IC3 algorithm and call SMT solver to solve the formula. If the solution reaches the fixed point, the property is determined to be true, and the program model to be verified meets the specified security property or specification verification result, and then the process ends and exits. If the solution does not reach the fixed point, the process enters the block process. The block process executes the IC3 algorithm's block process and calls the SMT solver to solve the formula. If a true counterexample is found after the solution, the property is determined to be invalid, and the program model to be verified does not meet the specified safety property or the specified verification result. The verification process ends and exits. If no true counterexample is found, the loop variable k is incremented by 1 and the forward process begins. The execution of the IC3 algorithm consists of two main phases: the forward phase and the block phase. The block phase ensures that the invariant clauses hold in the system through conflict analysis and counterexample blocking. If the safety property is found to be invalid, the algorithm returns a counterexample, indicating a system vulnerability. The forward phase uses forward state expansion to gradually propagate reachable states, verifying and strengthening the system's invariant clauses. If a fixed point is reached, the algorithm returns safe, proving that the system meets the given safety property. During these two phases, a large number of constraints are solved, and some formulas are solved repeatedly. By building a library of unsatisfiable kernels, existing unsatisfiable kernels can be used to quickly solve the remaining problems, effectively reducing the number and time of solution steps and improving the speed and efficiency of software program verification.
[0023] This embodiment specifically improves the IC3 algorithm within the open-source symbolic model checking tool Kind2. Kind2 is primarily used to verify whether program models written in the Lustre language meet specific security properties or specifications. Therefore, the program model to be verified is a Lustre file, and the final output is whether the model meets the specific security properties or specifications, namely "valid" (the properties are met) or "invalid" (the properties are not met). In addition, Kind2 also outputs key statistical information such as the IC3 algorithm's runtime, constraint solving time, and number of solutions.
[0024] The unsatisfiable core library in this embodiment is a list of variable length cells, each of which is a list of unsatisfiable cores that match a specified formula. The specified formula in each cell can be matched as needed. As an optional implementation, the unsatisfiable core library in this embodiment includes an unsatisfiable core library for storing unsatisfiable cores that match the formula shown below: , (1) In the above formula, Security attributes are used to define security conditions or constraints that a software system should satisfy. is the forward state set, which is the state set that can be reached from the initial state set I through the k-step migration relation T. The forward state set is in conjunction normal form, and its format is ,in ~ For clauses, is logical AND; To transfer the relationship in one step; For clause, clause ,in ~ For text, is a logical OR; For Clause After one step of migration, the negative state In this embodiment, the unsatisfiable core library for storing unsatisfiable cores matching the formula shown above is named "unsat_core_F", and its structure is as follows: Figure 3 As shown, taking the first unit as an example, ~ Represents a forward state set The unsatisfiable core of express Unsatisfiable core Is the forward state set A subset of ~ Expression Clause C The unsatisfiable core of Expression Clause C Unsatisfiable core Is Clause C A subset of .
[0025] As an optional implementation manner, in this embodiment, the unsatisfiable core library further includes an unsatisfiable core library for storing unsatisfiable cores matching the formula shown in the following formula: , (2) In the above formula, is the initial state set, For clause, clause ,in ~ For text, is a logical OR, For logical AND, In this embodiment, the unsatisfiable core library for storing unsatisfiable cores matching the formula shown above is named "unsat_core_I". The storage format of the "unsat_core_I" library is the same as that of the "unsat_core_F" library.
[0026] During the execution of the IC3 algorithm, solving a large number of constraints is an essential step. Among them, the number of times formula (1) and formula (2) are solved accounts for more than 50%, and the solution processes of these two formulas are similar. To address the above problems, this embodiment introduces the concept of unsatisfiable cores and constructs unsatisfiable core libraries: the "unsat_core_F" library and the "unsat_core_I" library. The "unsat_core_F" library and the "unsat_core_I" library are lists of variable length, and each cell is also a list, which is used to store the unsatisfiable core information of a specific formula. Based on the construction of the unsatisfiable core library, the unsatisfiable core library can be used as a cache of unsatisfiable cores to accelerate the IC3 algorithm: before solving a formula, the unsatisfiable core library is first checked to determine whether the previously stored unsatisfiable core information can be reused. If unsatisfiable core information that matches the current formula can be found, the current solution process can be skipped directly, thereby saving computing time. If no reusable information is found in the unsatisfiable core library, the SMT solver must be invoked for a new solution. After the SMT solution, if the SMT solver determines that the current logic formula is unsatisfiable, the unsatisfiable core returned by the SMT solver is stored in the unsatisfiable core library, thereby updating the library. This unsatisfiable core information records the minimum subset that caused the formula to be unsatisfiable. When solving similar logic formulas later, the information in the unsatisfiable core library can be reused, skipping unnecessary solution steps and accelerating verification.
[0027] like Figure 4As shown, in this embodiment, before each invocation of the SMT solver by the IC3 algorithm model to solve a formula, the unsatisfiable core library is checked. The steps include: organizing the clauses and literals of the formula to be solved into a formula information list; and concatenating and organizing the relevant information of the formula to be solved to form a formula information list for subsequent processing. This formula information list contains the important information to be solved in the current logic formula. This step organizes the clauses and literals in the formula into a data structure, facilitating subsequent querying and processing. The unsatisfiable core library is traversed to determine whether an unsatisfiable core a included in the formula information list exists in the unsatisfiable core library. If an unsatisfiable core a is included in the formula information list, it is determined that an unsatisfiable core matching the current formula has been found in the unsatisfiable core library and can be reused, skipping the current solution. Otherwise, it is determined that no unsatisfiable core matching the current formula has been found in the unsatisfiable core library. Before solving a new logic formula, the unsatisfiable core library is first checked to determine whether unsatisfiable core information related to the current formula exists. The unsatisfiable core library is traversed to check whether any of the unsatisfiable cores are included in the formula information list (named formulaInfo in this embodiment). If relevant information exists in the unsatisfiable core library, that is, an unsatisfiable core in the unsatisfiable core library is included in the formula information list, this information can be reused to skip the current solution and avoid calling the SMT solver again. If no relevant information exists, the SMT solver is called for a new solution.
[0028] For example, for the formula (1) to be checked, suppose The form is , yes , then first The clause in 、 、 、 )and The text in ( 、 、 、 ) to form a formula information list. Traverse "unsat_core_F" and check whether there is an unsatisfiable core in "unsat_core_F", whose elements are all included in the formula information list formulaInfo list. If such an unsatisfiable core exists, return the unsatisfiable core and the Boolean value "true"; if not, return an empty list and the Boolean value "false". If , making ,but is unsatisfiable. Assume that there is an unsatisfiable core in "unsat_core_F" ,but is unsatisfiable, then: It is also unsatisfactory.
[0029] When solving formula (1), that is: When, because ,Right now: .
[0030] Therefore, formula (1) is also unsatisfiable, and the unsatisfiable kernel can be reused to skip this solution.
[0031] Similarly for formula (2), if yes , then first I and The text in ( 、 、 、 ) to form a formula information list. Traverse "unsat_core_I" and check whether there is an unsat core in "unsat_core_I" whose elements are contained in the formula information list formulaInfo list. If such a core exists, return the unsat core and the Boolean value "true"; if not, return an empty list and the Boolean value "false". If , making ,but is unsatisfiable. Assume that there is an unsatisfiable core in "unsat_core_I" ,but is unsatisfactory. When solving formula (2), that is, When, because ,Right now Therefore, formula (2) is also unsatisfiable, and the unsatisfiable core can be reused and the current solution can be skipped.
[0032] In addition, if the returned Boolean value is "true", it means that the previous unsatisfiable core can be reused, so there is no need to solve it again and it can be skipped directly. If the returned Boolean value is "false", it means that the previous unsatisfiable core cannot be reused and a new solution must be called on the SMT solver.
[0033] like Figure 5As shown, in this embodiment, after calling the SMT solver to solve the formula, if the SMT solver determines that the current formula is unsatisfiable, the unsatisfiable core returned by the SMT solver is updated to the unsatisfiable core library, including: obtaining the result of calling the SMT solver to solve the formula, if the result of the formula solution is that the current formula is satisfiable, the SMT solver returns a set of assignments that satisfy the current formula; if the result of the formula solution is that the current formula is unsatisfiable, obtaining the unsatisfiable core of the current formula through the SMT solver, and converting the unsatisfiable core information returned by the SMT solver into a format suitable for storage in the unsatisfiable core library, and storing it in the unsatisfiable core library. The uniqueness and simplicity of the unsatisfiable core library must be guaranteed during storage.
[0034] When solving Equation (1), the unsatisfiable kernel returned by the SMT solver is and A subset of , namely: , Through format conversion, we get the unsatisfiable core The corresponding unsatisfiable core Based on the unsatisfiable core , So that: It is also unsatisfactory.
[0035] Therefore, the core cannot be satisfied and The connection list join_unsat_core is ready to be stored in "unsat_core_F". For formula (1), assume The form is , yes , the SMT solver solves formula (1), that is, solves: .
[0036] Assuming that the formula is unsatisfiable, the SMT solver will return the unsatisfiable core of the formula, which is assumed to be 、 、 、 , you need to 、 Convert to Then 、 and The connection is a list join_unsat_core ready to be stored in "unsat_core_F".
[0037] When solving formula (2), the unsatisfiable kernel returned is and A subset of By conversion, we get Corresponding form. Make is also unsatisfactory. and The connection list join_unsat_core is ready to be stored in "unsat_core_I". For formula (2), assume yes , the SMT solver solves formula (2), that is, solves 。 Assuming that the formula is unsatisfiable, the SMT solver will return the unsatisfiable core of the formula, which is assumed to be I 、 、 , you need to 、 Convert to Then I and The connection is a list join_unsat_core ready to be stored in "unsat_core_I".
[0038] In this embodiment, in order to ensure that there is no inclusion relationship between the data in the two unsatisfiable core libraries "unsat_core_F" and "unsat_core_I", the unsatisfiable cores obtained after solving a certain formula are first connected into a list join_unsat_core, and then the list is added to the unsatisfiable core library according to the rules. Here, "unsat_core_F" is used as an example for explanation: Condition (1): If , , then the Replace with ; Condition (2): If unsat_core_F , , then the Do not add "unsat_core_F"; Condition (3): If , such that: and join_ , then the join_ Added to "unsat_core_F".
[0039] When solving formula (1), if the formula is unsatisfactory, the unsatisfactory kernel returned is 、 、 、 , then the list join_unsat_core is If there is an unsatisfiable core in unsat_core_F 、 , that is, if the above condition (1) is met, then the unsatisfiable core is replaced by the list join_unsat_core; if there is an unsatisfiable core in unsat_core_F , that is, if the above condition (2) is met, the list join_unsat_core is not added to "unsat_core_F".
[0040] To validate this embodiment's IC3 accelerated verification method based on unsatisfiable cores, we compared it with the original IC3 algorithm. This comparison revealed that the method reduced the number of constraint solving attempts by approximately 50%, effectively shortening solution time and improving verification efficiency.
[0041] In summary, the IC3 accelerated verification method based on unsatisfiable cores in this embodiment includes first initializing the unsatisfiable core library. Before solving a specific formula, the unsatisfiable core library is first checked to determine whether the previously stored unsatisfiable core information can be reused. If the unsatisfiable core information that matches the current formula can be found, the current solution process can be skipped directly, thereby saving computing time. If no reusable information is found in the unsatisfiable core library, it is necessary to call the SMT solver for a new solution. After performing the SMT solution, when the SMT solver determines that the current logic formula is unsatisfiable, the unsatisfiable core returned by the SMT solver is stored in the unsatisfiable core library, thereby updating the unsatisfiable core library. These unsatisfiable core information records the minimum subset that causes the formula to be unsatisfiable. When solving similar logic formulas subsequently, the information in the unsatisfiable core library can be reused, thereby skipping unnecessary solution processes. When verifying complex program models, the IC3 accelerated verification method based on the unsatisfiable core of this embodiment effectively reduces the number of solutions compared to the original IC3 algorithm, thereby shortening the solution time. This optimization ultimately reduces the overall verification time of the IC3 algorithm, thereby achieving an increase in verification speed. The IC3 accelerated verification method based on the unsatisfiable core of this embodiment exhibits significant advantages over the original IC3 algorithm. Its core advantage lies in significantly reducing the number of constraint solutions. Compared to the original algorithm, the IC3 accelerated verification method based on the unsatisfiable core of this embodiment can reduce the number of constraint solutions by approximately 50%, effectively shortening the solution time and improving verification efficiency.
[0042] In addition, this embodiment also provides an IC3 accelerated verification system based on an unsatisfiable core, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the IC3 accelerated verification method based on an unsatisfiable core.
[0043] In addition, this embodiment also provides a computer-readable storage medium, which stores a computer program or instruction. The computer program or instruction is programmed or configured to execute the unsatisfiable core-based IC3 accelerated verification method through a processor.
[0044] In addition, this embodiment also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the unsatisfiable core-based IC3 accelerated verification method through a processor.
[0045] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions described in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0046] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. An IC3 accelerated verification method based on unsatisfiable cores, used to verify a software program model modeled using the Lustre language, characterized in that: The IC3 accelerated verification method includes inputting the Lustre file of the program model to be verified into the IC3 algorithm model of the SMT solver for solving to obtain a verification result of whether the program model to be verified meets the specified security attributes or specifications, and the IC3 algorithm model of the SMT solver is used for solving, including: initializing an unsatisfiable core library, the unsatisfiable core library is used to store unsatisfiable cores obtained from the solver in the previous solving process, checking the unsatisfiable core library before the IC3 algorithm model calls the SMT solver each time to solve the formula, and if a core is found in the unsatisfiable core library, The unsatisfiable core that matches the current formula is directly obtained and the solution process of calling the SMT solver this time is skipped. Otherwise, the SMT solver is called to solve the formula; after calling the SMT solver to solve the formula, if the SMT solver determines that the current formula is unsatisfiable, the unsatisfiable core returned by the SMT solver is updated to the unsatisfiable core library; if the SMT solver determines that the current formula is satisfiable, the SMT solver returns a set of assignments that satisfy the current formula; the unsatisfiable core library includes an unsatisfiable core library for storing unsatisfiable cores that match the formula shown in the following formula: , In the above formula, Security attributes are used for security conditions or constraints that the software system should meet; is the forward state set, which is the set of states that can be reached from the initial state set I through k-step migration relations T. The forward state set is in conjunction normal form, and its format is ,in ~ For clauses, is logical AND; To transfer the relationship in one step; For clause, clause ,in ~ For text, is logical OR; For Clause After a step of migration, the negative state is logically negated; the unsatisfiable core library also includes an unsatisfiable core library for storing unsatisfiable cores matching the formula shown in the following formula: , In the above formula, is the initial state set, For clause, clause ,in ~ For text, is a logical OR, For logical AND, It is logical NOT.
2. The IC3 accelerated verification method based on unsatisfiable core according to claim 1, characterized in that: The unsatisfiable core library is a list of variable length composed of units, and each unit is a list for storing an unsatisfiable core matching a specified formula.
3. The IC3 accelerated verification method based on unsatisfiable core according to claim 1, characterized in that: The checking of the unsatisfiable core library before each call of the SMT solver to solve the formula in the IC3 algorithm model includes: orderly arranging the clauses and texts of the formula to be solved into a formula information list; traversing the unsatisfiable core library to determine whether there are unsatisfiable cores included in the formula information list in the unsatisfiable core library, if there are unsatisfiable cores included in the formula information list, then determining to find an unsatisfiable core matching the current formula in the unsatisfiable core library, otherwise determining to not find an unsatisfiable core matching the current formula in the unsatisfiable core library.
4. The IC3 accelerated verification method based on unsatisfiable core according to claim 1, characterized in that: After calling the SMT solver to solve the formula, if the SMT solver determines that the current formula is not satisfiable, the unsatisfiable core returned by the SMT solver is updated to the unsatisfiable core library, including: obtaining the result of calling the SMT solver to solve the formula, if the result of the formula solving is that the current formula is satisfiable, the SMT solver returns a set of assignments that satisfy the current formula; if the result of the formula solving is that the current formula is not satisfiable, obtaining the unsatisfiable core of the current formula through the SMT solver, and converting the unsatisfiable core information returned by the SMT solver into a format suitable for storage in the unsatisfiable core library, and storing it in the unsatisfiable core library.
5. The IC3 accelerated verification method based on unsatisfiable core according to claim 1, characterized in that: The execution steps of the IC3 algorithm model include: Initialize loop variable k; Forward process: Execute the forward solution of IC3 algorithm and call SMT solver to solve the formula. If the fixed point is reached after the solution, the property is judged to be established, and the program model to be verified meets the specified security property or the verification result of the specification, and then the process ends and exits. If the fixed point is not reached after the solution, the block process is entered; Block process: Execute the block process of the IC3 algorithm and call the SMT solver to solve the formula. If a real counterexample is found after the solution, the property is judged to be invalid, and the program model to be verified does not meet the specified security properties or the specified verification results. The process ends and exits. If no real counterexample is found, the loop variable k is increased by 1 and the forward process is entered.
6. An IC3 accelerated verification system based on an unsatisfiable core, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the IC3 accelerated verification method based on unsatisfiable cores as described in any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the IC3 accelerated verification method based on unsatisfiable cores as described in any one of claims 1 to 5 through a processor.
8. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the IC3 accelerated verification method based on unsatisfiable cores as described in any one of claims 1 to 5 through a processor.
Citation Information
Patent Citations
Symbol model detection method and system based on SAT solver and application of symbol model detection method and system
CN114564202A
Enhanced limit model inspection method and system based on attribute guidance accessibility
CN117688876A
Security property verification method and device, electronic equipment and storage medium
CN118586049A
Method, computer program and apparatus for analysing a programmable logic controller program
US20220137586A1
System and Method for Accelerating Neural Networks
US20230195419A1
