[go: up one dir, main page]

CN106201874B - The MHP analysis method and device of concurrent program - Google Patents

The MHP analysis method and device of concurrent program Download PDF

Info

Publication number
CN106201874B
CN106201874B CN201610527181.2A CN201610527181A CN106201874B CN 106201874 B CN106201874 B CN 106201874B CN 201610527181 A CN201610527181 A CN 201610527181A CN 106201874 B CN106201874 B CN 106201874B
Authority
CN
China
Prior art keywords
thread
node
mhp
analyzed
flow graph
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201610527181.2A
Other languages
Chinese (zh)
Other versions
CN106201874A (en
Inventor
周卿
李炼
冯晓兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
Original Assignee
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
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 Huawei Technologies Co Ltd, Institute of Computing Technology of CAS filed Critical Huawei Technologies Co Ltd
Priority to CN201610527181.2A priority Critical patent/CN106201874B/en
Publication of CN106201874A publication Critical patent/CN106201874A/en
Application granted granted Critical
Publication of CN106201874B publication Critical patent/CN106201874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3604Analysis of software for verifying properties of programs
    • G06F11/3608Analysis of software for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation

Landscapes

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

Abstract

本发明实施例提供一种并行程序的MHP分析方法和装置,一种并行程序的MHP分析方法包括:从待分析并行程序的主线程开始,每次选择一个线程,模拟待分析并行程序的执行,其中,当正在模拟执行的线程无法继续执行时,跳转至任一可继续执行的线程模拟执行,直至待分析并行程序的所有线程模拟执行完毕,其中,待分析并行程序包括至少两个线程;根据对待分析并行程序进行模拟执行的结果,构建与待分析并行程序对应的多线程控制流图;对多线程控制流图进行处理,得到保守正确的多线程控制流图,保守正确的多线程控制流图中的各节点的可能并发MHP结果不存在漏报;对保守正确的多线程控制流图进行MHP分析,得到待分析并行程序的MHP分析结果。

An embodiment of the present invention provides an MHP analysis method and device for a parallel program. The MHP analysis method for a parallel program includes: starting from the main thread of the parallel program to be analyzed, selecting one thread at a time, simulating the execution of the parallel program to be analyzed, Wherein, when the thread being simulated and executed cannot continue to execute, jump to any thread that can continue to execute to simulate and execute until all threads of the parallel program to be analyzed are simulated and executed, wherein the parallel program to be analyzed includes at least two threads; According to the results of the simulated execution of the parallel program to be analyzed, construct a multi-threaded control flow graph corresponding to the parallel program to be analyzed; process the multi-threaded control flow graph to obtain a conservative and correct multi-threaded control flow graph, and conservative and correct multi-threaded control There is no false negative in the possible concurrent MHP results of each node in the flow graph; MHP analysis is performed on the conservative and correct multi-threaded control flow graph to obtain the MHP analysis result of the parallel program to be analyzed.

Description

The MHP analysis method and device of concurrent program
Technical field
The present embodiments relate to field of computer technology more particularly to the MHP analysis methods and dress of a kind of concurrent program It sets.
Background technique
With the development of computer technology, computer develops to multicore era by monokaryon, is developed to by single machine processing big The processing of scale cluster.The development of computer equally promotes the development of computer software, even to this day, had up to hundreds of Computer programming language be continuously created, such as universal C/C++, Java, Python etc..Various big software programs, example Such as operating system, database, large software game, are exactly the code of rows up to a million easily, these big software programs may Need team's experience that can just developed for many years.So, how more effectively software program to be debugged, and carried out The problems such as program correctness verifying and optimization, becomes as the research hotspot in computer software exploitation.
With the development of multiple programming, the analysis to concurrent program is the hot issue of software program analysis again.And stroke Sequence analysis wants complicated many relative to serial program analysis.The analysis of serial program be mainly based upon control stream, pointer analysis with And program control flow and data-flow analysis on the fundamental analysis such as definite value reference, what key was serial program is in the nature any It is carved at one and only a sentence can execute.And for concurrent program, any one moment, there may be a plurality of Different threads or the sentence of process are performed simultaneously, and whether then how may concurrently execute between determining program sentence just becomes simultaneously One research direction of line program analysis.
The basic reason of Parallel Program Analysis complexity is that existing simultaneously multiple and different threads or the parallel of process statements holds Row, this makes different threads or the sentence of process on executing sequence there are uncertain relationship, and such uncertainty relation It then may cause the serious error of program.Then a basic problem in Parallel Program Analysis is exactly possible concurrent (May Happen in Parallel, MHP) analysis, the result of this analysis is exactly all possibility parallel subqueries an of sentence Set, or judge any 2 sentences whether there may be parallel execution relationships.The supplementary set of this problem, which gives, to be certainly existed The sentence set of precedence relationship in execution.After having MHP analysis, so that it may in conjunction with the method for serial analysis, do pointer analysis, number According to flow point analysis etc..
Before carrying out MHP analysis to program, need first to construct controlling stream graph (Control Flow corresponding with program Graph, CFG), then MHP analysis is carried out based on CGF.And for concurrent program, how to construct correct multithreading CFG figure It is the key that guarantee MHP analysis correctness.But the method for building multithreading GFG is too simple at present, generally only investigates creation (creat) primitive and the analysis of locking (lock)/unlock (unlock) primitive, and ignore and (Happens-Before) formerly occurs The importance of analysis causes analysis result to have very big wrong report or fail to report when so that carrying out MHP analysis according to CFG.
Summary of the invention
The embodiment of the present invention provides the MHP analysis method and device of a kind of concurrent program, for improve to concurrent program into The accuracy of row MHP analysis.
First aspect provides a kind of MHP analysis method of concurrent program, comprising:
Since the main thread of concurrent program to be analyzed, a thread is selected every time, simulates the concurrent program to be analyzed Execution, wherein when the thread for simulating execution can not continue to execute, jump to it is any continue to execute thread simulation It executes, until all threads simulation of the concurrent program to be analyzed is finished, wherein the concurrent program to be analyzed includes At least two threads;
According to the concurrent program to be analyzed carry out simulation execution as a result, building with the concurrent program pair to be analyzed The Multi-thread control flow graph answered;
The Multi-thread control flow graph is handled, obtains guarding correct Multi-thread control flow graph, it is described to guard just There is no fail to report the concurrent MHP result of the possibility of each node in true Multi-thread control flow graph;
Correct Multi-thread control flow graph progress MHP analysis is guarded to described, obtains the MHP of the concurrent program to be analyzed Analyze result.
MHP analysis method provided in an embodiment of the present invention, it is corresponding with concurrent program to be analyzed multi-thread program-controlled by constructing Then flow graph processed is handled the Multi-thread control flow graph, obtain guarding correct Multi-thread control flow graph, conservative just to this True Multi-thread control flow graph carries out MHP analysis, so that the MHP for obtaining concurrent program to be analyzed is analyzed as a result, due to multithreading CFG be it is conservative correctly, therefore it is higher to the building accuracy of multithreading CFG, MHP analysis is carried out according to multithreading CFG The result wrong report of acquisition is less also there is no failing to report, and improves the accuracy rate that MHP analysis is carried out to concurrent program.
It is described that the Multi-thread control flow graph is handled in a kind of possible implementation of first aspect, it obtains Guard correct Multi-thread control flow graph, comprising:
If addition primitive node in the Multi-thread control flow graph and multiple thread match, delete it is all with it is described plus Enter the side of primitive node connection;
If waiting primitive node and multiple triggering primitive node matchings in the Multi-thread control flow graph are deleted all The side being connect with the waiting primitive node;
Using obtained Multi-thread control flow graph as guarding correct Multi-thread control flow graph.
Due to when carrying out MHP analysis, judging that it is correct matched excessively complexity with which thread actually that primitive, which is added, because This can delete all sides connecting with addition primitive herein, can make in this way when carrying out MHP analysis, it is believed that after primitive is added The sentence in face all may be concurrent with addition primitive, this is a kind of wrong report, but is not failed to report.Similarly, primitive and triggering primitive are waited Match, if therefore the waiting primitive node in multi-thread program-controlled CFG and multiple triggering primitive node matchings, delete and wait original The side of language node connection.By above-mentioned processing, that is, it can guarantee that obtained multithreading CFG is conservative correct.
It is described to guard correct Multi-thread control flow graph progress to described in a kind of possible implementation of first aspect MHP analysis obtains the MHP analysis result of the concurrent program to be analyzed, comprising:
Calculate the non-concurrent set and productive set for guarding each node in correct Multi-thread control flow graph, wherein The non-concurrent set expression of node A can not be concurrent with node A node set, the productive set of node A indicates that node A is produced The set of raw node;
Correct Multi-thread control flow graph is guarded according to the iterative calculation of the non-concurrent set and productive set of each node is described In each node MHP analysis as a result, until the MHP analysis result convergence, obtain the concurrent program to be analyzed MHP analysis As a result.
It is described since the main thread in a kind of possible implementation of first aspect, a thread is selected every time, Simulate the execution of the concurrent program to be analyzed, wherein when the thread for simulating execution can not continue to execute, jump to and appoint The one thread simulation that can be continued to execute executes, until all threads simulation of the concurrent program to be analyzed is finished, comprising:
Step 1 selects a thread, the execution of the thread of analog selection, when described since the main thread every time When the thread of selection can not continue to execute, locks the selected thread and record the current position letter of the selected thread Breath;
Step 2 jumps to any first thread being not locked out and can continue to execute, simulates holding for the first thread Row, when the first thread can not continue to execute, locks the first thread and records the current position of the first thread Information, until all threads that is not locked out and can continue to execute are modeled execution;
Step 3 releases all locked threads, and repeats step 2, until the concurrent program to be analyzed All thread simulations are finished.
The method simulation provided according to embodiments of the present invention executes the multithreading CFG of obtained result detection, can be true The relationship in concurrent program to be analyzed between each thread is embodied, to obtain accurately and reliably multithreading CFG.
In a kind of possible implementation of first aspect, the execution of the thread of the analog selection, comprising:
Using the execution of the thread of depth-first search analytic approach analog selection;
The execution of the simulation first thread, comprising:
The execution of the first thread is simulated using depth-first search analytic approach.
It is described to record the current location information of the selected thread in a kind of possible implementation of first aspect, Include:
The mark of the selected thread and the mark of current sentence are recorded in scheduling information table;
It is described to record the current location information of the first thread, comprising:
The mark of the first thread and the mark of current sentence are recorded in the scheduling information table.
Second aspect provides a kind of MHP analytical equipment of concurrent program, comprising:
Execution module is simulated, for selecting a thread every time since the main thread of concurrent program to be analyzed, simulates institute State the execution of concurrent program to be analyzed, wherein when the thread for simulating execution can not continue to execute, jump to it is any can be after The continuous thread executed, which is simulated, to be executed, until all threads simulation of the concurrent program to be analyzed is finished, wherein it is described to Analyzing concurrent program includes at least two threads;
Controlling stream graph construct module, for according to the concurrent program to be analyzed carry out simulation execution as a result, building Multi-thread control flow graph corresponding with the concurrent program to be analyzed;
Controlling stream graph processing module obtains conservative correctly multi-thread for handling the Multi-thread control flow graph Process control flow graph, there is no fail to report the concurrent MHP result of possibility for guarding each node in correct Multi-thread control flow graph;
MHP analysis module, for guarding correct Multi-thread control flow graph to described and carry out MHP analysis, obtain it is described to The MHP for analyzing concurrent program analyzes result.
In a kind of possible implementation of second aspect, the controlling stream graph processing module, if being specifically used for described more Addition primitive node in thread controlling stream graph and multiple thread match are then deleted and all are added what primitive node was connect with described Side;If waiting primitive node and multiple triggering primitive node matchings in the Multi-thread control flow graph, delete all and institute State the side for waiting the connection of primitive node;Using obtained Multi-thread control flow graph as guarding correct Multi-thread control flow graph.
In a kind of possible implementation of second aspect, the MHP analysis module is specifically used for calculating described guard just The non-concurrent set and productive set of each node in true Multi-thread control flow graph, wherein the non-concurrent set expression of node A without The set of method and node A concurrent node, the productive set of node A indicate the set of node caused by node A;According to each section The non-concurrent set and productive set of point iterate to calculate the MHP analysis for guarding each node in correct Multi-thread control flow graph As a result, until MHP analysis result convergence, obtains the MHP analysis result of the concurrent program to be analyzed.
In a kind of possible implementation of second aspect, the simulation execution module is specifically used for executing following steps: Step 1 selects a thread, the execution of the thread of analog selection, when the selected line since the main thread every time When Cheng Wufa is continued to execute, locks the selected thread and record the current location information of the selected thread;Step 2, Any first thread being not locked out and can continue to execute is jumped to, the execution of the first thread is simulated, when the First Line When Cheng Wufa is continued to execute, lock the first thread and record the current location information of the first thread, until it is all not Thread that is locked and can continuing to execute is modeled execution;Step 3 releases all locked threads, and repeats step Rapid two, until all threads simulation of the concurrent program to be analyzed is finished.
In a kind of possible implementation of second aspect, the simulation execution module is specifically used for using depth-first The execution of the thread of searching analysis method analog selection;The execution of the first thread is simulated using depth-first search analytic approach.
In a kind of possible implementation of second aspect, the simulation execution module is specifically used in scheduling information table The mark of the middle mark for recording the selected thread and current sentence;The First Line is recorded in the scheduling information table The mark of journey and the mark of current sentence.
MHP analysis method provided in an embodiment of the present invention and device are corresponding with concurrent program to be analyzed more by constructing Then thread controlling stream graph is handled the Multi-thread control flow graph, obtain guarding correct Multi-thread control flow graph, to this Guard correct Multi-thread control flow graph and carry out MHP analysis, thus obtain the MHP analysis of concurrent program to be analyzed as a result, due to Multithreading CFG be it is conservative correctly, therefore it is higher to the building accuracy of multithreading CFG, carried out according to multithreading CFG The result wrong report that MHP analysis obtains is less also there is no failing to report, and improves the accuracy rate that MHP analysis is carried out to concurrent program.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without any creative labor, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart of the MHP analysis method embodiment one of concurrent program provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the MHP analysis method embodiment two of concurrent program provided in an embodiment of the present invention;
Fig. 3 is the flow chart of the MHP analysis method embodiment three of concurrent program provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of the MHP analytical equipment embodiment one of concurrent program provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art All other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
During being compiled to concurrent program, when constructing the CFG of concurrent program, need to match the wound in each thread Build (creat)/addition (join) primitive, triggering (signal)/wait (wait) primitive, locking (lock)/unlock (unlock) Primitive.Wherein creat/join primitive, the matching between signal/wait primitive constitute Happens-Before problem, because The sentence that these primitive act on it is shown in that there are specific partial ordering relation, this partial ordering relation is inevitable during program really executes The execution order relation of satisfaction.So if analysis program cannot catch this partial order feature well, analysis result is necessarily adjoint A large amount of error analysis (such as the sentence that centainly cannot concurrently execute be judged as may be concurrent).
Fig. 1 is the flow chart of the MHP analysis method embodiment one of concurrent program provided in an embodiment of the present invention, such as Fig. 1 institute Show, MHP analysis method provided in this embodiment includes:
Step S101 selects a thread since the main thread of concurrent program to be analyzed every time, simulates to be analyzed parallel The execution of program, wherein when the thread for simulating execution can not continue to execute, jump to any thread continued to execute Simulation executes, until all threads simulation of concurrent program to be analyzed is finished, wherein concurrent program to be analyzed includes at least Two threads.
Specifically, MHP analysis method provided in this embodiment is applied to during being compiled to concurrent program.For One concurrent program to be analyzed, due to parallel feature, including multiple threads, one of thread is main thread, should be to Analysis concurrent program is executed since main thread.
In the present embodiment, first since the main thread of concurrent program to be analyzed, a thread is selected every time, to each Thread is analyzed, the execution of the thread of analog selection.There is a principle for the simulation of per thread, exactly when simulating When the thread of execution can not continue to execute, then jump to any one thread simulation execution that can be continued to execute.It is above-mentioned to continue The thread of execution can meet the condition that can be continued to execute during certain threads are performed and therefore repeat the above steps, can It is all simulated with to be analysed to all threads of concurrent program and is finished.
Step S102, according to concurrent program to be analyzed carry out simulation execution as a result, building with concurrent program to be analyzed Corresponding Multi-thread control flow graph.
Specifically, after all threads to concurrent program to be analyzed are all simulated execution, you can learn that each thread Between relationship, i.e., whether there is creat/join, the matching of signal/wait, lock/unlock primitive are closed between each thread System.According to the matching relationship between each thread, multithreading GFG corresponding with concurrent program to be analyzed can be constructed.
Step S103 handles Multi-thread control flow graph, obtains guarding correct Multi-thread control flow graph, guards just There is no fail to report the MHP result of each node in true Multi-thread control flow graph.
Specifically, multithreading CFG corresponding with concurrent program to be analyzed embody in concurrent program to be analyzed thread it Between logical relation, carrying out analysis to multithreading CFG can be obtained analysis result to concurrent program to be analyzed.Due to right When program carries out MHP analysis, in fact it could happen that two kinds of mistakes, one kind to fail to report, i.e., will likely concurrent sentence be judged as can not be simultaneously Hair, another kind are wrong report, that is, would be impossible to concurrent sentence and be judged as concurrent.When carrying out static analysis to program, it is ensured that point The case where there is no fail to report in analysis result then claims to guard when the result correct.
Step S104 carries out MHP analysis to correct Multi-thread control flow graph is guarded, obtains concurrent program to be analyzed MHP analyzes result.
Specifically, after obtaining guarding correct multithreading CFG, MHP analysis can be carried out to it, obtains analysis result. The analysis result is to reflect the MHP analysis result of concurrent program to be analyzed.Since multithreading CFG is to guard correctly, It is higher to the building accuracy of multithreading CFG, it is less that the result wrong report that MHP analysis obtains is carried out according to multithreading CFG There is no failing to report, the accuracy rate that MHP analysis is carried out to concurrent program is improved.
MHP analysis method provided in this embodiment, by constructing Multi-thread control stream corresponding with concurrent program to be analyzed Figure, then handles the Multi-thread control flow graph, obtains guarding correct Multi-thread control flow graph, conservative correct to this Multi-thread control flow graph carries out MHP analysis, so that the MHP for obtaining concurrent program to be analyzed is analyzed as a result, since multithreading CFG is It is conservative correct therefore higher to the building accuracy of multithreading CFG, carry out what MHP analysis obtained according to multithreading CFG As a result it reports less be also not present by mistake to fail to report, improves the accuracy rate for carrying out MHP analysis to concurrent program.
It, can be to step in order to guarantee that the multithreading CFG obtained after handling multithreading CFG is to guard correctly The multithreading CFG that S102 is obtained is handled as follows: if addition primitive node and multiple threads in Multi-thread control flow graph Match, then deletes all sides connecting with addition primitive node;If waiting primitive node and multiple touchings in Multi-thread control flow graph Primitive node matching is sent out, then deletes the side connecting with the waiting primitive node;Using obtained Multi-thread control flow graph as guarantor Keep correct Multi-thread control flow graph.
It specifically, is for matching with creation primitive since primitive is added, but multiple creation primitive may be using one A identical mark, therefore addition primitive may match with multiple threads, but only one of them thread is that primitive is added to answer It is correct matched.Due to when carrying out MHP analysis, judging that it is correct matched excessively multiple with which thread actually that primitive, which is added, It is miscellaneous, therefore all sides connecting with addition primitive can be deleted herein, it can make in this way when carrying out MHP analysis, it is believed that be added The subsequent sentence of primitive all may be concurrent with addition primitive, this is a kind of wrong report, but is not failed to report.Similarly, primitive and touching are waited Hair primitive matches, if therefore the waiting primitive node in multi-thread program-controlled CFG and multiple triggering primitive node matchings, delete and Wait the side of primitive node connection.By above-mentioned processing, that is, it can guarantee that obtained multithreading CFG is conservative correct.
Further, in the embodiment shown in fig. 1, it in step S104, is carried out to correct Multi-thread control flow graph is guarded The step of MHP is analyzed, and obtains the MHP analysis result of concurrent program to be analyzed, can specifically include: calculating conservative correctly multi-thread The non-concurrent set and productive set of each node in process control flow graph, wherein the non-concurrent set expression of node A can not be with node The set of A concurrent node, the productive set of node A indicate the set of node caused by node A;According to each node it is non-simultaneously Hair set and productive set iterative calculation guard the MHP analysis of each node in correct Multi-thread control flow graph as a result, until MHP Result convergence is analyzed, the MHP analysis result of concurrent program to be analyzed is obtained.
Specifically, when to correct multithreading CFG progress MHP analysis is guarded, it is necessary first to each in multithreading CFG Node is analyzed, and determines the non-concurrent set and productive set of each node.The non-concurrent set expression of one of node A without The set of method and node A concurrent node, that is, certainly can not be concurrent with node A node set.The generation collection of node A Close the set for indicating node caused by node A.Then a node is selected every time, is saved according to its input node set, output Point set, non-concurrent set and productive set calculate the MHP result of the node.Wherein, the input node knot of each node It closes, the union of output node set and productive set, then subtracts non-concurrent set, as the MHP of the node analyzes result.It will be right Each calculated MHP analysis result of node is iterated if having circulation along the execution sequence transmitting downwards of multithreading CFG It calculates, finally gathered the MHP of each node points after obtaining, set obtains the MHP analysis result of concurrent program to be analyzed.
Fig. 2 is the flow chart of the MHP analysis method embodiment two of concurrent program provided in an embodiment of the present invention, such as Fig. 2 institute Show, MHP analysis method provided in this embodiment includes:
Step S201 selects a thread, the execution of the thread of analog selection, when selection since main thread every time When thread can not continue to execute, locks the thread of selection and record the current location information of thread of selection.
Specifically, MHP analysis method provided in this embodiment is that the specific of step S101 in embodiment illustrated in fig. 1 executes step Suddenly.Firstly, selecting a thread every time since main thread, simulating the execution of selected thread, until the thread of the selection It can not continue to execute, that is, the thread of each selection is required as much as possible to simulate execution, until can not continue to execute. Then the thread of the selection is locked, and records the current location of the thread of the selection.Before the thread UNLOCKS to the selection, no It can continue the thread that simulation executes the selection.That is, can holding using the thread of depth-first search analytic approach analog selection Row.The mark of the thread of selection and the mark of current sentence can be recorded in scheduling information table, to record the line of selection The location information of Cheng Dangqian.
Step S202 jumps to any first thread being not locked out and can continue to execute, simulates the execution of first thread, When first thread can not continue to execute, locks first thread and record the current location information of first thread, until not locked Thread that is fixed and can continuing to execute is modeled execution.
Specifically, after having locked the thread of above-mentioned selection, any one can be jumped to and be not locked out and can continue to hold Capable first thread, and simulate the execution of first thread.Ability simulation maximum to the greatest extent is also required to the simulation of first thread to execute, Until first thread can not continue to execute.Then it locks first thread and records the current position of first thread.Repeat selection not First thread that is locked and can continuing to execute, until all threads that is not locked out and can continue to execute are modeled and hold Row.That is, can be using the execution of depth-first search analytic approach simulation first thread.Can be recorded in scheduling information table The mark of one thread and the mark of current sentence, thus the location information that the thread for recording selection is current.
Step S203 releases locked thread, and repeats step S202, until concurrent program to be analyzed is all Thread simulation is finished.
Specifically, when thread that is no unlocked and can continuing to execute, need to release all locked threads simultaneously. Then step S202 is repeated, until all threads that must analyze program are modeled and are finished.That is, at this In embodiment, the principle that simulation execution is carried out to each thread is first, and the simulation that needs to do one's best executes the line currently selected Journey, second, if still there is executable thread, locked thread cannot be executed.
The multithreading CFG that obtained result detection is executed according to method provided in this embodiment simulation, being capable of real embodiment Relationship in concurrent program to be analyzed between each thread, to obtain accurately and reliably multithreading CFG.
Figures 1 and 2 show that the implementing procedure of the MHP analysis method of concurrent program provided by the invention, below with one The MHP analysis method of Fig. 1 and concurrent program shown in Fig. 2 is further described in specific embodiment.
Fig. 3 is the flow chart of the MHP analysis method embodiment three of concurrent program provided in an embodiment of the present invention, such as Fig. 3 institute Show, MHP analysis method provided in this embodiment includes:
Step S301 constructs a scheduler, using the execution of scheduler simulation dynamic routine, selects a thread every time Carry out static analysis.
Specifically, firstly, constructing a scheduling information list, the information of the thread for saving concurrent program to be analyzed, This information is mark (Identity, ID) and the analysis position of present analysis thread, for example, where function, place it is basic fast with Which sentence of place.Each cross-thread is using random schedule or follows bad scheduling scheme, and using the depth-first of standard in thread Search for (Depth First Search, DFS) analysis method.Then for a thread, in scheduling information list The schedulable position of only one will be occupied, and its information can behave as the form of stack, function interbed when for expressing DFS analysis The relationship that layer calls.Device to be compiled scans through source code, and carries out basic morphology, multithreading CFG in syntactic analysis and process Building after, scheduler start from principal function to multithreading CFG scan, if a creation primitive is met, in scheduling information The information of this new wound thread is established in list, and this new wound thread is analyzed in right times later.If adjusted Degree device meets linear function calling, then is analyzed according to DFS, the location information pop down of calling function, then jump to and adjusted Function is analyzed.If current thread cannot be analyzed again, for example meet an addition primitive etc., scheduler saves current Analyze and the location informations such as the place function of primitive, place basic block, place sentence be added, then select another thread after It is continuous to be analyzed.If current thread analysis finishes, the information of this thread can be cancelled in scheduling information list.
Step S302, scheduler analyze each thread, occur blocking or cannot divide again in currently analyzed thread It is switched to other threads when analysis to be analyzed, after meeting certain conditions, scheduler can continue to analyze before those It is blocked or unanalyzable thread.
Specifically, according to the meaning of each primitive, it may be defined that and primitive is added, triggering primitive, waits primitive that there is obstruction Meaning.Namely: primitive, triggering primitive is added, primitive is waited to have the ability that analysis program is prevented to continue to analyze the energy of current thread Power, until some condition meets.Analysis is carried out to each thread and needs to meet following two rule:
Rule one: analysis program should use up its best endeavors and do analysis, (because of quilt before it cannot do again any analysis Obstruction or part Thread Analysis finish), analysis program cannot do any creation/addition primitive and the matching of triggering/waiting primitive Work.Rule two: once creation/addition primitive and the matching work of triggering/waiting primitive are done in analysis program preparation, journey is analyzed Sequence should handle current all creation/addition primitive and triggering/waiting primitive, then unlock again after blocked state continues analysis Continuous program.
Step S303, circulation execute step S302, finish until institute's source code is analyzed.Then pass through two method of purifications Then guarantee that constructed multithreading CFG is conservative correct.
First purification rule: if an addition primitive node (can include standard thread with multiple thread match The case where (normalized thread)), just delete all sides connecting with the addition primitive node.Article 2 purifies rule: As soon as if waiting primitive node can be deleted all with multiple triggering primitive node matchings (the case where including standard thread) The side being connect with the waiting primitive node.Above-mentioned standard thread is defined as: the thread created in circulation;These threads are usual There is identical subject thread function body, but in static analysis, due to that can not know the number of creation thread, usually according to list A thread or 2 threads are analyzed, but to be labeled as standard thread, to indicate the difference with general thread.
Step S304 calculates the multithreading CFG after creation and carries out MHP calculating.
Specifically, define some symbols first: t indicates that a thread, N (t) indicate all nodes of this thread;N table Show a node, (it is online that the node returned belongs to n institute to localpred (n) by the predecessor node immediately for returning to the local n Journey), localsucc (n) returns to the descendant node immediately of the local n;Pred (n) returns to all predecessor nodes of n, and succ (n) is returned Return all descendant nodes of n;All ancestor nodes of anc (n) return n;All descendant nodes of des (n) return n;path_ Des (n1, n2) returns to all paths that n2 is reached from n1, these paths obtain before all passing through to traversal;P is a paths, p ∈ path_des(n1,n2);N (p) returns to all nodes on this paths p;Path_anc (n1, n2) is returned from n1 and is reached n2's All paths, these paths obtain after all passing through to traversal.
The non-concurrent set and productive set of some key nodes are calculated according to the following formula, and wherein KILL (n) indicates section The non-concurrent set of point n, GEN (n) indicate the productive set of node n.Signal_node indicates triggering primitive node, wait_ Node indicates that waiting primitive node, begin_node indicate that the ingress when opening of thread, join_node indicate that primitive is added Node, the egress create_node at the end of exit_node indicates thread indicate creation primitive node, create_succ_ Node indicates the descendant node of creation primitive.
It calculates KILL (signal_node)
Wherein wait_node is the node to match with signal_node, and wait_node and begin_node belong to together One thread.
It calculates GEN (signal_node)
GEN (signal_node) :=KILL (signal_node)
It calculates KILL (wait_node)
KILL (wait_node) :=n | n ∈ anc (signal_node)-des (signal_node) }
Signal_node is the node to match with wait_node.
It calculates KILL (begin_node)
KILL (begin_node) :=∪n∈signal_nodeKILL(n)
Begin_node and signal_node belongs to the same thread.
It calculates KILL (join_node)
KILL (join_node) :=ane (exit_node)
It calculates GEN (begin_node/create_succ_node)
Each create_node is there are two descendant node immediately, and one is begin_node, and one is create_succ_ node。
It calculates GEN (begin_node/create_succ_node)
Then the calculating of MHP is carried out according to the formula of following data-flow equations.
IN (n) :=∪p∈localpred(n)out(p)
POUT (n) :=OUT (n) ∪ IN (n) ∪ GEN (n)-KILL (n)
MHP (n)=: OUT (n)-LOCK (n)
Cycle calculations are carried out to entire concurrent program to be analyzed, so as to obtain the MHP analysis of concurrent program to be analyzed As a result.
Fig. 4 is the structural schematic diagram of the MHP analytical equipment embodiment one of concurrent program provided in an embodiment of the present invention, is such as schemed Shown in 4, the MHP analytical equipment of concurrent program provided in this embodiment includes:
Execution module 41 is simulated, for since the main thread of concurrent program to be analyzed, selecting a thread, simulation every time The execution of the concurrent program to be analyzed, wherein when the thread for simulating execution can not continue to execute, jump to it is any can The thread simulation continued to execute executes, until all threads simulation of the concurrent program to be analyzed is finished, wherein described Concurrent program to be analyzed includes at least two threads.
Controlling stream graph construct module 42, for according to the concurrent program to be analyzed carry out simulation execution as a result, structure Build Multi-thread control flow graph corresponding with the concurrent program to be analyzed.
Controlling stream graph processing module 43 obtains conservative correctly more for handling the Multi-thread control flow graph Thread controlling stream graph, there is no leakages for the concurrent MHP result of possibility for guarding each node in correct Multi-thread control flow graph Report.
MHP analysis module 44 obtains described for guarding correct Multi-thread control flow graph progress MHP analysis to described The MHP of concurrent program to be analyzed analyzes result.
The MHP analytical equipment of concurrent program provided in this embodiment for realizing concurrent program shown in Fig. 1 the analysis side MHP The process of method, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Further, in the embodiment shown in fig. 4, controlling stream graph processing module 43, if being specifically used for described multi-thread program-controlled Addition primitive node and multiple thread match in flow graph processed then delete all sides connecting with the addition primitive node;If Waiting primitive node and multiple triggering primitive node matchings in the Multi-thread control flow graph, then delete all and waiting The side of primitive node connection;Using obtained Multi-thread control flow graph as guarding correct Multi-thread control flow graph.
Further, in the embodiment shown in fig. 4, MHP analysis module 44 is specifically used for calculating described conservative correctly more The non-concurrent set and productive set of each node in thread controlling stream graph, wherein the non-concurrent set expression of node A can not be with section The set of point A concurrent node, the productive set of node A indicate the set of node caused by node A;According to the non-of each node Concurrency set and productive set iterate to calculate it is described guard each node in correct Multi-thread control flow graph MHP analysis as a result, Until MHP analysis result convergence, obtains the MHP analysis result of the concurrent program to be analyzed.
Further, in the embodiment shown in fig. 4, execution module 41 is simulated, is specifically used for executing following steps: step One, since the main thread, every time select a thread, the execution of the thread of analog selection, when the selected thread without When method continues to execute, locks the selected thread and record the current location information of the selected thread;Step 2 jumps To any first thread being not locked out and can continue to execute, simulate the execution of the first thread, when the first thread without It when method continues to execute, locks the first thread and records the current location information of the first thread, do not locked until all Thread that is fixed and can continuing to execute is modeled execution;Step 3 releases all locked threads, and repeats step Two, until all threads simulation of the concurrent program to be analyzed is finished.
Further, in the embodiment shown in fig. 4, execution module 41 is simulated, is specifically used for using depth-first search point The execution of the thread of analysis method analog selection;The execution of the first thread is simulated using depth-first search analytic approach.
Further, in the embodiment shown in fig. 4, execution module 41 is simulated, specifically for recording in scheduling information table The mark of the selected thread and the mark of current sentence;The mark of the first thread is recorded in the scheduling information table Know the mark with current sentence.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (12)

