Skip to main content

A general trace query mechanism based on Prolog

  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 631))

Abstract

We present a general trace query language which is a solution to the ever growing command sets of other tracers. It provides all the required generality while being very simple and efficient. We model a program execution into a trace which is a stream of events. Execution events have a uniform representation, and can be analysed by Prolog programs. With this approach and thanks to the expressive power of Prolog, two high-level primitives plus Prolog are enough to provide a general trace query language. With a few optimizations this language can work on large executions without any loss of performance, if compared to traditional tracers. This paper describes the trace query mechanism from its high level specification down to some implementation details. The proposed model of trace query depends only on the sequentiality of the execution, and the principles behind the design of the optimizations do not depend on the traced language.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. P. Boizumault. Un modèle de trace pour Prolog. In M. Dincbas, editor, 4e Seminaire de Programmation en Logique, pages 61–71, CNET lannion, April 1984.

    Google Scholar 

  2. J.D. Bovey, M.T. Russel, and O. Folkestadt. Direct manipulation tools for Unix workstations. In Proceedings of the EUUG Autumn'88, pages 311–319, October 1988.

    Google Scholar 

  3. B. Bruegge and P. Hibbard. Generalized path expressions: A high-level debugging mechanism. The Journal of Systems and Software, 3:265–276, 1983.

    Google Scholar 

  4. A. Bundy, H. Pain, P. Brna, and L. Lynch. A proposed Prolog story. D.A.I. Research Paper 283, Department of Artificial Intelligence, University of Edinburgh, 1986.

    Google Scholar 

  5. L. Byrd. Understanding the control flow of Prolog programs. In Logic Programming Workshop, Debrecen, 1980.

    Google Scholar 

  6. D.L. Carver. Programmer variations in software debugging approaches. International Journal of Man-Machine Studies, 31:315–322, 1989.

    Google Scholar 

  7. A. Casson. Event abstraction debuggers for layered systems in Prolog. In Proceedings of the UK Logic Programming Conference. Association for Logic Programming-UK Branch, March 1990.

    Google Scholar 

  8. J. Cohen and N. Carpenter. A language for inquiring about the run-time behaviour of programs. Software-Practice and Experience, 7:445–460, 1977.

    Google Scholar 

  9. P. Dencker. Debugger chapter of the Alsys Ada System user's manual. Alsys Gmbh, May 1991.

    Google Scholar 

  10. M. Ducassé. Abstract views of Prolog executions in Opium. In V. Saraswat and K. Ueda, editors, Proceedings of the International Logic Programming Symposium, pages 18–32, San Diego, October 1991. ALP, MIT Press.

    Google Scholar 

  11. M. Ducassé. Analysis of failing Prolog executions. In Proceedings of the ICLP'91 Preconference Workshop on Logic Programming Environments, Paris, June 1991. Proceedings published as Technical Report LIFO N 91-61, University of Orléans, France.

    Google Scholar 

  12. M. Ducassé. An extendable trace analyser to support automated debugging. PhD thesis, University of Rennes, France, June 1992. Numéro d'ordre 758. European Doctorate. In English.

    Google Scholar 

  13. M. Eisenstadt. A powerful Prolog trace package. In Proceedings of the 6th ECAI, September 1984.

    Google Scholar 

  14. A.-M. Emde and M. Ducassé. Automated debugging of non-terminating Prolog programs. In S. Bourgault and M. Dincbas, editors, Actes du Séminaire de programmation en Logique, pages 89–103. CNET, Lannion, May 1990.

    Google Scholar 

  15. M.S. Johnson. Dispel: A run-time debugging language. Computer languages, 6:79–94, 1981.

    Google Scholar 

  16. A.J. Kusalik and G.M. Oster. Towards a generalized graphical interface for Logic Programming development. Technical report, University of Saskatchewan, 1992. (Forthcoming).

    Google Scholar 

  17. B. Lazzerini and L. Lopriore. Abstraction mechanisms for event control in program debugging. IEEE Transactions on Software Engineering, 15(7):890–901, July 1989.

    Google Scholar 

  18. C.H. LeDoux. A knowledge-based system for debugging concurrent software. PhD thesis, University of California, Los Angeles, 1985.

    Google Scholar 

  19. C.H. LeDoux and D.S. Parker. Saving traces for Ada debugging. In Proceedings of the ADA International Conference, pages 97–108, 1985.

    Google Scholar 

  20. A. Malony, D. Hammerslag, and D. Jablonowski. Traceview: A trace visualization tool. IEEE Software, pages 19–28, September 1991.

    Google Scholar 

  21. M. Meier, A. Aggoun, D. Chan, P. Dufresne, R. Enders, D. Henry de Villeneuve, A. Herold, P. Kay, B. Perez, E. van Rossum, and J. Schimpf. SEPIA — an extendible Prolog system. In Proceedings of the IFIP '89, 1989.

    Google Scholar 

  22. M. Meier and J. Schimpf. Sepia system evaluation. Internal Report IR-LP-13-35, ECRC, August 1991.

    Google Scholar 

  23. S. Moroshita and M. Numao. Prolog computation model BPM and its debugger PROEDIT2. In Proceedings of the 5th Logic Programming Conference, pages 147–158, Tokyo, June 1986. Springer Verlag.

    Google Scholar 

  24. R.A. Olsson, R.H. Crawford, and W.W. Ho. A dataflow approach to event-based debugging. Software-Practice and Experience, 21(2):209–229, February 1991.

    Google Scholar 

  25. M.L. Powell and M. A. Linton. A database model of debugging. In M.S. Johnson, editor, ACM SIGSOFT/SIGPLAN Software Engineering Symposium on high-level debugging, pages 67–70. ACM, March 1983.

    Google Scholar 

  26. A. Schleiermacher and J.F.H. Winkler. The implementation of ProTest a Prolog-Debugger for a refined box model. Software-Practice and Experience, 1990.

    Google Scholar 

  27. I. Vessey. Toward a theory of computer program bugs: an empirical test. International Journal of Man-Machine Studies, 30(1):23–46, January 1989.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Maurice Bruynooghe Martin Wirsing

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ducassé, M. (1992). A general trace query mechanism based on Prolog. In: Bruynooghe, M., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1992. Lecture Notes in Computer Science, vol 631. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55844-6_150

Download citation

  • DOI: https://doi.org/10.1007/3-540-55844-6_150

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55844-6

  • Online ISBN: 978-3-540-47297-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics