Python-oriented function calling path (FCP) generation method and system

A technology of function call path and function call relationship, which is applied in the fields of electrical digital data processing, software testing/debugging, instruments, etc., can solve problems such as poor Python language support, and achieve the effect of avoiding the problem of explosive growth

Active Publication Date: 2018-02-16
BEIJING INFORMATION SCI & TECH UNIV
View PDF4 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In view of the lack of testing methods and tools for the Python language in the prior art, which leads to poor support for the Python language, the technical problem to be solved by the embodiments of the present invention is to propose a method and system for generating a Python-oriented function call path, at least partially Solve the problems existing in the existing technology

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
  • Python-oriented function calling path (FCP) generation method and system
  • Python-oriented function calling path (FCP) generation method and system
  • Python-oriented function calling path (FCP) generation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0064] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments.

[0065] 1. Path coverage generation technology

[0066] The core of path coverage is to find the most errors in the program with the least test cases. The minimum set of test cases should be able to cover all paths in the program. In order to achieve path coverage, the number of paths of the program under test must be known exactly, in order to arrange test plans, allocate test resources, and evaluate the coverage achieved by the actual test to decide whether to end the test work. Path coverage is the only coverage testing method that considers the compositional relationship between different decisions in the same program, and it requires that each possible path in the program be executed at least once. Path coverage has strict coverage rules and thorou...

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 embodiment of the invention provides a Python-oriented function calling path generation method and system. The method includes: acquiring an abstract syntax tree (AST) of Python source code, and traversing the abstract syntax tree to acquire key information therein; and combining control structure characteristics of a Python language to construct a corresponding function calling relationship model according to the extracted key information, carrying out storage by a tree-shaped structure, and recording calling relationships between functions to generate the function calling relationship model, wherein each node in the function calling relationship model represents one of the functions in the source code, and a child node of one of the nodes represents a branch if the child node exists,one of the nodes represents the function, which is executed in an orderly manner, if a branch of the node does not exist, and sibling nodes and parent nodes in the function calling relationship modelare in parallel relationships, and indicate multi-branch structures in the source code.

Description

technical field [0001] The invention relates to the technical field of computer software, in particular to a method and system for generating a Python-oriented function calling path. Background technique [0002] With the rise of Python, more and more programmers and researchers choose Python as the language of choice for web applications, game development, and scientific computing. In the era of rapid development of Internet technology and big data technology, Python, as an object-oriented interpreted computer programming scripting language, is known for its good readability, interactivity, versatility, portability, scalability, Features such as maintainability and embeddability have attracted many software developers and become a leader among many scripting languages. In recent years, Python has become one of the most popular programming languages, gradually becoming the language of choice for scientific computing, web application and game development. Therefore, the tes...

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/3624G06F11/3676
Inventor 牟永敏
Owner BEIJING INFORMATION SCI & TECH 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