SMT distributed solution method and system based on combination and problem decomposition

Through variable-level division and dynamic distributed solution framework, combined with combined solution and division and conquer methods, the problems of inefficiency and resource waste in the processing of complex logical structures in the existing technology are solved, and high-performance distributed SMT solution is realized. , make full use of the advantages of multi-core processors and large-scale computing clusters.

CN119088548AActive Publication Date: 2024-12-06INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411121141.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-06
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

When the existing SMT solvers process formulas of complex logical structures, the term-level division strategy is poor, the scalability of the combined solution method is limited, the pre-division method leads to wasted computing resources, and the division and conquer method depends on the effectiveness of the division algorithm. Moreover, the prior art cannot fully utilize the advantages of multi-core processors and large-scale computing clusters.

Method used

Using the method of division and conquer based on variable-level division, integrating the method of combination solutions and division and conquer, combining the heuristics of term-level and variable-level division, a dynamic distributed solution framework, through the collaboration between the Leader process and the Worker process, dynamically adjusting the task allocation and solution strategies to form High-performance distributed SMT solution system.

Benefits of technology

It significantly improves the parallel capability of the SMT solver, reduces waste of computing resources, and improves the solution efficiency. It is particularly outstanding when processing complex Boolean formulas, realizes high scalability and flexible scheduling, and can dynamically learn and adjust the division tree. Expand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088548A_ABST
    Figure CN119088548A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computers, and relates to an SMT distributed solving method and system based on combination and problem decomposition. The method comprises the steps that a Leader process allocates a Worker process for an SMT problem to be solved; the Leader process takes the original problem as a root node and adds the original problem into the partition tree, and information of the partition tree is continuously updated in the solving process; a task generator in the Leader process generates tasks and adds the tasks into a task cache queue, a task scheduler schedules the tasks in the queue and distributes the tasks to the Worker process, and the tasks comprise a preprocessing simplification task, a child node generation task and a combination solving task; the Worker process executes related tasks according to the control signal of the Leader process; and the Leader process monitors and collects the task operation results from each Worker process, and further obtains the solving result of the SMT problem. According to the method, a high-performance distributed SMT solver is achieved, universality and high expandability are achieved, computing resources can be utilized to the maximum extent, and the solving efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of computer technology and software technology, and specifically relates to a SMT distributed solving method and system based on combination and problem decomposition. Background Art

[0002] The Boolean satisfiability problem (SAT) is a decision problem to determine whether a given propositional logic formula is satisfiable, and Satisfiability Modulo Theory (SMT) is an extension of the SAT problem. It combines Boolean logic and other theories (such as equation theory and uninterpreted functions, array theory, bit vectors, linear and nonlinear arithmetic) to express more complex logic formulas, and to study the determination methods of the satisfiability of first-order logic formulas under these specific theories. SMT is an important direction of formal methods and automatic reasoning, and is widely used in many fields, such as program verification, cloud computing and cloud storage, optimization problem solving, access control, multi-core problems, program defect detection and verification, bounded model detection, RTL verification, static analysis, etc. The actual problems to be solved in these fields can be modeled as constraint satisfiability problems, and SMT has outstanding advantages in the expression and solution of such problems.

[0003] At present, most advanced SMT solvers still maintain single-threaded serial solving, and related work focuses on how to improve the solving techniques and heuristic methods in serial SMT solvers. With the increase in the difficulty and scale of industrial samples, serial SMT solving has gradually failed to meet the needs of the industry, and considering the increasing abundance of computing resources, it is a natural idea to adopt a distributed approach to fully utilize computing power to improve the performance of SMT solvers. Current research on distributed SMT solving is mainly divided into two directions: combinatorial solving and divide and conquer, and its characteristics are as follows:

[0004] 1) Combinatorial Solving Methods: Combinatorial solving methods deploy multiple solvers or different configurations of a single solver simultaneously, trying to solve the same or slightly different but equivalent SMT problems in parallel.

