CN107391124A - A kind of condition dicing method based on golden section search and software perform track - Google Patents

A kind of condition dicing method based on golden section search and software perform track Download PDF

Info

Publication number
CN107391124A
CN107391124A CN201710530045.3A CN201710530045A CN107391124A CN 107391124 A CN107391124 A CN 107391124A CN 201710530045 A CN201710530045 A CN 201710530045A CN 107391124 A CN107391124 A CN 107391124A
Authority
CN
China
Prior art keywords
program
section
collection
sentence
mrow
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.)
Granted
Application number
CN201710530045.3A
Other languages
Chinese (zh)
Other versions
CN107391124B (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.)
Southeast University
Original Assignee
Southeast University
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 Southeast University filed Critical Southeast University
Priority to CN201710530045.3A priority Critical patent/CN107391124B/en
Publication of CN107391124A publication Critical patent/CN107391124A/en
Application granted granted Critical
Publication of CN107391124B publication Critical patent/CN107391124B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding

Landscapes

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

Abstract

The invention discloses a kind of condition dicing method based on golden section search and software perform track, according to given first-order predicate logic collection, in qualified section, input of the variate-value as program dynamic operation is chosen according to golden section search, corresponding sentence covering collection is calculated in the perform track set being run multiple times by program, based on this, with reference to the static slicing of program, the condition section of program is calculated.Because this method does not need the global analysis of program, efficiency is improved, and space complexity is relatively low, the perform track of program obtains convenient in addition, is not influenceed by Program Type so that this method can be applied to interprocedual, object-oriented, concurrent program.

Description

A kind of condition dicing method based on golden section search and software perform track
Technical field
The invention belongs to software maintenance Program section field, it is related to one kind and rail is performed based on golden section search and software The condition dicing method of mark.
Background technology
Program slice is to extract the variable interested to user in source program or the direct or indirect related code of sentence The set of the fresh code of gained, due to the scale of program significantly being reduced, is easy to program comprehension, and application value is higher.The skill Art proposed so far from Weiser in 1979, in software analysis, understanding, debugging, test, measurement, software quality assurance, inverse Had a wide range of applications in terms of engineering etc. is many.Therefore there is a series of species of program slices, condition section is base A kind of more practical program slice between static slicing and Dynamic Slicing.
Condition dicing method main at present has:
The symbolic excution methodology that G.Canfora, A.Cimitile and D.Lucia in 1998 are proposed.This method is according to input The limitation of condition, program is simplified by the calculating of semiology analysis.This method can be in more accurate processing procedure Condition is cut into slices, but can not between processing procedure, object-oriented and concurrent class method.
M.Daoudi and L.Ouarbya in 2002 et al. propose by FermaT transformation system and symbol Number perform the method that is combined.This method further increases program simplification technology, but still can not between processing procedure, towards right As and concurrent class method.
The dependency graph Reconstruction Method that Wang Xiao-hua and GuYi-dong in 2008 et al. are proposed.This method can improve The valid code section of the gained section of condition section, but still can not between processing procedure, object-oriented and concurrent class method.
Program pitching pile is a kind of common technology for obtaining program dynamic operation information, is carried by professor J.C.Huang earliest Go out, it is to insert some probe (also known as " detections in a program on the basis of the original logic integrality of tested program is ensured Instrument ", substantially it is exactly the code segment for carrying out information gathering, can is assignment statement or the function call of collection coverage information), lead to Cross the execution of probe and dish out program operation characteristic, by the analysis to these data, the control of program can be obtained Stream and traffic flow information, and then the multidate informations such as Logic coverage are obtained, so as to realize the method for test purpose.
The implication of condition section is, for the program of comprising variable input, to limit the first-order predicate collection that variable inputs so that The value of variable has certain limitation, and the operation of line program is entered in the range of limitation.Based on the program limit of restriction, herein it The upper calculating for implementing static slicing, the section in program range of operation is extracted, and just obtains final condition section.Pass through Insert to obtain the trace information of program dynamic operation, and aid in the implementation of Slicing Algorithm, be that the common of dynamic program slicing is done Method.Here we are chosen by golden section search method to variate-value, as the input of program, by being run multiple times, Obtain final sentence covering collection, with reference to static slicing, the calculating applied to condition section.
The content of the invention
Technical problem:The present invention is provided one kind and variate-value can chosen using golden section search, and is passed through The perform track information calculation procedure that software is run multiple times sentence covering collection, have compared with high precision and application it is wider Condition dicing method based on golden section search and software perform track.
Technical scheme:The condition dicing method based on golden section search and software perform track of the present invention, including such as Lower step:
Step 1) inserts to source code, obtains to produce the program with probe of perform track during operation;
Step 2) chooses the variate-value for meeting first-order predicate logic collection by golden section search, and specific method is: Meet in the span that first order logic limits, choose section to be split, obtained by way of golden section search takes a little To the value of variable, the input as program operation;
Step 3) obtains perform track, and configuration performs the program with probe that the step 1) obtains, during operation Real time execution track is produced, the perform track of this secondary program operation is obtained after the completion of operation;
Then step 4) chooses current variable values with left adjacent variate-value as right area using following formula computing statement covering collection Between end points and left interval endpoint value, obtain new range of variables:
statementsi+1=statementsi∪ti+1
Wherein, i represents the numbering of perform track, statementsi+1For the sentence covering of preceding i+1 secondary programs operation gained Collection, statementsiSentence for preceding i secondary programs operation gained covers collection, ti+1For the track of i+1 secondary program operation;
If the sentence covering collection updates, new range of variables is added in section set to be split, then Return to step 2);If covering collection does not update, time of the new range of variables golden section is set as follows Number α:
If setting α values before the parent section where new range of variables, α=α -1 is made, if α is not changed into 0, Then direct return to step 2);If α is changed into 0, give up the new range of variables, now if section to be split and pending Variable is sky, then sentence covering collection, which calculates, completes, into step 5), otherwise return to step 2);
If the parent section where new range of variables did not set α values before, calculate and left adjacent execution rail The sentence covering collection difference of mark, then covers collection difference with the sentence, the α values of new range of variables is set according to following formula:
Wherein j and i+1 represents to choose the numbering of variable, αJ, i+1Execution route j and i+1 segmentation times value are represented, to Further verify whether the section can also cover collection to sentence and have an impact, diffJ, i+1Represent the different collection of both perform tracks Corresponding sentence covering number, sj∪si+1The sentence covering sum of both perform tracks is represented, β is the index of setting, according to right The accuracy requirement of path covering is adjusted;
Step 5) design conditions are cut into slices, and idiographic flow is:
A) corresponding nodal information in code is obtained by the abstract syntax tree of analysis source code, extracted between each node Dependence, build complete program dependency graph;
B) based on described program dependency graph, static slicing algorithm is performed with reference to source code, obtains static slicing staticSlice;
C) static slicing staticSlice and sentence covering collection statements are combined, utilizes the bar of following formula calculation procedure Part is cut into slices:
ConditionedSlice=staticSlice ∩ statements.
Further, in the inventive method, the golden section search in step 2) is that left and right two is chosen in section The value of golden ratio is variate-value.
The inventive method carries out value according to golden section search to variable, and caused hold is run multiple times using software Row track be calculated the sentence covering collection of program, and the dependency graph for source code construction procedures simultaneously uses based on this What static slicing algorithm calculated obtains static slicing, and condition, which is calculated, by sentence covering collection and static slicing cuts into slices.
Beneficial effect:The inventive method proposes to carry out variable value according to golden section search, and is transported using software Perform track software for calculation covering collection caused by row, with reference to static slicing, for solving the section problem of the condition in software.This Invention compared with prior art, mainly there is following some advantages:
(1) space complexity needed is relatively low, and trace information obtains conveniently.The inventive method to source program by inserting Mode, according to golden section search and sentence covering and difference calculate, have compared with high coverage rate variate-value choose, pass through Program dynamic operation obtains corresponding perform track, can conveniently calculation procedure sentence covering set.And tradition symbol Number performing analytic approach has path explosion, as the number of path of program exponentially increases because of the quantity of branch statement, accords with Number executory sign condition also can explosive growth, cause the space complexity of analysis path branch very high, the effect of analysis Rate can also decline, and state value of the inventive method because that need not analyze each symbol, thus in the absence of it is such the problem of, using compared with For convenience.
(2) due to do not need program global analysis, have a wide range of application, be not limited to interprocedual program, suitable for towards Object and concurrent program.Software execution is the direct performance of software action, and the result that multiple software performs can be accurate Embody the operation coverage condition of program.Need to carry out global analysis compared to symbolic excution methodology, the inventive method is not by program The restriction of type, it can be carried out analyzing for the object-oriented program and concurrent program of complexity, and semiology analysis analytic approach Run into it is larger, comprising many interproceduals call program carry out context-sensitive analysis when, expense is larger.And due to symbol Number perform analysis nature static, cause it can not analyze concurrent program.
(3) calculation of this method is relatively simple, is adapted to many aspects such as software analysis, understanding, debugging.Due to bar Part section is a subset of static slicing, and by static slicing and sentence covering collection, we can very easily calculate Cut into slices to condition.And semiology analysis analytic approach needs when realizing to be modeled the structure semanticses for being analyzed code, then to being divided The operational semantics of analysis code is modeled, and the degree of accuracy of model will directly affect analysis result, but due to being used in programming language Data structure and action statement has higher flexibility so that modeling becomes very difficult.Comparatively speaking, this method operates It is relatively easy, calculate more convenient.
Brief description of the drawings
Fig. 1 is the contact figure between the data being related in the present invention.
Fig. 2 is the architectural schematic of the present invention, represent in the present invention data handling component that is related to and its between Contact.
Fig. 3 is the source code figure of the specific embodiment of the invention, and wherein Fig. 3 (a) represents the code before inserting, and Fig. 3 (b) is represented Code after inserting.
Fig. 4 is the program dependency graph corresponding to specific embodiment of the invention source code.
Fig. 5 is the flow chart of the present invention.
Embodiment
The technical scheme of invention is described in detail with reference to embodiment and Figure of description:
The present invention is by the inserting to source program, for given first-order predicate logic collection, according to golden section search Variate-value is chosen, is run multiple times using program and produces perform track information, corresponding code statement covering is calculated Set, and based on this, corresponding condition section is calculated with reference to the result of static slicing, emphasizes the simple of calculating process Easy and wide applicability.
Fig. 1 gives the data message being related in our used methods, including:1. insert the journey completed Sequence, obtained by program inserting technology by way of software source codes inserting, be running software generation perform track letter in this method The basis of breath;2. qualified variate-value, by parsing the restriction of first-order predicate logic, pass through golden section search, choosing Qualified variate-value is taken, the input as program operation;3. static slicing, by analysis source code and reaction of formation code The dependency graph of relation of interdependence between sentence, and implement static slicing algorithm based on this and obtain;4. by all execution rails Mark information takes union, can calculate the sentence covering collection that corresponding predicate logic limits;5. condition is cut into slices, with reference to static slicing and Sentence covering collection obtains.
First, architecture
Fig. 2 is given based on the condition of golden section search and software perform track section design architecture.Give below Go out illustrating for several major parts.
1 source code inserts component
The function of this component is corresponding in being inserted on the basis of original program logic structure is not changed in source code Probe, it is easy to program to obtain corresponding perform track information when running.The execution rail of program operation is primarily upon in the present invention Corresponding sentence Perform sequence in mark, i.e. source code.
Fig. 3 (a) is source code to be inserted, and Fig. 3 (b) is to complete the code after inserting, can for each in code Perform sentence and assign probe, perform track during for logging program dynamic operation.Wherein first ginseng of Probe methods Number File is the numbering for performing file, and second parameter represents the corresponding sentence mark for performing file.
2 golden section search variables choose component
The major function of this component is on the basis of given first-order predicate logic collection condition is met, in corresponding section It is interior, corresponding variate-value is chosen by golden section search, the input as program operation.
Section to be split represents the variable-value scope that predicate collection limits, such as given section [a, b], according to golden section Search method, it is respectively the input of a+0.618* (b-a) and b-0.618* (b-a) as program that we, which choose variate-value,.For every Individual value, it is separately operable perform track corresponding to program acquisition.
3 perform track formation components
The major function of this component is input of the variate-value chosen according to golden section search as program, and configuration is transported The program that row has inserted, obtains the perform track of program dynamic operation, and the input of collection calculating is covered as sentence.
For the program inserted in Fig. 3 (b), when we using 25.6 as program input when, following fortune will be obtained Row track:
ABCDEGIJN
Corresponding document id output is wherein eliminated, according to the perform track, the calculating collected can be covered to enter line statement.
4 sentences covering collection computing module
The major function of this component is the perform track obtained using program dynamic operation, calculates the corresponding sentence of renewal and covers Lid set.Whether being updated according to sentence covering collection simultaneously and treat segmentation section and be updated, while statement covering collection is when updating, Using current variable values as section right-hand member point value, adjacent left value is section left end point value, area to be split will be added between the new district Between concentrate, if statement covering collection does not update, then need number α to be split corresponding to computation interval.
5 static slicing components
The component its corresponding abstract syntax tree according to source code analysis, corresponding information is extracted from AST, passes through foundation Corresponding sentence node and dependence edge, it is finally completed the structure of program dependency graph.Wherein dependence edge predominantly control rely on And data dependence, control relies on execution of the execution for representing a sentence dependent on another sentence, and data dependence then represents Variable defined in another sentence has been used in one sentence.
For Fig. 3 (a) source code, by the structure of dependency graph, the program that we may finally obtain shown in Fig. 4 relies on Figure.Wherein solid line represents that control relies on, and dotted line represents data dependence.Static slicing, the section finally given are carried out to N nodes For:CDEFGHIJKLMN.
6 conditions section component
The component takes both common factors to obtain final condition section using static slicing and sentence covering collection set.It is soft Part analysis personnel can by condition cut into slices result be applied to software analysis, understanding, debugging, test, measurement, software quality assurance, The fields such as reverse-engineering.
2nd, method flow
This method chooses the value of variable according to golden section search, and corresponding rail is obtained by more secondary program dynamic operations Mark simultaneously calculates final sentence covering collection, and final condition section is calculated with reference to static slicing.Comprise the following steps that (referring to Shown in Fig. 5):
Step 1) source code inserts.Source code is inserted, obtains to produce the band probe of running orbit during operation Program;
Step 2) golden section search variable-value.The variate-value needed for program operation is chosen, is concretely comprised the following steps:
If (a) programs are run for the first time, it is variate-value as program to take left interval endpoint value and right interval endpoint value Input, if endpoint value is open interval, be adjusted first, be converted to closed interval, integer stepping is 1, floating number number step Entering can be chosen according to precision.
(b) is then used as input if pending variable-value directly as the variate-value of this secondary program operation.
(c) if chooses a section to be split, passes through golden section search without pending variable-value The variate-value for meeting first-order predicate logic collection is chosen, the input as program operation.
Step 3) Track Pick-up.Configuration inserting program, the variate-value operation of selection is inputted, is produced during operation real-time Running orbit, the track set t of this secondary program operation is obtained after the completion of operationi+1
Step 4) sentence covering collection calculates.Comprise the following steps that:
(a) utilizes following formula computing statement covering collection:
statementsi+1=statementsi∪ti+1
Wherein, statementsiFor the perform track set of preceding i secondary programs operation gained, ti+1Transported for i+1 secondary program Capable track;Current variable values are chosen with left adjacent variate-value as right interval endpoint and left interval endpoint value, obtain new change Section is measured, renewal does not occur and then enters step (b) for if statement covering collection, otherwise performs step (d).
(b) sets corresponding α values between new district, for limiting the number of the section golden section, if where the section There is α values in parent section, then only need to be changed into α -1, if α is changed into 0, give up between the new district.Now if section to be split And pending variable is sky, then sentence covering collection, which calculates, completes, and otherwise goes to step 2).If parent section does not have α values limit It is fixed, into next step.
(c) calculates collects difference with the covering of the sentence of left adjacent perform track, and the α values in the section, specific formula are set with this It is as follows:
Wherein αI, i+1Execution route j and i+1 segmentation times value are represented, further to verify whether the section can also be right Sentence covering collection has an impact, diffJ, i+1Represent the corresponding sentence covering number of the different collection of both perform tracks, sj∪si+1 The sentence covering sum of both perform tracks is represented, β is the index of setting, can be adjusted according to the accuracy requirement that path covers It is whole.Enter step (d) after the completion of calculating.
(d) goes to step 2), will be added between new district in section set to be split, then re-starts golden section search Choose variate-value and carry out Track Pick-up.
Step 5) design conditions are cut into slices.
A) obtained by the abstract syntax tree (Abstract Syntax Tree are abbreviated as AST) of analysis source code in code Corresponding nodal information, extracts the dependence between each node, and data dependence and control rely on, build complete program according to Lai Tu;
B) based on dependency graph, static slicing algorithm is performed with reference to source code, obtains static slicing staticSlice;
C) static slicing code collection and sentence covering statements are combined, obtains condition section;
Cut into slices using the condition of following formula calculation procedure:
ConditionedSlice=staticSlice ∩ statements
So, we choose variate-value with golden section search, journey are run multiple times by given predicate logic set Sequence produces perform track, calculates corresponding sentence covering collection, and condition section is calculated with reference to static slicing.There is no program class The limitation of type, there is perfect variate-value to gather, higher sentence covering precision, be relatively defined by relatively low space complexity True condition section.
In order to facilitate description, it is assumed that there is application example simplified as follows:
Fig. 3 (a) is application example source code, and we choose β=5 herein, the parameter as condition section precision.Given meaning Word set { 0.7≤n < 30.002 } is implemented successively according to our above-mentioned calculation procedures:
The first step, source code inserting.After inserting, we will obtain the program inserted shown in Fig. 3 (b).
Second step, sentence covering collection calculate.Because step 2) to step 4) includes circulation, here for the convenience of demonstration, Illustrate together, wherein (ii) represents step 2), (iii) represents step 3), and (iv) represents step 4), and interval represents to treat Split section set, var represents pending variable value set, and n represents the variate-value chosen:
(ii) chooses variable for the first time, and interval endpoint is adjusted first, and variable is floating number herein, and we choose Stepping is 0.001, then section is adjusted to [0.7,30.001], is added to set to be split, and variate-value n is chosen for into 0.7, will 30.001 it is added to var set;Now:
N=0.7
Interval={ [0.7,30.001] }
Var={ 30.001 }
(iii) inputs n=0.7, and operation program obtains perform track { 0.7:ABCDEFN};
(iv) updates sentence covering, statements={ ABCDEFN }, need performance variable, goes to (ii);
(ii) n is set as 30.001 by;
N=30.001
Interval={ [0.7,30.001] }
Var={ }
(iii) inputs n=30.001, and operation program obtains perform track { 30.001:ABCDEGIJN};
(iv) updates sentence covering, statements={ ABCDEFGIJN }, need to be split section, goes to (ii);
(ii) chooses section to be split, carries out golden section search value, variate-value, which is calculated, is:
11.893=30.001- (30.001-0.7) * 0.618
18.808=0.7+ (30.001-0.7) * 0.618
It is 11.893 to choose variate-value, and var set is added to by 18.808;
N=11.893
Interval={ }
Var={ 18.808 }
(iii) inputs n=11.893, and operation program obtains perform track { 11.893:ABCDEGHN};
(iv) renewals sentence covering, statements={ ABCDEFGHIJN }, sentence covering collection updates, between addition new district [0.7,11.893] gather to interval, go to (ii);
(ii) n is set as 18.808 by;
N=18.808
Interval={ [0.7,11.893] }
Var={ }
(iii) inputs n=18.808, and operation program obtains perform track { 18.808:ABCDEGIJN};
(iv) updates sentence covering, statements={ ABCDEFGHIJN }, is not updated because sentence covering collects, Calculate the α between new district:
1 represents track t wherein in molecule3Relative to t4Track difference corresponding to sentence covering number, 2 represent track t4Phase For t3Track difference corresponding to sentence covering number, it is 2.5 to obtain α between new district herein, rounds downwards as 2, is added to and treats Segmentation set.Because 18.808 and end endpoint value abut, then extra computation section [18.808,30.001], are calculated herein To α=1, go to (ii);
Now:
Interval={ [0.7,11.893], [11.893,18.808, α=2], [18.808,30.001, α=1] }
Var={ }
Continuation is calculated according to above-mentioned three step, finally gives statements={ ABCDEFGHIJN }.
3rd step, design conditions section.Establish after dependency graph as shown in Figure 4, we set slice criterion < N, n > Wherein N is statement number, and n is the variable of concern.Static slicing is carried out as criterion, it is staticSlice=to obtain section { CDEFGHIJKLMN }, then final condition section are:
ConditionedSlice=staticSlice ∩ statements={ CDEFGHIJN }
It the above is only the preferred embodiment of the present invention, it should be pointed out that:Come for those skilled in the art Say, under the premise without departing from the principles of the invention, some improvement and equivalent substitution can also be made, these will to right of the present invention The technical scheme being improved with after equivalent substitution is sought, each falls within protection scope of the present invention.

