Multithreaded program output uniqueness detection and evidence generation method based on program constraint building

A technology of program constraints and program output, applied in error detection/correction, electrical digital data processing, software testing/debugging, etc.

Active Publication Date: 2014-10-01
XI AN JIAOTONG UNIV
View PDF3 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although model checking solves the verification problem of multi-threaded programs to a certain extent, it has the problem of state space explosion, which makes it difficult to extend the application to large and complex software systems.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Multithreaded program output uniqueness detection and evidence generation method based on program constraint building
  • Multithreaded program output uniqueness detection and evidence generation method based on program constraint building
  • Multithreaded program output uniqueness detection and evidence generation method based on program constraint building

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0062] Embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings and examples. The program under test is as follows, x and y are shared variables, and thread 0 creates thread 1 and thread 2 in line 1 and line 2.

[0063]

[0064] like figure 1 As shown, an output uniqueness verification method based on multi-threaded program constraints includes the following steps:

[0065] Step S1): Implanting the monitoring code into the program under test to record the execution process of the program. At the level of LLVM bytecode, the code style presented after the instrumentation is completed is as follows;

[0066]

[0067] Among them, the function clap_inst_pre is the inserted monitoring statement, which monitors the subsequent line of statement, and outputs the thread ID, instruction ID, status value and return value of the subsequent line during execution.

[0068] Step S2): Under the given input, execute the sample...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a multithreaded program output uniqueness detection and evidence generation method based on program constraint building. The output uniqueness verification problem is converted into a constraint solving problem by building a constraint expression according to the multithreaded program semanteme, a constraint solver is used for detecting whether different outputs are present and counter-example execution paths explaining different outputs are generated; the multithreaded program output uniqueness detection and evidence generation method comprises the steps of firstly, carrying out the instrumentation of the detected program, executing the program and obtaining an execution path, secondly, converting the execution path into a quantifier-free first-order logic expression covering all feasible thread interleaving according to the multithreaded program execution semanteme, thirdly, building a uniqueness verification condition aiming at the output result of once operation, and finally, verifying whether one path is present so that the output value is inconsistent with the operation result by use of the constraint solver. The method is capable of detecting whether the output of the multithreaded program is unique under given input; in case of non-uniqueness of the outputs, a counter-example sequence is shown to explain the trigger process of the non-uniqueness.

Description

technical field [0001] The invention relates to the field of trusted software and software testing, in particular to a multi-threaded program output uniqueness detection and evidence generation method constructed based on program constraints. Background technique [0002] With the widespread use of multi-core processors, writing multi-threaded programs with good performance and structure has become an important way to release the potential of multi-core processors. Debugging cryptic bugs in multithreaded programs has become a top priority. For a serial program, the output must be unique under multiple executions of the same input. However, for multiple executions of a multi-threaded program under the same input, it may not be able to produce a unique output. Because a multi-threaded program may generate different thread interleaving during each execution process, it will also have different effects on the execution results of the program. Therefore, how to verify the uniq...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/36G06F11/3608G06F11/3688G06F11/3692
Inventor 刘烃张晓东刘沛俞乐晨郑庆华
Owner XI AN JIAOTONG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products