[0005] 2) Divide and conquer method: The original problem is divided into sub-problems, and the original problem is solved by solving the sub-problems. The basic assumption is that the smaller search space of the sub-problems makes the distributed and parallel solution faster than solving the entire original problem. The most commonly used partition variable selection method currently uses the lookahead heuristic, and each heuristic selects the variable that can minimize the size of the sub-problem.

[0006] 3) Pre-partitioning method: Most divide-and-conquer parallel algorithms use the pre-partitioning method, that is, the problem is divided into sub-problems of the number of computing cores before parallel solving. The over-partitioning method will appropriately generate sub-problems that exceed the number of computing cores.

[0007] 4) Term-level partitioning: Existing SMT partitioning strategies mainly follow the SAT partitioning method and partition at the Boolean level (dividing the problem by different Boolean encoding assignments), which is also called SMT term-level partitioning. For formulas with complex logical structures, sufficient sub-problems can be generated only by term-level partitioning.

[0008] The defects of the prior art are as follows:

[0009] 1) The solving ability and scalability of the combined solution method are limited: The performance of the combined solution method depends on the best existing serial solver. In addition, the scalability of this method is limited by the types of efficient solvers and the number of configuration schemes for efficient solvers. It often cannot fully utilize the advantages of multi-core processors and large-scale computing clusters, and its generalization ability is relatively poor.

[0010] 2) Waste of computing resources caused by pre-partitioning methods: The pre-partitioning method will inevitably produce many sub-problems with huge differences in difficulty, which will further lead to a large number of idle computing cores in the later stages of the solution, causing serious waste of resources. In addition, the high-quality partitioning produced by the pre-partitioning method often leads to high computing costs, and it is difficult to ensure the balance of sub-problems, which in turn affects the overall solution efficiency. Although the over-partitioning strategy has alleviated this problem to a certain extent, for many industrial problems, this phenomenon will still exist even if it is divided into millions of sub-tasks.

[0011] 3) Dependency of the divide-and-conquer approach: The divide-and-conquer approach has the potential to surpass the performance of the best serial solver in theory, but its actual effect is highly dependent on the effectiveness of the partitioning algorithm. This means that if the partitioning algorithm cannot effectively select the key variables to decompose the problem, the overall solution efficiency will still not be significantly improved. This aspect of technology still needs further exploration and optimization.

[0012] 4) Limitations of term-level partitioning: For formulas with simple Boolean structures, which often appear in program verification and theorem proving involving complex theories, especially those that hardly involve logical OR, existing term-level partitioning strategies cannot generate enough subproblems, resulting in a large number of idle computing cores, which seriously limits the performance of distributed SMT solvers. Summary of the invention

[0013] The present invention aims to solve the shortcomings of existing serial SMT solvers, including the poor effect of term-level partitioning strategy on simple Boolean structure formulas, the limited solving ability and scalability of combinatorial solving methods, the waste of computing resources caused by pre-partitioning methods, the dependence of divide-and-conquer methods on partitioning algorithms, and the limitations of term-level partitioning. By proposing a divide-and-conquer method based on variable-level partitioning, integrating combinatorial solving with divide-and-conquer methods, combining term-level and variable-level partitioning heuristics, and a dynamic distributed solving framework, the present invention realizes a high-performance distributed SMT solver with universality and high scalability, which can maximize the use of computing resources and improve solving efficiency.

[0014] The technical solution adopted by the present invention is as follows:

[0015] A SMT distributed solution method based on combination and problem decomposition includes the following steps:

[0016] The Leader process assigns Worker processes to the SMT problems to be solved;

[0017] The Leader process adds the original problem as the root node to the partition tree and continuously updates the partition tree information during the solution process;

[0018] The task generator in the Leader process generates tasks and adds them to the task cache queue. The task scheduler schedules the tasks in the queue and assigns tasks to the Worker process, including preprocessing and simplification tasks, sub-node generation tasks, and combination solution tasks.