Claims (2)

1. a kind of condition dicing method based on golden section search and software perform track, it is characterised in that this method includes Following steps:
Step 1) inserts to source code, obtains to produce the program with probe of perform track during operation;
Step 2) chooses the variate-value for meeting first-order predicate logic collection by golden section search, and specific method is:Meeting In the span that first order logic limits, section to be split is chosen, is become by way of golden section search takes a little The value of amount, the input as program operation;
Step 3) obtains perform track, and configuration performs the program with probe that the step 1) obtains, produced during operation Real time execution track, the perform track of this secondary program operation is obtained after the completion of operation;
Then step 4) chooses current variable values with left adjacent variate-value as right section end using following formula computing statement covering collection Point and left interval endpoint value, obtain new range of variables:
statementsi+1=statementsi∪ti+1
Wherein, i represents the numbering of perform track, statementsi+1Sentence for preceding i+1 secondary programs operation gained covers collection, statementsiSentence for preceding i secondary programs operation gained covers collection, ti+1For the track of i+1 secondary program operation;
If the sentence covering collection updates, new range of variables is added in section set to be split, is then back to Step 2);If covering collection does not update, the number α of the new range of variables golden section is set as follows:
If setting α values before the parent section where new range of variables, α=α -1 is made, if α is not changed into 0, directly Connect return to step 2);If α is changed into 0, give up the new range of variables, now if section to be split and pending variable Be sky, then sentence covering collection, which calculates, completes, into step 5), otherwise return to step 2);
If not setting α values before the parent section where new range of variables, calculate and left adjacent perform track Sentence covering collection difference, then covers collection difference with the sentence, the α values of new range of variables is set according to following formula:
<mrow> <msub> <mi>&amp;alpha;</mi> <mrow> <mi>j</mi> <mo>,</mo> <mi>i</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <msub> <mi>diff</mi> <mrow> <mi>j</mi> <mo>,</mo> <mi>i</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> </mrow> <mrow> <msub> <mi>s</mi> <mi>j</mi> </msub> <mo>&amp;cup;</mo> <msub> <mi>s</mi> <mrow> <mi>i</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> </mrow> </mfrac> <mo>*</mo> <mi>&amp;beta;</mi> <mo>+</mo> <mn>1</mn> </mrow>
Wherein j and i+1 represents to choose the numbering of variable, αJ, i+1Execution route j and i+1 segmentation times value are represented, to enter one Step demonstrate,proves whether the section can also have an impact to sentence covering collection, diffJ, i+1Represent that the different collection institutes of both perform tracks are right The sentence covering number answered, sj∪si+1The sentence covering sum of both perform tracks is represented, β is the index of setting, according to path The accuracy requirement of covering is adjusted;
Step 5) design conditions are cut into slices, and idiographic flow is:
A) corresponding nodal information in code is obtained by the abstract syntax tree of analysis source code, extracts the dependence between each node Relation, build complete program dependency graph;
B) based on described program dependency graph, static slicing algorithm is performed with reference to source code, obtains static slicing staticSlice;
C) static slicing staticSlice and sentence covering collection statements are combined, is cut using the condition of following formula calculation procedure Piece:
ConditionedSlice=staticSlice ∩ statements.
2. the condition dicing method according to claim 1 based on golden section search and software perform track, its feature It is, the golden section search in the step 2) is that the value of two golden ratios in selection left and right in section is variate-value.
CN201710530045.3A 2017-06-30 2017-06-30 Conditional slicing method based on golden section search and software execution track Expired - Fee Related CN107391124B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710530045.3A CN107391124B (en) 2017-06-30 2017-06-30 Conditional slicing method based on golden section search and software execution track

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710530045.3A CN107391124B (en) 2017-06-30 2017-06-30 Conditional slicing method based on golden section search and software execution track

