Method for generating bit operation test case based on four-valued logic

A test case generation and logic operation technology, applied in software testing/debugging, etc., can solve the problem of low test case generation efficiency, and achieve the effect of improving generation efficiency and search efficiency

Inactive Publication Date: 2015-10-28
BEIJING UNIV OF POSTS & TELECOMM
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The purpose of the present invention is to solve the problem that the test case generation efficiency of bit operation is not high, and a method for generating test case for bit operation based on four-valued logic is provided

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
  • Method for generating bit operation test case based on four-valued logic
  • Method for generating bit operation test case based on four-valued logic
  • Method for generating bit operation test case based on four-valued logic

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] The present invention will be further described in detail below with reference to the drawings and embodiments.

[0038] In two-valued logic, a proposition has only two values ​​of "true" and "false". If it is not limited to two values ​​of "true" and "false", but three values, four values, or any number of values, it is called For multi-valued logic.

[0039] In 1920, Jan Extending Aristotle's classic binary logic, creating the logical value of "possibility" to solve Aristotle's "Naval Battle Paradox". In 1921, Emil L. Post introduced n-valued logic (n≥2). Multi-valued logic is used in logic operations because it is possible to determine the result of the operation even if the operand is uncertain.

[0040] For example, x&0=y, no matter if x is 0 or 1, x&0=0, so y=0.

[0041] Some abstract values ​​of logical operations are as follows:

[0042] Serial number

Abstract value

Description

Example

1

There is no corresponding specific value

x&0=1, then x=⊥x=⊥

2

0

x ...

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 discloses a method for generating a bit operation test case based on four-valued logic, and belongs to the technical field of test case generation in a software test. The method specifically comprises the following steps: a first step of setting a four-valued logic operation method and an inverse operation method of four-valued logic operation; a second step of resolving a bit operation constraint into logic operation constraints; a third step of enabling the logic operation constraints to correspond to constraint satisfaction problems; a fourth step of solving the logic operation constraints by virtue of a search algorithm according to the four-valued logic operation and inverse operation methods; and 5 synthesizing the solutions of the logic operation constraints into a solution of the bit operation constraint. The method has the advantages that the range of a variable is computed by employing the multi-valued logic, so that the search efficiency of the search space and the bit operation is improved; and the test case generation efficiency of the bit operation is further improved.

Description

Technical field [0001] The invention relates to the technical field of test case generation in software testing, in particular to the processing of bit operations, and in particular to a method for generating test cases based on four-valued logic. Background technique [0002] Bit operation refers to the logical operation of each bit in the binary form of the integer; the logical operation is also called Boolean operation, and the operation is performed in the unit of false or true; 0 means false and 1 means true. [0003] There are 11 numerical operations in C language, divided into three categories: ①Based on the four arithmetic operations: including addition, subtraction, multiplication, division, and modulo; the corresponding operation symbols are: +, -, *, / , %; ②Based on logical operations: including bitwise AND, bitwise OR, bitwise XOR, bitwise inversion; the corresponding operation symbols are: &, |, ^, ~; ③shift: including right shift, left Shift, the corresponding symbol...

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
Inventor 金大海李峰宫云战王雅文黄俊飞
Owner BEIJING UNIV OF POSTS & TELECOMM
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