[0019] The Worker process executes related tasks according to the control signal of the Leader process;

[0020] The Leader process monitors and collects the task running results from each Worker process, and then obtains the solution to the SMT problem.

[0021] Furthermore, the partition tree is a rooted tree including several nodes, wherein the root node represents the original problem, and the parent and child nodes satisfy the definition of partitioning; each node in the partition tree represents a sub-problem formula generated during the solution process, and the node contains the following information: the parent node, child node, solution status, and solution strategy assigned to the Worker process of the node.

[0022] Furthermore, the task generator continuously generates tasks and adds them to the task cache queue according to the state of the partitioning tree and the solution information; for the sub-problem formulas corresponding to all child nodes, the task generator first generates a preprocessing simplification task for them to improve the efficiency and quality of subsequent solutions and sub-problem partitioning; then, the task generator generates child node generation tasks and combined solution tasks for the node according to the global information of the current Leader process; the child node generation task heuristically configures the number of child node generation and the type of partitioning, and the combined solution task heuristically configures the type, parameters and solution duration of the serial solver.

[0023] Furthermore, in the initial stage, a node only generates one combined solution task. As the solution proceeds, if the task is not saturated and the worker idle rate is high, the number of combined solution tasks on the same node is appropriately increased to avoid wasting computing resources as much as possible.

[0024] Furthermore, the Worker process includes a preprocessor, a divider, and a serial solver, and performs related tasks according to the following steps:

[0025] Preprocessing and simplification: Call the preprocessor to simplify the specified task. After completion, pass the simplified sub-problem to the Leader process and add it to the task buffer queue;

[0026] Subnode generation: Call the partitioner to generate a specified number of subnodes for the specified task according to term-level partitioning or variable-level partitioning;

[0027] Combination solving: Call the specified serial solver and use the specified strategy to solve the specified task;

[0028] Task termination: terminate the task currently being performed by the current Worker process.

[0029] Furthermore, the Leader process monitors and collects the task running results from each Worker process, including:

[0030] Preprocessing simplification: Mark the corresponding node status as "simplified but not solved", and mark the corresponding Worker process status as "idle";

[0031] Subnode generation: insert the generated subnode into the corresponding position of the partition tree, and add the preprocessing simplification task of the subnode to the task cache queue;

[0032] Combined solution: Update the solution status of the corresponding node according to the solution result, and send a termination signal to other Worker processes that solve the task with different solution strategies.

[0033] Furthermore, when the node status is updated to "satisfiable" or "unsatisfiable", the Leader process performs status reasoning and propagation according to the following rules:

[0034] The "satisfiability" of any node in the partitioning tree represents the "satisfiability" of the original problem, and the variable assignment corresponding to the node is used as the variable assignment of the original problem;

[0035] All child nodes of the "unsatisfiable" node in the partition tree should be "unsatisfiable";

[0036] If all child nodes of a node are "unsatisfiable", then the node is also "unsatisfiable";

[0037] When the Leader process detects that any node in the partition tree obtains a "satisfiable" result, or detects that the root node obtains an "unsatisfiable" result, the original problem is solved successfully, all Worker processes are terminated, related resources are recovered, and temporary files and memory are cleaned up.

[0038] A SMT distributed solution system based on combination and problem decomposition includes a partition tree, a task generator and a task scheduler located in a Leader process, and a preprocessor, a partitioner and a serial solver located in a Worker process; the Leader process adds the original problem as a root node to the partition tree, and continuously updates the information of the partition tree during the solution process; the task generator generates tasks and adds them to a task cache queue, the task scheduler schedules the tasks in the queue, and assigns tasks to the Worker process, including preprocessing simplification tasks, child node generation tasks and combination solution tasks; the preprocessor, the partitioner and the serial solver of the Worker process execute related tasks according to the control signal of the Leader process; the Leader process monitors and collects the task running results from each Worker process, and then obtains the solution result of the SMT problem.

[0039] The beneficial effects of the present invention are as follows:

