Monitoring with Behavior View Diagrams for Scenario-Driven Debugging

Date of Submission: 
June 8, 2005
Report Number: 
Report PDF: 
UML sequence diagrams have been widely used during requirements analysis and design for specifying the expected message exchanges among a set of objects in various scenarios for the program to perform a certain task. In this paper, we present the behavior view diagrams, a type of extended sequence diagrams, to facilitate execution monitoring during debugging. Using a behavior view diagram, the software developers can precisely specify the runtime objects whose behaviors will be monitored during debugging. The software developers can also specify the important message exchanges that are expected to be observed among these objects in various scenarios, and may further define the monitoring actions to be performed for inspecting the program state when a message exchange is observed. We also present a debugger that can automatically monitor the program execution using the information specified in a behavior view diagram. Through this monitoring, the debugger can not only check whether the scenarios are progressed as intended, but also check whether the actions performed by the program have the the desired effects on the program states. Therefore, it can be useful for detecting and localizing bugs.