In the process of software development,requirements analysis and design are the key stages of the entire software development process.In order to ensure the correctness of requirements analysis and design,some model languages are needed to model user requirements and system design.Unified modeling language(UML)is a powerful and easily expressed graphical language for software system development,where use case diagrams and sequence diagrams are widely used for modeling during requirements analysis and design.The use case diagram is composed of the event flow,the executor,etc.The event flow describes the functional behavior of the system execution process required by the user,and is the specific description of the user requirements.The use case diagram of a complete system is complex and large,which automatically decomposes one use case into use case slices.Each use case slice is composed of multiple use case stories,which are easier to analyze and understand.Sequence diagram is a representative model in the design stage,which is the realization diagram of use cases in the use-case driven development process.In order to meet the needs of users in the system design,the consistency of use case diagram and sequence diagram must be guaranteed.In order to verify the consistency of the sequence diagram and the use case diagram,the traditional consistency checking method directly checks the consistency of the two models.This paper presents a new method to verify the consistency of sequence diagram and use case diagram.Firstly,the basic principle of model consistency test is discussed,and a new method of model consistency test is proposed.Secondly,the method of automatically decomposing the use cases in the use case diagram into use case slices is studied.Next,we discussed the decomposition of sequence diagrams into subsequence diagrams,each of which should be an implementation of a complete use case story.Finally,verify that the subdiagrams of each sequence diagram are consistent with the corresponding use case story.This method uses the consistency between the corresponding submodels of the two models to judge the consistency between the two models.In this paper,the correctness of this method is proved theoretically,and an example is used to demonstrate the process of verifying the consistency of sequence diagram and use case diagram. |