Hostname: page-component-78c5997874-m6dg7 Total loading time: 0 Render date: 2024-11-17T16:03:09.023Z Has data issue: false hasContentIssue false

Design and implementation of a tracer driver: Easy and efficientdynamic analyses of constraint logic programs1

Published online by Cambridge University Press:  01 November 2008

LUDOVIC LANGEVINE
Affiliation:
Mission Critical IT, Boulevard de France, 9, Bât A, 1420 - Braine-l'Alleud, Belgium (e-mail: [email protected])
MIREILLE DUCASSÉ
Affiliation:
IRISA/INSA of Rennes, Campus de Beaulieu, 35042Rennes Cedex, France (e-mail: [email protected])

Abstract

Tracers provide users with useful information about program executions. In thisarticle, we propose a “tracer driver”. From a single tracer,it provides a powerful front-end enabling multiple dynamic analysis tools to beeasily implemented, while limiting the overhead of the trace generation. Therelevant execution events are specified by flexible event patterns and a largevariety of trace data can be given either systematically or “ondemand”. The proposed tracer driver has been designed in the contextof constraint logic programming (CLP); experiments have been made withinGNU-Prolog. Execution views provided by existing tools have been easily emulatedwith a negligible overhead. Experimental measures show that the flexibility andpower of the described architecture lead to good performance. The tracer driveroverhead is inversely proportional to the average time between two tracedevents. Whereas the principles of the tracer driver are independent of thetraced programming language, it is best suited for high-level languages, such asCLP, where each traced execution event encompasses numerous low-level executionsteps. Furthermore, CLP is especially hard to debug. The current environments donot provide all the useful dynamic analysis tools. They can significantlybenefit from our tracer driver which enables dynamic analyses to be integratedat a very low cost.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2008

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Ågren, M., Szeredi, T., Beldiceanu, N. and Carlsson, M. 2002. Tracing and explaining execution of clp(fd) programs. In Proc. of Workshop on Logic Programming Environments'02, Tessier, A., Ed. Computer Research Repository cs.SE/0207047.Google Scholar
Auguston, M., Jeffery, C. and Underwood, S. 2002. A framework for automatic debugging. In Proceedings of the 17th International Conference on Automated Software Engineering (ASE'02), Emmerich, W. and Wile, D., Eds. IEEE Press, 217222.CrossRefGoogle Scholar
Ball, T. 1999. The concept of dynamic analysis. In ESEC/SIGSOFT FSE, Nierstrasz, O. and Lemoine, M., Eds. Lecture Notes in Computer Science, Vol. 1687, Springer, 216231.Google Scholar
Bates, P. C. 1995. February. Debugging heterogeneous distributed systems using event-based models of behavior. ACM Transactions on Computer Systems 13 (1), 131.CrossRefGoogle Scholar
Bracchi, C., Gefflot, C. and Paulin, F. 2001. Combining propagation information and search-tree visualization using opl studio. In Proceedings of WLPE'01, Kusalik, A., Ed. Computer Research Repository cs.PL/0111040, Cyprus, 2739.Google Scholar
Bruegge, B. and Hibbard, P. 1983. Generalized path expressions: A high-level debugging mechanism. The Journal of Systems and Software 3, 265276.CrossRefGoogle Scholar
Carro, M. and Hermenegildo, M. 2000. The VIFID/TRIFID tool. In Analysis and Visualization Tools for Constraint Programming, Chapter 10, Deransart, P., Hermenegildo, M. and Maluszynski, J., Eds. Lecture Notes in Computer Science, Vol. 1870, Springer-Verlag.Google Scholar
Consens, M., Hasan, M. and Mendelzon, A. 1994. Visualizing and querying distributed event traces with Hy+. In Applications of Databases, First International Conference, Litwin, W. and Risch, T., Eds. Lecture Notes in Computer Science, Vol. 819, Springer, 123141.CrossRefGoogle Scholar
Denmat, T., Ducassé, M. and Ridoux, O. 2005. Data mining and cross-checking of execution traces. A re-interpretation of Jones, Harrold and Stasko test information visualization. In Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering, Ellman, T. and Zisman, A., Eds. ACM Press.Google Scholar
Deransart, P., Hermenegildo, M. and Maluszynski, J., Eds. 2000. Analysis and Visualization Tools for Constraint Programming. Lecture Notes in Computer Science, Vol. 1870, Springer-Verlag.CrossRefGoogle Scholar
Diaz, D. 2003. Gnu Prolog, a free Prolog compiler with constraint solving over finite domains. http://gprolog.sourceforge.net/. Distributed under the GNU license.Google Scholar
Ducassé, M. 1999a. Coca: An automated debugger for C. In Proceedings of the 21st International Conference on Software Engineering. ACM Press, 504513.CrossRefGoogle Scholar
Ducassé, M. 1999b. Opium: An extendable trace analyser for Prolog. The Journal of Logic programming 39, 177223. Special issue on Synthesis, Transformation and Analysis of Logic Programs, Bossi, A. and Deville, Y., Eds.CrossRefGoogle Scholar
Fages, F. 2002. CLPGUI: A generic graphical user interface for constraint logic programming over finite domains. In Proceedings of WLPE'02, Tessier, A., Ed. Computer Research Repository cs.SE/0207048, Copenhagen.Google Scholar
Gent, I. and Walsh, T. 1999. CSPLib: A benchmark library for constraints. Tech. rep., Technical report APES-09-1999. Available from http://csplib.cs.strath.ac.uk/. A shorter version appears in the Proceedings of CP-99.Google Scholar
Goualard, F. and Benhamou, F. 2000. Debugging constraint programs by store inspection. In Analysis and Visualization Tools for Constraint Programming, Chapter 11, Deransart, P., Hermenegildo, M. and Maluszynski, J., Eds. Lecture Notes in Computer Science, Vol. 1870, Springer-Verlag.Google Scholar
Hank, D., Szeredi, T. and Szeredi, P. 2004. FDBG, the CLP(FD) debugger library of SICStus Prolog. In Proc. of Iclp'04, Demoen, B. and Lifschitz, V., Eds. Poster. Lecture Notes in Computer Science, Vol. 3132.Google Scholar
Harrold, M. J., Rothermel, G., Wu, R. and Yi, L. 1998. An empirical investigation of program spectra. In Proceedings of the 1998 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering. ACM Press, 8390.CrossRefGoogle Scholar
Jahier, E. and Ducassé, M. 2002, July–September. Generic program monitoring by trace analysis. Theory and Practice of Logic Programming 2 (4–5), 611643.CrossRefGoogle Scholar
Jeffery, C. and Griswold, R. 1994, November. A framework for execution monitoring in icon. Software-Practice and Experience 24 (11), 10251049.CrossRefGoogle Scholar
Jones, J. A. and Harrold, M. J. 2005. Empirical evaluation of the Tarantula automatic fault-localization technique. In Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering. ACM Press, 273282.CrossRefGoogle Scholar
Jones, J. A., Harrold, M. J. and Stasko, J. 2002. Visualization of test information to assist fault localization. In Proceedings of the 24th International Conference on Software Engineering. ACM Press, 467477.Google Scholar
Langevine, L., Deransart, P. and Ducassé, M. 2004. A generic trace schema for the portability of CP(FD) debugging tools. In Recent advances in Constraint Programming, Vancza, J., Apt, K., Fages, F., Rossi, F. and Szeredi, P., Eds. Lecture Notes in Artificial Intelligence, Vol. 3010, Springer-Verlag.Google Scholar
Langevine, L., Ducassé, M. and Deransart, P. 2003. A propagation tracer for Gnu-Prolog: From formal definition to efficient implementation. In Proc. of the 19th Int. Conf. in Logic Programming, Palamidessi, C., Ed. Lecture Notes in Computer Science, Vol. 2916, Springer-Verlag.Google Scholar
MacLarty, I. and Somogyi, Z. 2006. Controlling search space materialization in a practical declarative debugger. In PADL, Hentenryck, P. V., Ed. Lecture Notes in Computer Science, Vol. 3819, Springer, 3144.Google Scholar
MacLarty, I., Somogyi, Z. and Brown, M. 2005. Divide-and-query and subterm dependency tracking in the Mercury declarative debugger. In AADEBUG'05: Proceedings of the Sixth International Symposium on Automated Analysis-Driven Debugging. ACM Press, New York, NY, 5968.CrossRefGoogle Scholar
Meier, M. 1995. Debugging constraint programs. In Proceedings of the First International Conference on Principles and Practice of Constraint Programming, Montanari, U. and Rossi, F., Eds. Lecture Notes in Computer Science, Vol. 976, Springer-Verlag, 204221.Google Scholar
Olsson, R., Crawford, R. and Ho, W. 1990. Dalek: A GNU, improved programmable debugger. In Proceedings of the Summer 1990 USENIX Conference: June 11–15, 1990. 221–232.Google Scholar
Reiss, S. and Renieris, M. 2001. Encoding program executions. In Proceedings of the 23rd International Conference on Software Engineering, Harrold, M.-J. and Schäfer, W., Eds. IEEE Press, 221230.Google Scholar
Ronsse, M., Bosschere, K. D. and Chassin de Kergommeaux, J. 2000. Execution replay and debugging. In Proceedings of the International Workshop on Automated Debugging (AADEBUG2000), Ducassé, M., Ed. http://xxx.lanl.gov/abs/cs.SE/0011006.Google Scholar
Schulte, C. 1997. Oz explorer: A visual constraint programming tool. In Proc. of the 14th Int. Conf. on Logic Programming, Naish, L., Ed. MIT Press, 286300.CrossRefGoogle Scholar
Shapiro, E. 1983. Algorithmic Program Debugging. MIT Press, Cambridge, MA.Google Scholar
Simonis, H. and Aggoun, A. 2000. Search-tree visualisation. In Analysis and Visualization Tools for Constraint Programming, Chapter 7, Deransart, P., Hermenegildo, M. and Maluszynski, J., Eds. Lecture Notes in Computer Science, Vol. 1870, Springer-Verlag.Google Scholar
Somogyi, Z. and Henderson, F. 1999. The implementation technology of the Mercury debugger. In Proceedings of the Tenth Workshop on Logic Programming Environments. Electronic Notes in Theoretical Computer Science, Vol. 30(4), Elsevier. http://www.elsevier.nl/cas/tree/store/tcs/free/entcs/store/tcs30/cover.sub.sht.CrossRefGoogle Scholar
Sosic, R. and Abramson, D. 1997. Guard: A relative debugger. Software—Practice and Experience 27 (2), 185206.3.0.CO;2-D>CrossRefGoogle Scholar
Wilhelm, R. and Maurer, D. 1995. Compiler Design. Addison-Wesley.Google Scholar
Zeller, A. and Hildebrandt, R. 2002. Simplifying and isolating failure-inducing input. IEEE Transactions on Software Engineering 28 (2), 183200.CrossRefGoogle Scholar