Diagnosing Errors in DbC Programs Using Constraint Programming
Model-Based Diagnosis allows to determine why a correctly designed system does not work as it was expected. In this paper, we propose a methodology for software diagnosis which is based on the combination of Design by Contract, Model-Based Diagnosis and Constraint Programming. The contracts are specified by assertions embedded in the source code. These assertions and an abstraction of the source code are transformed into constraints, in order to obtain the model of the system. Afterwards, a goal function is created for detecting which assertions or source code statements are incorrect. The application of this methodology is automatic and is based on Constraint Programming techniques. The originality of this work stems from the transformation of contracts and source code into constraints, in order to determine which assertions and source code statements are not consistent with the specification.
KeywordsSource Code Basic Block Constraint Programming Conditional Statement Goal Function
Unable to display preview. Download preview PDF.
- 1.Meyer, B.: Applying design by contract. IEEE Computer 25, 40–51 (1992)Google Scholar
- 4.Mateis, C., Stumptner, M., Wieland, D., Wotawa, F.: Model-based debugging of java programs. In: AADEBUG (2000)Google Scholar
- 5.Groce, A., Visser, W.: Model checking java programs using structural heuristics. In: ISSTA 2002: Proceedings of the, ACM SIGSOFT international symposium on Software testing and analysis, Roma, Italy, pp. 12–21 (2002)Google Scholar
- 6.Cleve, H., Zeller, A.: Locating causes of program failures. In: 27th International Conference on Software Engineering (ICSE 2005), St. Louis, Missouri (2005) Google Scholar
- 7.Ceballos, R., Gasca, R.M., Valle, C.D., Rosa, F.D.L.: A constraint programming approach for software diagnosis. In: AADEBUG Fith International Symposium on Automated and Analysis-Driven Debugging, Ghent, Belgium, pp. 187–196 (2003)Google Scholar
- 8.Binder, R.: Testing Object-Oriented Systems: Models, Patterms, and Tools. Object Technology Series. Addison-Wesley, Reading (2000)Google Scholar
- 9.de Kleer, J., Mackworth, A., Reiter, R.: Characterizing diagnoses and systems. Artificial Intelligence 2-3, 197–222 (1992)Google Scholar
- 10.Alpern, B., Wegman, M., Zadeck, F.K.: Detecting equality of variables in programs. In: Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, San Diego, California, pp. 1–11 (1988)Google Scholar
- 11.Ceballos, R., del Valle, C., Gómez-López, M.T., Gasca, R.M.: CSP aplicados a la diagnosis basada en modelos. Revista Iberoamericana de Inteligencia Artificial 20, 137–150 (2003)Google Scholar