Publications (2)

Publication Number Publication Date
CN107391124A true CN107391124A (en) 2017-11-24
CN107391124B CN107391124B (en) 2020-06-16

Family

ID=60334152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710530045.3A Expired - Fee Related CN107391124B (en) 2017-06-30 2017-06-30 Conditional slicing method based on golden section search and software execution track

Country Status (1)

Country Link
CN (1) CN107391124B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109814924A (en) * 2019-01-28 2019-05-28 华东师范大学 A kind of software complexity calculation method
CN112463377A (en) * 2020-11-26 2021-03-09 海光信息技术股份有限公司 Method and device for heterogeneous computing system to execute computing task
US20230047977A1 (en) * 2020-06-05 2023-02-16 Fujitsu Limited Non-transitory computer-readable storage medium for storing information processing program, information processing method, and information processing apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901188A (en) * 2010-07-23 2010-12-01 哈尔滨工程大学 Reachable path-based software testing method
US20100306745A1 (en) * 2009-06-01 2010-12-02 International Business Machines Corporation Efficient Code Instrumentation
CN102110052A (en) * 2011-03-03 2011-06-29 华中科技大学 Parallel acceleration method for dynamic analysis of program behavior
WO2016108162A1 (en) * 2015-01-01 2016-07-07 Checkmarx Ltd. Code instrumentation for runtime application self-protection
US20170132094A1 (en) * 2015-11-05 2017-05-11 Intel Corporation Technologies for analyzing persistent memory programs

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100306745A1 (en) * 2009-06-01 2010-12-02 International Business Machines Corporation Efficient Code Instrumentation
CN101901188A (en) * 2010-07-23 2010-12-01 哈尔滨工程大学 Reachable path-based software testing method
CN102110052A (en) * 2011-03-03 2011-06-29 华中科技大学 Parallel acceleration method for dynamic analysis of program behavior
WO2016108162A1 (en) * 2015-01-01 2016-07-07 Checkmarx Ltd. Code instrumentation for runtime application self-protection
US20170132094A1 (en) * 2015-11-05 2017-05-11 Intel Corporation Technologies for analyzing persistent memory programs

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张卓: "基于加强可疑片段的错误定位技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109814924A (en) * 2019-01-28 2019-05-28 华东师范大学 A kind of software complexity calculation method
US20230047977A1 (en) * 2020-06-05 2023-02-16 Fujitsu Limited Non-transitory computer-readable storage medium for storing information processing program, information processing method, and information processing apparatus
CN112463377A (en) * 2020-11-26 2021-03-09 海光信息技术股份有限公司 Method and device for heterogeneous computing system to execute computing task
CN112463377B (en) * 2020-11-26 2023-03-14 海光信息技术股份有限公司 Method and device for heterogeneous computing system to execute computing task

Also Published As

Publication number Publication date
CN107391124B (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN107391124A (en) A kind of condition dicing method based on golden section search and software perform track
Shelley et al. CASE, a computer model of the structure elucidation process
CN104503917B (en) Change domain of influence analysis method and system based on data flow function call path
CN108563556A (en) Software defect prediction optimization method based on differential evolution algorithm
CN101216803A (en) Test program control stream path set creation method based on base path
CN108647146B (en) Test case generation method for judging combination coverage based on correction condition
CN107807910A (en) A kind of part-of-speech tagging method based on HMM
CN103123607B (en) Software regression testing method based on formal conceptual analysis
CN113569524B (en) Method for extracting clock tree based on comprehensive netlist in chip design and application
CN105224455B (en) A kind of method for automatically generating character string type test case
CN106951372A (en) A kind of software error localization method cut into slices based on variable with correlation rule
CN106569947A (en) Method and tool for extracting API (Application Program Interface) use example from unit test code
CN109683881A (en) A kind of code format method of adjustment and device
CN103678123A (en) Method applied to recognizing vulnerabilities of single-event soft errors in processor systems
CN109710240A (en) Flow chart decomposition method and system
CN109409644A (en) A kind of student performance analysis method based on improved C4.5 algorithm
CN104750608A (en) Automatic error locating method based on dynamic symbol operation in procedure
Fusy Quadratic exact-size and linear approximate-size random generation of planar graphs
CN108629124A (en) A kind of simulation parameter data auto-generation method based on activity diagram path
Gipson et al. Process analysis
Chklovski et al. Towards Managing Knowledge Collection from Volunteer Contributors.
CN106198433A (en) Infrared spectrum method for qualitative analysis based on LM GA algorithm
CN106095663B (en) Program based on hierarchical model returns location of mistake method
CN109325269A (en) A kind of and associated inspection planning and designing method of three-dimensional digital assembly technology
CN110377493A (en) A kind of unit testing use-case optimization method of code-oriented readability

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200616