[0040] The present invention proposes a high-performance distributed SMT solving system, which can divide problems of any structure, fully combines the complementarity and advantages of many parallel methods, and fundamentally alleviates the problem of waste of computing resources caused by existing pre-division methods. It supports dynamic learning and adjustment during the solving process and provides a more flexible scheduling strategy.

[0041] Through the divide-and-conquer method based on variable-level partitioning, problems of any structure can be divided, which largely avoids the waste of computing resources. This method can significantly improve the parallel capability of the solver, especially when dealing with complex Boolean formulas.

[0042] By combining combinatorial solving with divide-and-conquer methods and term-level and variable-level partitioning heuristics, the complementarity and advantages of many parallel methods are fully utilized to improve the ability to solve problem instances of different difficulty and structure.

[0043] Finally, by implementing a dynamic distributed solution framework, the problem of wasted computing resources caused by the pre-partitioning method is fundamentally solved. The framework has good generalization and scalability. The dynamic framework provides the ability of flexible scheduling during the solution process. The expansion and growth of the partition tree can be dynamically learned and adjusted according to the problem scale and structural characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic diagram of the execution process of the SMT distributed solution method based on combination and problem decomposition of the present invention. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below through specific embodiments and drawings.

[0046] The key points of the present invention are:

[0047] 1) Divide and conquer method based on variable-level partitioning: The existing term-level partitioning strategy is not effective for formulas with simple Boolean structures. This invention proposes a divide and conquer method based on variable-level partitioning, which can effectively partition problems of any structure and greatly reduce the waste of computing resources.

[0048] 2) Integrate combinatorial solving and divide-and-conquer methods: Combinatorial solving and divide-and-conquer methods each have their own advantages and disadvantages. This framework can well integrate these two mainstream distributed methods, make full use of their advantages, and improve the efficiency of distributed solving.

[0049] 3) Heuristic combination of term-level and variable-level partitioning: Term-level and variable-level partitioning have strong complementarity in solving ability. The framework of the present invention can flexibly select the partitioning method under the divide-and-conquer method, heuristically combine the two methods, and use their complementarity to improve the distributed solving ability.

[0050] 4) Dynamic distributed SMT solution framework: Traditional pre-partitioning methods easily lead to waste of computing resources. The dynamic distributed solution framework proposed in this invention can fundamentally solve this problem. The framework is applicable to any given number of CPU cores, especially for multi-core servers and large-scale computing clusters, and has good generalization and scalability. In this framework, the expansion and growth of the partitioning tree can be dynamically learned and adjusted according to the problem scale and structural characteristics, providing flexible scheduling capabilities.

[0051] The present invention provides a divide-and-conquer method based on variable-level partitioning, a dynamic distributed solution method that integrates combinatorial solution and divide-and-conquer method, and term-level and variable-level partition heuristics. The method is mainly used to solve SMT problems, and the default input is a propositional logic formula in the SMT2 format specified by the SMT-LIB standard. The output of this method is "satisfiable" or "unsatisfiable". If the result is "satisfiable", a specific assignment that makes the original formula valid will be given.

[0052] This method adopts the classic "Leader-Workers" distributed paradigm and optimizes it for the characteristics of the SMT field and the dynamic combination distributed method. Figure 1 As shown in the figure, the Leader process is responsible for maintaining the task cache queue and partition tree, as well as task scheduling, including task distribution, result aggregation, node state reasoning, and task termination notification. The Worker process performs task preprocessing, partitioning, solving, or terminating the current task according to the instructions of the Leader process. This method mainly includes four steps: task management and scheduling, preprocessing simplification, subnode partitioning, and solving, as follows:

[0053] 1) For the SMT problem to be solved, the propositional logic formula in SMT2 format is input using the standard input of SMT-LIB. When the solution starts, the Leader process will assign a Worker process to directly solve the original problem, ensuring that the performance is not inferior to the serial solution.

