| Program slicing has many applications in software maintenance,programdebugging,testing,codeunderstandingandreverseengineering.Forexample,inthedebuggingprocess,oncethecharacteristicsoferrorappear,it was hoped that the source code of wrong parts may be found through ameans. It may be impossible to accurately position the source code whichleads to mistake, but it is possible to remove some parts of the source codewhich will not lead to mistake and limit the errors to a smaller extent.Program slicing is an effective technologyin achieving the above objectives.In addition,Program slicing is widely used in other applications areas. Forexample,whenconstructingmodel,wecanusetheprogramslicingtoremovethe source code which is not related to the target, and we also can use it tofinish the task decomposition of real-time systems,testing electronic Formandcheckingthetypeofprogram.The topic mainlystudies the technologyof the ATLAS language's staticprogram slicing. The ATLAS language is a global automatic test language,which is widely used in testing of military and aviation,and applying theprogram slicingtoATLAS is averymeaningwork. But theATLAS languageis different from other program languages, the statements of signal-oriented,timing, data-bus in the ATLAS are not occurred in other language. Thesestatements are different from the normal statements in the structure andfunction,andit processes not onlythevariable but also virtual resources.Thetraditional methods can't solve the problem of ATLAS language's programslicing.This paperpresents atechnologyofprogram slicingbasingonvirtualresources,and extends the traditional method of program slicing. It canprocess not onlyvariable but also virtual resource. In order to process virtualresources, the paper defines device dependence and timing dependence. Twodependences can describe the relation of the statements of signal-oriented,timing, data-bus. This is needed in program slicing. On this basis the paperpresents an enhanced system dependence graph (ASDG),which adds theedge of device dependence and timing dependence. The paper improves thetwo-stage algorithm of graph reachability, and realizes the system of theATLASlanguage'sprogramslicing.First, analyzing the signal-statements of the ATLAS language,In viewof the characteristics of signal statements, timing statements, and data busstatements,the paper gives device dependence and timing dependence .Device dependence is dependent on the virtual resources,and the statestransition of virtual resources is related,and device dependence is thereflection of it on program.Timingdependence is the reflection of the timingand delay of signal statements. Then defining the static slicing criterion ofATLAS language,slicing criterion is (n, V),where n is an interested node inprogram, V is variables or virtual resources of n node. Finally defines theenhanced system dependence graph (ASDG). In order to processing theoriented-signal language, ASDG is the expansion of the system dependencegraph (SDG) for the traditional language. The traditional algorithm of graphreachabilitycansolvethetraditionallanguage'sproblemofprogramslicing,but the ATLAS language has the characteristics of signal-oriented, thus it isneededtoimprovesthealgorithmforprocessingthesignalstatements.The paper gives the concrete realization of slicing system in detail,which consists of two section: the building of graph and slicing. Firstextracting semantic information for generates syntax tree, then constructsflowgraph,computedependenceonthebasisoftheflowgraph.Becausethestructure of ATLAS language is not well-structured, control dependencegenerates on Tarjan algorithm,timing statements is simple,timingdependence generates on syntax. Data dependence and device dependencegenerates on reachability algorithm. Then constructs the enhanced systemdependencegraphbydefinition,finallyonslicingcriterion,programslicingis get by the two-stage algorithm of graph reachability. For the given thesource code of the ATLAS language, first constructs the syntax tree throughparsingthesourcecodebythecompiler,thenconstructstheflowgraph,andcomputes the dependence on the basis of terms,therefore generates theenhancedsystemdependencegraph,finallycarriesontheslicingaccordingtoslicing criterion and converts the result to program slice. The paper gives anexampleofprogramslicing.Finally the paper gives the application of program slicing on resourceallocation. Resource allocation is the selection and allocation of testequipment. In fact,Resource allocation is to resolve the conflicts whichProgrammer assume there is no restriction in the quantityof equipment,butin the actual environment, actual equipment is limited,as the ATLASlanguage is a high-order language. During the allocation of resources,itneeds to accurately determine when a given signal becomes effective orlapse,and which signal will conflict with others. The paper gives a methodwhich uses the dependence of virtual resources. By Added the analysis ofroute, the parallel relation of signal will be get, for the relation of route issamewiththerelationofvirtualresources.The developing tools we adopt are ACCENT, an automated translatetool, and VC ++, for ACCENT can automatically produce lexical analysis,syntax analysis, and insert semantic action in syntax, so that we in this waymayfinishtheconstructionofASDGofsemanticaction.The Characteristic of the system is increased the processing of devicedependence and timing dependence, it can process not only the variable butalsovirtualresources.In paper some of the work is not perfect enough. For the signalstatements is unique for the ATLAS language,and there is no research ofprogram slicing on it, so the study is not adequate. The paper gives the welldefinitions between the different actions of one virtual resource. However,the definitions of the dependence between different virtual resources is stillnotperfect.ThisismainlybecausetestingisforUUTintheATLASlanguage,but there is no describes of UUT in ATLAS. In the future, it deserves beingresearchedcontinually.The important meaning of this system lies in that the paper presents atechnique of ATLAS language's program slicing basing on signal oriented,and provides a set of design scheme, and realizes the system of ATLASlanguage'program slicing. This system is still in its experimental stage now,but it can get more accurate slicing results in ATLAS. We hope to continuestudying on this basis, and develop one systematic tool of overall andaccurateATLASprogramslicing. |