Book contents
- Frontmatter
- Contents
- Preface
- Acknowledgments
- I Overview
- II Systems with Finite Models
- 5 Model Programs
- 6 Exploring and Analyzing Finite Model Programs
- 7 Structuring Model Programs with Features and Composition
- 8 Testing Closed Systems
- 9 Further Reading
- III Systems with Complex State
- IV Advanced Topics
- V Appendices
- Bibliography
- Index
5 - Model Programs
Published online by Cambridge University Press: 02 March 2010
- Frontmatter
- Contents
- Preface
- Acknowledgments
- I Overview
- II Systems with Finite Models
- 5 Model Programs
- 6 Exploring and Analyzing Finite Model Programs
- 7 Structuring Model Programs with Features and Composition
- 8 Testing Closed Systems
- 9 Further Reading
- III Systems with Complex State
- IV Advanced Topics
- V Appendices
- Bibliography
- Index
Summary
This chapter introduces model programs. We show how to code model programs that work with the tools, by using attributes from the modeling library along with some coding conventions.
In this chaper we also explain the process of writing a model program: the steps you must go through to understand the implementation and design the model program. Writing a model program does not mean writing the implementation twice. By focusing on the purpose of the model, you can write a model program that is much smaller and simpler than the implementation, but still expresses the features you want to test or analyze.
Here in Part II, we explain modeling, analysis, and testing with finite model programs that can be analyzed exhaustively (completely). The programs and systems we model here are “infinite” – perhaps not mathematically infinite, but too large to analyze exhaustively. One of the themes of this chapter is how to finitize (make finite) the model of an “infinite” system. Starting in Part III, the model programs are also “infinite”; we finitize the analysis instead.
In this chapter we develop and explain three model programs: a newsreader user interface, the client/server system of Chapter 2, and the reactive system of Chapter 3. We will perform safety and liveness analyses of the reactive system model in Chapter 6. We will generate and check tests of the implementation using the client/server model in Chapter 8.
- Type
- Chapter
- Information
- Model-Based Software Testing and Analysis with C# , pp. 57 - 93Publisher: Cambridge University PressPrint publication year: 2007