[0054] 2) Next, the Leader process will add the original problem as the root node to the partition tree and continuously update the partition tree information during the solution process. The definitions of tasks, task cache queues, partition tree nodes, and partition trees are as follows:

[0055] a. The task contains the following information: the corresponding subnodes (subproblem formulas) in the partition tree, the task type (preprocessing simplification, subnode generation and combinatorial solution), and some detailed parameters of the corresponding type (preprocessor parameters, partition type, number of subnodes to be generated, solution strategy, etc.).

[0056] b. The Leader will promptly clean up redundant tasks in the task cache queue, that is, those tasks whose corresponding node solution results are known. The simplification, partitioning, and solution of these tasks are no longer meaningful.

[0057] c. Each node in the partition tree represents a sub-problem formula generated during the solution process. The node contains the following information: the parent node of the task node (if any), child node (if any), solution status (unsimplified, simplified but not solved, solving, satisfiable, unsatisfiable, solution terminated), and the solution strategy assigned to the Worker process (serial solver type, related configuration, solution time, etc.).

[0058] d. The partition tree is a rooted tree consisting of several nodes. The root node represents the original problem. The parent and child nodes in the tree meet the definition of partitioning. That is, if a node has child nodes, the union of the problems represented by all direct child nodes of the node is equivalent to the original problem, and the subproblems have no intersection with each other.

[0059] During the solution process, the task generator in the Leader is responsible for generating tasks and adding them to the task cache queue. The task scheduler schedules the tasks in the queue and sends "task assignment" or "task termination" control signals to the Worker process. The assigned tasks can be divided into three categories: "preprocessing simplification", "child node generation" and "combinatorial solution".

[0060] The leader's task generator will continuously generate tasks and add them to the task cache queue based on the state and solution information of the partition tree. For the sub-problem formulas corresponding to all child nodes, the task generator will first generate a "preprocessing simplification" task for them to improve the efficiency and quality of subsequent solutions and sub-problem partitioning. That is to say, both "child node generation" and "combinatorial solution" tasks are based on the sub-problem formulas after "preprocessing simplification". After the sub-problem simplification is completed, the task generator will generate a "child node generation" task (heuristically configure the number of child node generation and the type of partition) and a "combinatorial solution" task (heuristically configure the type, parameters and solution duration of the serial solver) for the node based on the global information of the current Leader. In the initial stage, a node only generates one "combinatorial solution" task, but as the solution proceeds, if the "task unsaturation" and "high worker idle rate" described later are encountered, the number of "combinatorial solution" tasks N for the same node will be appropriately increased. port (Initial setting is N port =1), avoiding the waste of computing resources as much as possible.

[0061] When the number of pending tasks in the task cache queue is less than the threshold α (α is set to half of the total number of computing cores by default), this situation will be referred to as "task unsaturation" below. In order to ensure that all computing cores are fully operational as much as possible, that is, all Worker processes have corresponding tasks to execute, the Leader's task generator will appropriately create more "combination solution" tasks with different configurations for the sub-nodes that have not been successfully solved. When "task unsaturation", the task scheduler will give priority to executing tasks of the "sub-node generation" type. When there are no "sub-node generation" tasks to be run, the "combination solution" will be assigned to the Worker for execution.

[0062] During the solution process, the leader will record the task allocation and running time, as well as whether the task is successful. This information will play a key role in the leader's heuristic scheduling. "High Worker Idle Rate" is defined in this invention as when the number of idle workers exceeds p w (Initial setting is 50%) for a period exceeding T w (Initially set to 40 seconds), and the average running time of the "child node generation" task exceeds the threshold T p When the Leader finds that the "Worker idle rate is high", it will set the key parameter in "Sub-node Generation", that is, the number of sub-tasks generated by each division, N. p (Initial setting is 2) plus one, and T w Set to 1.5×T w In addition, the Leader will combine the number of "combined solution" tasks N of the same node port Plus one.

[0063] 3) The Worker process consists of three modules: preprocessor, divider and serial solver. Each Worker process will wait for control signals from the Leader and perform related tasks:

