The design of an OCL query-based debugger for C++

In this paper, we describe an approach to query-based debugging for C + + programs tha t uses queries formulated in the object constraint language, OCL. By using OCL, together with UML, to formulate queries, debugging can begin early in the design phase. Queries can be formulated to verify design constraints such as invariants on classes and pre and post-condit ions for member functions. These queries can be reused after code generation to verify the design contract, as par t of the test ing process, and to facilitate fault detection.