Abstract
Real-time behavior of a multi-tasking program running on a pre-emptive priority-based operating system is analyzed. The operating system and a collection of application tasks are modelled in Z. Real-time is represented by an ordinary Z state variable. The model is adapted to a particular application by defining a state machine for each task and associating execution times with each state. The model is analyzed by exhaustive simulation with the SMV model checker. The state transitions described by Z operation schemas are implemented in the SMV programming language. Invariants, preconditions, and postconditions from the Z are translated to formulas in CTL, the SMV specification language. The SMV program is verified by checking these formulas. This detects coding errors in the SMV program and also reveals inconsistencies in the original Z where operation schemas are inconsistent with state invariants. The errors were corrected. Additional CTL formulas describe temporal properties that cannot be expressed directly in Z. The Z model is validated by checking an example SMV program with CTL formulas that confirm scheduling results from rate-monotonic analysis (RMA). Another application that does not satisfy the assumptions of RMA is analyzed, establishing that high-priority tasks cannot indefinitely delay low-priority tasks and real-time deadlines can be met.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Atlee, J.M., Gannon, J.: State-based model checking of event-driven system requirements. IEEE Transactions on Software Engineering 19(1), 24–40 (1993)
Chaochen, Z., Hoare, C.A.R., Ravn, A.P.: A calculus of durations. Information Processing Letters 40, 269–276 (1991)
Clarke, E., Grumberg, O., Long, D.: Verification tools for finite-state concurrent systems. In: de Bakker, J.W., de Roever, W.-P., Rozenberg, G. (eds.) REX 1993. LNCS, vol. 803, pp. 124–175. Springer, Heidelberg (1994)
Evans, A.S.: Specifying and verifying concurrent systems using Z. In: Naftalin, M., Bertrán, M., Denvir, T. (eds.) FME 1994. LNCS, vol. 873, pp. 366–380. Springer, Heidelberg (1994)
Evans, A.S.: Visualizing concurrent Z specifications. In: Bowen, J.P., Hall, J.A. (eds.) Z User Workshop, Cambridge. Workshops in Computing, pp. 269–281. Springer, Heidelberg (1994)
Evans, A.S.: An improved recipe for specifying reactive systems in Z. In: Till, D., Bowen, J.P., Hinchey, M.G. (eds.) ZUM 1997. LNCS, vol. 1212, pp. 275–294. Springer, Heidelberg (1997)
Fidge, C.J.: Real-time schedulability tests for preemptive multitasking. Real-Time Systems 14(1), 61–93 (1998)
Jacky, J.: The Way of Z: Practical Programming with Formal Methods. Cambridge University Press, Cambridge (1997)
Jacky, J.: Analyzing a real-time program with Z and SMV. Technical Report 98-06-01, Department of Radiation Oncology, University of Washington, Box 356043, Seattle, Washington 98195-6043, USA (June 1998)
Jacky, J., Patrick, M.: Modelling, checking, and implementing a control program for a radiation therapy machine. In: Cleaveland, R., Jackson, D. (eds.) AAS 1997: Proc. 1st ACM SIGPLAN Workshop on Automated Analysis of Software, pp. 25–32 (1997)
Jacky, J., Unger, J., Patrick, M., Reid, D., Risler, R.: Experience with Z developing a control program for a radiation therapy machine. In: Till, D., Bowen, J.P., Hinchey, M.G. (eds.) ZUM 1997. LNCS, vol. 1212, pp. 317–328. Springer, Heidelberg (1997)
Liu, C.L., Layland, J.W.: Scheduling algorithms for multiprogramming in a hard-real-time environment. Journal of the Association for Computing Machinery 20(1), 46–61 (1973)
McMillan, K.L.: The SMV system, Carnegie-Mellon University, USA, February 2 (1992) (Draft)
Spivey, J.M.: Specifying a real-time kernel. IEEE Software 7(5), 21–28 (1990)
Spivey, J.M.: The fuzz Manual. Computing Science Consultancy, UK (January 1991) Second Printing
Spivey, J.M.: The Z Notation: A Reference Manual, 2nd edn. Prentice Hall International Series in Computer Science (1992)
Wind River Systems, Inc., Alameda, California, USA. VxWorks Programmer’s Guide 5.3.1 (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Jacky, J. (1998). Analyzing a Real-Time Program with Z. In: Bowen, J.P., Fett, A., Hinchey, M.G. (eds) ZUM ’98: The Z Formal Specification Notation. ZUM 1998. Lecture Notes in Computer Science, vol 1493. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-49676-2_11
Download citation
DOI: https://doi.org/10.1007/978-3-540-49676-2_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65070-6
Online ISBN: 978-3-540-49676-2
eBook Packages: Springer Book Archive