[0064] a. Preprocessing simplification: Call the preprocessor to simplify the specified task. After completion, pass the simplified sub-problem to the Leader process and add it to the task buffer queue. The main goal of preprocessing is to reduce the number of operations in the bit vector expression, or to convert high-cost operations into low-cost operations, thereby effectively reducing the scale of the converted problem. Specifically, simplification refers to parsing the bit vector formula corresponding to the given task and converting it into a DAG (Directed Acyclic Graph) for storage. On the maintained DAG, a series of constraint propagations are performed, the feasible domain and fixed assignments of variables are inferred and maintained, equivalent variables are merged, and redundant statements in the original problem are eliminated, thereby reducing the scale of the problem and narrowing the search space. In addition, preprocessing simplification also includes but is not limited to the following technologies: bit vector arithmetic equation processing, standardization, integer flattening (int-blasting), three-layer rewriting, unconstrained variable elimination, pure text elimination, equivalent clause replacement, etc.

[0065] b. Subnode generation: Call the partitioner to generate a specified number of subnodes for the specified task according to term-level partitioning or variable-level partitioning. Term-level partitioning refers to partitioning the problem by specifying different literal Boolean assignments at the Boolean literal level of SAT. Variable-level partitioning refers to going deep into the theoretical level of SMT, collecting the feasible domain of variables under the corresponding theory through the constraint propagation technology under the corresponding theory, and on this basis, performing heuristic partitioning of the theoretical variables to generate subproblems.

[0066] c. Combined solving: Call the specified serial solver and use the specified strategy to solve the specified task.

[0067] d. Task termination: terminates the task currently being performed by the current Worker process. Task termination may be due to the fact that the status of the current task has been inferred from the solution results of other tasks, or it may be that the Leader process heuristically terminates some tasks that have little hope of being solved successfully (the task has been solved for a certain period of time, but has not been successfully solved) and have high solution redundancy (the task has been divided into several subtasks, and the subtasks have begun to be solved).

[0068] 4) During this process, the Leader process monitors and collects the task running results from each Worker process:

[0069] a. Preprocessing simplification: Mark the status of the corresponding task node as "simplified but not solved", and mark the status of the corresponding Worker process as "idle".

[0070] b. Child node generation: insert the generated child node into the corresponding position of the partition tree, and add the "preprocessing simplification" task of the child node to the task cache queue.

[0071] c. Combined solution: Update the solution status of the corresponding node according to the solution result, and send a termination signal to other Worker processes that solve the task with different solution strategies.

[0072] When the status of a task node is updated to "satisfiable" or "unsatisfiable", the Leader will perform a series of status reasoning and propagation according to the following rules:

[0073] a. The "satisfiability" of any node in the partitioning tree represents the "satisfiability" of the original problem, and the variable assignment (model) corresponding to the node can be used as the variable assignment of the original problem.

[0074] b. All child nodes of the "unsatisfiable" node in the partition tree should be "unsatisfiable".

[0075] c. If all child nodes of a node are "unsatisfiable", then the node is also "unsatisfiable".

[0076] 5) When the Leader process detects that any node in the partition tree obtains a "satisfiable" result, or detects that the root node obtains an "unsatisfiable" result (the result is obtained by itself or by reasoning of the child node), the original problem is solved successfully, all Worker processes are terminated, related resources are recycled, and temporary files and memory are cleaned up. Finally, the system returns the corresponding solution result.

[0077] Another embodiment of the present invention provides an SMT distributed solution system based on combination and problem decomposition, including a partition tree, a task generator and a task scheduler located in the Leader process, and a preprocessor, a divider and a serial solver located in the Worker process; the Leader process adds the original problem as a root node to the partition tree, and continuously updates the information of the partition tree during the solution process; the task generator generates tasks and adds them to the task cache queue, the task scheduler schedules the tasks in the queue, and assigns tasks to the Worker process, including preprocessing simplification tasks, child node generation tasks and combination solution tasks; the preprocessor, divider and serial solver of the Worker process perform related tasks according to the control signal of the Leader process; the Leader process monitors and collects the task running results from each Worker process, and then obtains the solution result of the SMT problem. The specific implementation methods of the partition tree, task generator and task scheduler, as well as the preprocessor, divider and serial solver refer to the description of the method of the present invention above.

