Unlock instant, AI-driven research and patent intelligence for your innovation.

Object usage scenario extraction method and device

An extraction method and scene technology, which are applied in the field of object usage scene extraction methods and devices, and can solve the problem of insufficient number of object usage scenes and the like

Active Publication Date: 2015-11-18
WUHAN INSTITUTE OF TECHNOLOGY
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The present invention provides a method and device for extracting object usage scenarios, which are used to solve the technical problem of insufficient number of object usage scenarios in the prior art when mining component protocols

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
  • Object usage scenario extraction method and device
  • Object usage scenario extraction method and device
  • Object usage scenario extraction method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] This embodiment provides a method for extracting object usage scenarios, please refer to figure 1 , figure 1 The step diagram of the object use scene extraction method provided in this embodiment, such as figure 1 As shown, the method includes:

[0045] Step S101, acquiring the first object usage scenario of the target class; the first object usage scenario is a sequence of N functions called in the first order, where N is an integer greater than 1;

[0046] Step S102, determining a first parent class according to the target class; the first parent class is the parent class of the target class;

[0047] Step S103, determining L functions from the N functions; the L functions are all functions of the first parent class; N≥L>1;

[0048]Step S104, arranging the L functions according to the first order to generate a second object usage scenario of the first parent class; the second object usage scenario is an inherited child object of the first object usage scenario sce...

Embodiment 2

[0115] This embodiment provides an object usage scene extraction device, such as image 3 As shown, the device includes:

[0116] An acquisition unit 301, configured to acquire a first object usage scenario of a target class; the first object usage scenario is a sequence of N functions called in a first order, where N is an integer greater than 1;

[0117] The first determining unit 302 is configured to determine a first parent class according to the target class; the first parent class is a parent class of the target class;

[0118] The second determining unit 303 is configured to determine L functions from the N functions; the L functions are all functions of the first parent class; N≥L>1;

[0119] A generating unit 304, configured to arrange the L functions in the first order to generate a second object usage scenario of the first parent class; the second object usage scenario is the first object usage scenario Inherited sub-object usage scenarios.

[0120] In this embod...

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 present invention discloses an object usage scenario extraction method and device. The method includes: obtaining a first object usage scenario of a target class, wherein the first object usage scenario is a sequence of N functions called by a first sequence; determining a first parent class according to the target class, wherein the first parent class is the parent class of the target class; determining L functions from the N functions, wherein the L functions are the functions of the first parent class, wherein N=>L>1; arranging the L functions according to the first sequence to generate a second object usage scenario of the first parent class, wherein the second object usage scenario is a inheritance subobject of the first object usage scenario. The method and device provided by the present invention are used to solve the technical problem that when component contracts are mined, the quantity of object usage scenarios is inadequate, and achieve the technical effect that function call sequences of a mass of object usage scenarios can be obtained by running a small number of application programs.

Description

technical field [0001] The invention relates to the technical field of program mining, in particular to a method and device for extracting object usage scenarios. Background technique [0002] Timing constraints usually exist between interface functions of software components. The timing constraints that need to be followed when using a software component constitute a protocol for that component, the component protocol. This protocol specifies the sequence of calls between interface functions. As shown below, a timing constraint of classes java.util.Stack and java.util.Iteration are shown respectively: [0003] Before calling the peek() function of the Stack class to view the top element of the stack, you should call push() to insert an element into the stack; [0004] Before calling the next() function of the Iteration class to get the next element, the hasNext() function should be called to check whether the next element exists. [0005] This constraint information can...

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): G06F9/44
Inventor 陈灯魏巍张彦铎李迅于宝成鲁统伟闵峰周华兵朱锐彭丽
Owner WUHAN INSTITUTE OF TECHNOLOGY