1.一种并行程序的MHP分析方法,其特征在于,包括:1. an MHP analysis method of parallel program, is characterized in that, comprises: 从待分析并行程序的主线程开始,每次选择一个线程,模拟所述待分析并行程序的执行,其中,当正在模拟执行的线程无法继续执行时,跳转至任一可继续执行的线程模拟执行,直至所述待分析并行程序的所有线程模拟执行完毕,其中,所述待分析并行程序包括至少两个线程;Starting from the main thread of the parallel program to be analyzed, select one thread at a time to simulate the execution of the parallel program to be analyzed, wherein, when the thread being simulated and executed cannot continue to execute, jump to any thread that can continue to be simulated Execute until all threads of the parallel program to be analyzed are simulated and executed, wherein the parallel program to be analyzed includes at least two threads; 根据对所述待分析并行程序进行模拟执行的结果,构建与所述待分析并行程序对应的多线程控制流图;Constructing a multithreaded control flow graph corresponding to the parallel program to be analyzed according to the result of simulated execution of the parallel program to be analyzed; 对所述多线程控制流图进行处理,得到保守正确的多线程控制流图,所述保守正确的多线程控制流图中的各节点的可能并发MHP结果不存在漏报;Processing the multi-threaded control flow graph to obtain a conservatively correct multi-threaded control flow graph, where there is no false negative in the possible concurrent MHP results of each node in the conservatively correct multi-threaded control flow graph; 对所述保守正确的多线程控制流图进行MHP分析,得到所述待分析并行程序的MHP分析结果。MHP analysis is performed on the conservatively correct multi-threaded control flow graph to obtain an MHP analysis result of the parallel program to be analyzed. 2.根据权利要求1所述的方法,其特征在于,所述对所述多线程控制流图进行处理,得到保守正确的多线程控制流图,包括:2. The method according to claim 1, wherein said processing the multi-threaded control flow graph to obtain a conservatively correct multi-threaded control flow graph comprises: 若所述多线程控制流图中的加入原语节点与多个线程匹配,则删除所有与所述加入原语节点连接的边;If the join primitive node in the multi-threaded control flow graph matches multiple threads, then delete all edges connected to the join primitive node; 若所述多线程控制流图中的等待原语节点与多个触发原语节点匹配,则删除所有与所述等待原语节点连接的边;If the waiting primitive node in the multithreaded control flow graph matches a plurality of triggering primitive nodes, then delete all edges connected to the waiting primitive node; 将得到的多线程控制流图作为保守正确的多线程控制流图。The resulting multithreaded control flow graph is regarded as a conservatively correct multithreaded control flow graph. 3.根据权利要求1或2所述的方法,其特征在于,所述对所述保守正确的多线程控制流图进行MHP分析,得到所述待分析并行程序的MHP分析结果,包括:3. The method according to claim 1 or 2, wherein the MHP analysis is performed on the conservatively correct multithreaded control flow graph to obtain the MHP analysis result of the parallel program to be analyzed, including: 计算所述保守正确的多线程控制流图中各节点的非并发集合和产生集合,其中,节点A的非并发集合表示无法与节点A并发的节点的集合,节点A的产生集合表示节点A所产生的节点的集合;Calculating the non-concurrent set and generation set of each node in the conservatively correct multi-threaded control flow graph, wherein the non-concurrent set of node A represents the set of nodes that cannot be concurrent with node A, and the generation set of node A represents the set of nodes that node A the collection of generated nodes; 根据各节点的非并发集合和产生集合迭代计算所述保守正确的多线程控制流图中各节点的MHP分析结果,直至所述MHP分析结果收敛,得到所述待分析并行程序的MHP分析结果。Iteratively calculating the MHP analysis result of each node in the conservative and correct multithreaded control flow graph according to the non-concurrent set and generation set of each node until the MHP analysis result converges to obtain the MHP analysis result of the parallel program to be analyzed. 4.根据权利要求1或2所述的方法,其特征在于,所述从所述主线程开始,每次选择一个线程,模拟所述待分析并行程序的执行,其中,当正在模拟执行的线程无法继续执行时,跳转至任一可继续执行的线程模拟执行,直至所述待分析并行程序的所有线程模拟执行完毕,包括:4. The method according to claim 1 or 2, wherein, starting from the main thread, one thread is selected at a time to simulate the execution of the parallel program to be analyzed, wherein, when the thread being simulated is being executed When the execution cannot be continued, jump to any thread that can continue to be executed for simulation execution until all the threads of the parallel program to be analyzed are simulated and executed, including: 步骤一,从所述主线程开始,每次选择一个线程,模拟选择的线程的执行,当所述选择的线程无法继续执行时,锁定所述选择的线程并记录所述选择的线程当前的位置信息;Step 1, start from the main thread, select a thread at a time, simulate the execution of the selected thread, when the selected thread cannot continue to execute, lock the selected thread and record the current position of the selected thread information; 步骤二,跳转至任一未被锁定且可继续执行的第一线程,模拟所述第一线程的执行,当所述第一线程无法继续执行时,锁定所述第一线程并记录所述第一线程当前的位置信息,直至所有未被锁定且可继续执行的线程均被模拟执行;Step 2, jump to any first thread that is not locked and can continue to execute, simulate the execution of the first thread, when the first thread cannot continue to execute, lock the first thread and record the The current location information of the first thread, until all threads that are not locked and can continue to execute are simulated; 步骤三,解除所有被锁定的线程,并重复执行步骤二,直至所述待分析并行程序的所有线程模拟执行完毕。Step 3, release all locked threads, and repeat Step 2 until all threads of the parallel program to be analyzed are simulated and executed. 5.根据权利要求4所述的方法,其特征在于,所述模拟选择的线程的执行,包括:5. The method according to claim 4, wherein the execution of the simulated selected thread comprises: 采用深度优先搜索分析法模拟选择的线程的执行;Simulate the execution of selected threads using depth-first search analysis; 所述模拟所述第一线程的执行,包括:The simulating execution of the first thread includes: 采用深度优先搜索分析法模拟所述第一线程的执行。The execution of the first thread is simulated using a depth-first search analysis method. 6.根据权利要求4所述的方法,其特征在于,所述记录所述选择的线程当前的位置信息,包括:6. The method according to claim 4, wherein the recording the current position information of the selected thread comprises: 在调度信息表中记录所述选择的线程的标识和当前的语句的标识;Record the identifier of the selected thread and the identifier of the current statement in the scheduling information table; 所述记录所述第一线程当前的位置信息,包括:The recording of the current location information of the first thread includes: 在所述调度信息表中记录所述第一线程的标识和当前的语句的标识。Record the identifier of the first thread and the identifier of the current statement in the scheduling information table. 7.一种并行程序的MHP分析装置,其特征在于,包括:7. A MHP analysis device of a parallel program, characterized in that, comprising: 模拟执行模块,用于从待分析并行程序的主线程开始,每次选择一个线程,模拟所述待分析并行程序的执行,其中,当正在模拟执行的线程无法继续执行时,跳转至任一可继续执行的线程模拟执行,直至所述待分析并行程序的所有线程模拟执行完毕,其中,所述待分析并行程序包括至少两个线程;The simulation execution module is used to start from the main thread of the parallel program to be analyzed, select a thread at a time, and simulate the execution of the parallel program to be analyzed, wherein, when the thread being simulated and executed cannot continue to execute, jump to any The thread simulation execution that can continue to be executed is performed until all threads of the parallel program to be analyzed are simulated and executed, wherein the parallel program to be analyzed includes at least two threads; 控制流图构建模块,用于根据对所述待分析并行程序进行模拟执行的结果,构建与所述待分析并行程序对应的多线程控制流图;A control flow graph construction module, configured to construct a multithreaded control flow graph corresponding to the parallel program to be analyzed according to the result of the simulated execution of the parallel program to be analyzed; 控制流图处理模块,用于对所述多线程控制流图进行处理,得到保守正确的多线程控制流图,所述保守正确的多线程控制流图中的各节点的可能并发MHP结果不存在漏报;A control flow graph processing module, configured to process the multithreaded control flow graph to obtain a conservatively correct multithreaded control flow graph, and the possible concurrent MHP results of each node in the conservatively correct multithreaded control flow graph do not exist False report; MHP分析模块,用于对所述保守正确的多线程控制流图进行MHP分析,得到所述待分析并行程序的MHP分析结果。The MHP analysis module is configured to perform MHP analysis on the conservative and correct multi-threaded control flow graph to obtain the MHP analysis result of the parallel program to be analyzed. 8.根据权利要求7所述的装置,其特征在于,所述控制流图处理模块,具体用于若所述多线程控制流图中的加入原语节点与多个线程匹配,则删除所有与所述加入原语节点连接的边;若所述多线程控制流图中的等待原语节点与多个触发原语节点匹配,则删除所有与所述等待原语节点连接的边;将得到的多线程控制流图作为保守正确的多线程控制流图。8. The device according to claim 7, wherein the control flow graph processing module is specifically configured to delete all primitive nodes associated with Adding the edge connected to the primitive node; if the waiting primitive node in the multithreaded control flow graph matches a plurality of triggering primitive nodes, then delete all edges connected to the waiting primitive node; the obtained Multithreaded control flow graph as a conservatively correct multithreaded control flow graph. 9.根据权利要求7或8所述的装置,其特征在于,所述MHP分析模块,具体用于计算所述保守正确的多线程控制流图中各节点的非并发集合和产生集合,其中,节点A的非并发集合表示无法与节点A并发的节点的集合,节点A的产生集合表示节点A所产生的节点的集合;根据各节点的非并发集合和产生集合迭代计算所述保守正确的多线程控制流图中各节点的MHP分析结果,直至所述MHP分析结果收敛,得到所述待分析并行程序的MHP分析结果。9. The device according to claim 7 or 8, wherein the MHP analysis module is specifically used to calculate the non-concurrent set and generation set of each node in the conservatively correct multi-threaded control flow graph, wherein, The non-concurrent collection of node A represents the collection of nodes that cannot be concurrent with node A, and the generation collection of node A represents the collection of nodes generated by node A; iteratively calculates the conservative and correct multiple The thread controls the MHP analysis result of each node in the flow graph until the MHP analysis result converges to obtain the MHP analysis result of the parallel program to be analyzed. 10.根据权利要求7或8所述的装置,其特征在于,所述模拟执行模块,具体用于执行如下步骤:步骤一,从所述主线程开始,每次选择一个线程,模拟选择的线程的执行,当所述选择的线程无法继续执行时,锁定所述选择的线程并记录所述选择的线程当前的位置信息;步骤二,跳转至任一未被锁定且可继续执行的第一线程,模拟所述第一线程的执行,当所述第一线程无法继续执行时,锁定所述第一线程并记录所述第一线程当前的位置信息,直至所有未被锁定且可继续执行的线程均被模拟执行;步骤三,解除所有被锁定的线程,并重复执行步骤二,直至所述待分析并行程序的所有线程模拟执行完毕。10. The device according to claim 7 or 8, wherein the simulation execution module is specifically configured to perform the following steps: Step 1, starting from the main thread, select one thread at a time, and simulate the selected thread When the selected thread cannot continue to execute, lock the selected thread and record the current location information of the selected thread; step 2, jump to any unlocked and continue to execute the first thread, simulating the execution of the first thread, when the first thread cannot continue to execute, lock the first thread and record the current location information of the first thread until all unlocked and continue to execute All the threads are simulated and executed; Step 3, release all locked threads, and repeat Step 2 until all the threads of the parallel program to be analyzed are simulated and executed. 11.根据权利要求10所述的装置,其特征在于,所述模拟执行模块,具体用于采用深度优先搜索分析法模拟选择的线程的执行;采用深度优先搜索分析法模拟所述第一线程的执行。11. The device according to claim 10, wherein the simulation execution module is specifically configured to simulate the execution of the selected thread by using a depth-first search analysis method; simulate the execution of the first thread by using a depth-first search analysis method implement. 12.根据权利要求10所述的装置,其特征在于,所述模拟执行模块,具体用于在调度信息表中记录所述选择的线程的标识和当前的语句的标识;在所述调度信息表中记录所述第一线程的标识和当前的语句的标识。12. The device according to claim 10, wherein the simulation execution module is specifically configured to record the identifier of the selected thread and the identifier of the current statement in the scheduling information table; The ID of the first thread and the ID of the current statement are recorded in .
CN201610527181.2A 2016-07-06 2016-07-06 The MHP analysis method and device of concurrent program Active CN106201874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610527181.2A CN106201874B (en) 2016-07-06 2016-07-06 The MHP analysis method and device of concurrent program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610527181.2A CN106201874B (en) 2016-07-06 2016-07-06 The MHP analysis method and device of concurrent program

