tailieunhanh - Lecture Software testing and analysis - Chapter 5: Finite Mmodels

This chapter presents some basic concepts in models of software and some families of models that are used in a wide variety of testing and analysis techniques. The fundamental concepts and trade-offs in the design of models is necessary for a full understanding of those test and analysis techniques, and is a foundation for devising new techniques and models to solve domain-specific problems. | Finite Models c 2007 Mauro Pezze Michal Young Ch 5 slide 1 Properties of Models Compact representable and manipulable in a reasonably compact form - What is reasonably compact depends largely on how the model will be used Predictive must represent some salient characteristics of the modeled artifact well enough to distinguish between good and bad outcomes of analysis - no single model represents all characteristics well enough to be useful for all kinds of analysis Semantically meaningful it is usually necessary to interpret analysis results in a way that permits diagnosis of the causes of failure Sufficiently general models intended for analysis of some important characteristic must be general enough for practical use in the intended domain of application c 2007 Mauro Pezze Michal Young Ch 5 slide 3 Learning objectives Understand goals and implications of finite state abstraction Learn how to model program control flow with graphs Learn how to model the software system structure with call graphs Learn how to model finite state behavior with finite state machines c 2007 Mauro Pezze Michal Young Ch 5 slide 2 Graph Representations directed graphs Directed graph - N set of nodes - E relation on the set of nodes edges Nodes a b c Edges a b a c c a c 2007 Mauro Pezze Michal Young Ch 5 slide 4 Graph Representations labels and code We can label nodes with the names or descriptions of the entities they represent. - If nodes a and b represent program regions containing assignment statements we might draw the two nodes and an edge a b connecting them in this way c 2007 Mauro Pezze Michal Young Ch 5 slide 5 Finite Abstraction of Behavior an abstraction function suppresses some details of program execution it lumps together execution states that differ with respect to the suppressed details but are otherwise identical Multidimensional Graph Representations Sometimes we draw a single diagram to represent more than one directed graph drawing the shared nodes only once - class B