[0078] Another embodiment of the present invention provides a computer device (computer, server, smart phone, etc.), which includes a memory and a processor, the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program includes instructions for executing each step in the method of the present invention.

[0079] Another embodiment of the present invention provides a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk), wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the steps of the method of the present invention are implemented.

[0080] The present invention can be used in specific scenarios such as program verification, cloud computing and cloud storage, and optimization problem solving.

[0081] For example, in a program verification scenario, the method of the present invention can quickly verify whether a given program satisfies a specified property through a distributed method. Specifically, in this scenario, the SMT problem to be solved refers to converting the program into SSA (static single assignment) form, then inverting the SSA logic, and encoding it into a first-order logic formula containing theoretical content. The sub-problem refers to a simpler first-order logic formula with a smaller search space obtained after the original formula is divided according to the method of the present invention. The "preprocessing simplification" task refers to handing over a given first-order logic formula to a preprocessor for various simplification techniques introduced above to reduce the search space of a given program verification problem. The "child node generation" task refers to calling a divider to generate a specified number of child nodes for a specified task according to term-level division or variable-level division. The "combinatorial solution" task refers to calling a specified serial solver and using a specified strategy to solve a specified task. By solving the formula, the system can determine whether the program to be verified satisfies the specified property. If the corresponding SMT problem is not satisfied, it proves that the program satisfies the specified property. Otherwise, if the program does not satisfy the specified property, the system will provide a corresponding counterexample to facilitate further debugging and modification of the program.

[0082] For another example, in cloud computing and cloud storage scenarios, the method of the present invention can help optimize resource allocation and task scheduling. Specifically, in this scenario, the SMT problem to be solved refers to converting the problem of resource allocation and task scheduling into a first-order logic formula containing theoretical content. The final solution result shows whether the resource allocation and task scheduling can be satisfied under the given constraints. If so, the method will provide a specific resource and task allocation plan, thereby improving the efficiency and performance of cloud computing and cloud storage systems and reducing resource waste.

[0083] In addition, in the optimization problem solving scenario, the method of the present invention can quickly verify whether the specified optimization goal can be met and provide corresponding assignments. Specifically, the SMT problem to be solved in this scenario refers to the first-order logic formula encoded after specifying the corresponding objective function value for the corresponding optimization problem. The final solution result shows whether the objective function value can be satisfied under the constraints of the problem. If it can be satisfied, the method will give the corresponding variable assignment to help achieve the optimization goal, which is widely applicable to solving optimization problems in the fields of industrial design, logistics planning, etc.

[0084] The specific embodiments of the present invention disclosed above are intended to help understand the content of the present invention and implement it accordingly. It can be understood by those skilled in the art that various replacements, changes and modifications are possible without departing from the spirit and scope of the present invention. The present invention should not be limited to the contents disclosed in the embodiments of this specification, and the scope of protection of the present invention shall be subject to the scope defined in the claims.

Claims

1. A SMT distributed solution method based on combination and problem decomposition, characterized in that: The following steps are involved: The Leader process assigns Worker processes to the SMT problems to be solved; The Leader process adds the original problem as the root node to the partition tree and continuously updates the partition tree information during the solution process. The task generator in the Leader process generates tasks and adds them to the task cache queue. The task scheduler schedules the tasks in the queue and assigns tasks to the Worker process, including preprocessing simplification tasks, sub-node generation tasks, and combination solution tasks. The Worker process executes related tasks according to the control signal of the Leader process; The Leader process monitors and collects the task running results from each Worker process, and then obtains the solution to the SMT problem.

2. The method according to claim 1, characterized in that The partition tree is a rooted tree, which includes several nodes. The root node represents the original problem, and the parent and child nodes meet the definition of partitioning. Each node in the partition tree represents a sub-problem formula generated during the solution process, and the node contains the following information: the parent node, child node, solution status and solution strategy assigned to the Worker process of the node.

3. The method according to claim 1, characterized in that The task generator continuously generates tasks and adds them to the task cache queue according to the state of the partitioning tree and the solution information; for the sub-problem formulas corresponding to all child nodes, the task generator first generates a preprocessing simplification task for them to improve the efficiency and quality of subsequent solutions and sub-problem partitioning; then, the task generator generates child node generation tasks and combined solution tasks for the node according to the global information of the current Leader process; the child node generation task heuristically configures the number of child node generation and the type of partitioning, and the combined solution task heuristically configures the type, parameters and solution duration of the serial solver.

4. The method according to claim 3, characterized in that In the initial stage, a node only generates one combined solution task. As the solution progresses, if the task is not saturated and the worker idle rate is high, the number of combined solution tasks on the same node is appropriately increased to avoid wasting computing resources as much as possible.

5. The method according to claim 1, characterized in that The Worker process includes a preprocessor, a divider, and a serial solver, and performs related tasks according to the following steps: Preprocessing and simplification: Call the preprocessor to simplify the specified task. After completion, pass the simplified sub-problem to the Leader process and add it to the task buffer queue; Subnode generation: Call the partitioner to generate a specified number of subnodes for the specified task according to term-level partitioning or variable-level partitioning; Combination solving: Call the specified serial solver and use the specified strategy to solve the specified task; Task termination: terminate the task currently being performed by the current Worker process.

6. The method according to claim 1, characterized in that The Leader process monitors and collects the task running results from each Worker process, including: Preprocessing simplification: mark the corresponding node status as "simplified but not solved", and mark the corresponding Worker process status as "idle"; Subnode generation: insert the generated subnode into the corresponding position of the partition tree, and add the preprocessing simplification task of the subnode to the task cache queue; Combined solution: Update the solution status of the corresponding node according to the solution result, and send a termination signal to other Worker processes that solve the task with different solution strategies.

7. The method according to claim 1, characterized in that When the node status is updated to "satisfiable" or "unsatisfiable", the Leader process performs status reasoning and propagation according to the following rules: The "satisfiability" of any node in the partition tree represents the "satisfiability" of the original problem, and the variable assignment corresponding to the node is used as the variable assignment of the original problem; All child nodes of the "unsatisfiable" node in the partition tree should be "unsatisfiable"; If all child nodes of a node are "unsatisfiable", then the node is also "unsatisfiable"; When the Leader process detects that any node in the partition tree obtains a "satisfiable" result, or detects that the root node obtains an "unsatisfiable" result, the original problem is solved successfully, all Worker processes are terminated, related resources are recovered, and temporary files and memory are cleaned up.

8. A SMT distributed solution system based on combination and problem decomposition, characterized in that: It includes a partition tree, a task generator and a task scheduler located in the Leader process, and a preprocessor, a partitioner and a serial solver located in the Worker process; the Leader process adds the original problem as a root node to the partition tree, and continuously updates the information of the partition tree during the solution process; the task generator generates tasks and adds them to the task cache queue, the task scheduler schedules the tasks in the queue, and assigns tasks to the Worker process, including preprocessing simplification tasks, sub-node generation tasks and combination solution tasks; the preprocessor, partitioner and serial solver of the Worker process execute related tasks according to the control signal of the Leader process; the Leader process monitors and collects the task running results from each Worker process, and then obtains the solution result of the SMT problem.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Software assertion verification method, system and equipment based on incremental SMT problem solving

    CN117573556A

  • Symbolized rapid error detection method based on semantic equivalence program execution

    CN118330425A

  • Boolean satisfiability problem parallel solving method based on dividing and conquering in process

    CN118394504A