Abstract
Publisher Summary Observation alone is not enough for debugging. One must compare the observed facts with the expected program behavior. This chapter discusses how to automate such comparisons, using well-known assertion techniques. The advantage of automated observation is scalability. In contrast to manual observation, where we can only examine a small number of variable values during execution, having the computer observe and judge allows us to check large parts of the execution automatically. Some properties of a program must hold during the entire execution. Good operating systems take care that a program does not access or change the data of other processes, that mathematical exceptions do not go by unnoticed, and that a program stays within the limits set by its privileges. One could think of these properties as invariants that are continuously checked at runtime. In addition to increasing security for the user, such properties are immensely useful for debugging, as they limit the scope of the search. To have the program ensure its sane state automatically is deceptively simple. The basic idea is to insert appropriate code that checks for infections. Thus, assertions can be spread across the code just like logging functions.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.