Publications (2)

Publication Number Publication Date
CN106201874A CN106201874A (en) 2016-12-07
CN106201874B true CN106201874B (en) 2018-12-28

Family

ID=57465874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610527181.2A Active CN106201874B (en) 2016-07-06 2016-07-06 The MHP analysis method and device of concurrent program

Country Status (1)

Country Link
CN (1) CN106201874B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0406602B1 (en) * 1989-06-29 1995-08-16 International Business Machines Corporation Method and apparatus for debugging parallel programs by serialization
CN101937365A (en) * 2009-06-30 2011-01-05 国际商业机器公司 Deadlock detection method of parallel programs and system
CN102073588A (en) * 2010-12-28 2011-05-25 北京邮电大学 Code static analysis based multithread deadlock detection method and system
CN104536898A (en) * 2015-01-19 2015-04-22 浙江大学 C-program parallel region detecting method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0406602B1 (en) * 1989-06-29 1995-08-16 International Business Machines Corporation Method and apparatus for debugging parallel programs by serialization
CN101937365A (en) * 2009-06-30 2011-01-05 国际商业机器公司 Deadlock detection method of parallel programs and system
CN102073588A (en) * 2010-12-28 2011-05-25 北京邮电大学 Code static analysis based multithread deadlock detection method and system
CN104536898A (en) * 2015-01-19 2015-04-22 浙江大学 C-program parallel region detecting method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高可扩展性的MHP分析算法;印乐;《软件学报》;20131130;第2289-2299页 *

Also Published As

Publication number Publication date
CN106201874A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
Fellner et al. Model-based, mutation-driven test-case generation via heuristic-guided branching search
US8365152B2 (en) Path-sensitive analysis through infeasible-path detection and syntactic language refinement
CN104536883B (en) A kind of static defect detection method and its system
Bensalem et al. Confirmation of deadlock potentials detected by runtime analysis
Santone et al. Abstract reduction in directed model checking ccs processes
Remenska et al. Using model checking to analyze the system behavior of the LHC production grid
Baluda et al. Bidirectional symbolic analysis for effective branch testing
Slaby et al. Compact symbolic execution
CN104267936A (en) Semantic tree based asynchronous dynamic push-down network reachability analysis method
CN106201874B (en) The MHP analysis method and device of concurrent program
Chechik et al. Property-based methods for collaborative model development
Wang et al. Symbolic predictive analysis for concurrent programs
Ito et al. A method for detecting bad smells and ITS application to software engineering education
Wang et al. Interactive inconsistency fixing in feature modeling
Binalialhag et al. Static slicing of Use Case Maps requirements models
Novella et al. Automatic test set generation for event-driven systems in the absence of specifications combining testing with model inference
Remenska Bringing model checking closer to practical software engineering
Cheng et al. Algorithms for synthesizing priorities in component-based systems
Mavridou et al. Automated Formalization of Probabilistic Requirements from Structured Natural Language
Chen et al. On interleaving space exploration of multi-threaded programs
Xiao et al. An On-the-fly Synthesis Framework for LTL over Finite Traces
Altaie et al. Automated test suite generation tool based on GWO algorithm
Xu et al. A log-linear probabilistic model for prioritizing extract method refactorings
Marchant et al. Delivering Rules-Based Workflows for Science
Zhang et al. Regression test generation approach based on tree-structured analysis

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant