Skip to main content

Specifying Prolog Trace Models with a Continuation Semantics

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

Abstract

Byrd’s box model is a fine-grained Prolog execution model that can be the basis of high-level debugging tools. In this article, we provide a formal specification of Byrd’s box model, based on an already existing operational and denotational continuation semantics for Prolog with cut. We show how this specification can be extended to specify richer Prolog trace models. To be able to experiment with trace models, we translate these specifications into ?Prolog. This translation leads to a Prolog interpreter that performs execution traces. We have hence a formal framework to specify, prototype, and validate Prolog trace models.

Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. R. Bahlke, B. Moritz, and G. Snelting. A generator for language-specific debugging systems. ACM SIGPLAN Notices, 22(7):92–101, 1987.

    Article  Google Scholar 

  2. R. Bahlke and G. Snelting. The PSG system: From formal language definition to interactive programming environments. ACM Transactions on Programming Languages and Systems, 8(4):547–576, 1986.

    Article  Google Scholar 

  3. C. Belleannée, P. Brisset, and O. Ridoux. A pragmatic reconstruction of ?Prolog. Journal of Logic Programming, 41(1):67–102, 1999.

    Article  MATH  MathSciNet  Google Scholar 

  4. K. L. Bernstein and E. W. Stark. Operational semantics of a focusing debugger. In ENCS, editor, 11th Conf. on the Mathematical Foundations of Programming Semantics, 1995.

    Google Scholar 

  5. D. Berry. Generating program animators from programming language semantics. PhD thesis, University of Edinburgh, 1991.

    Google Scholar 

  6. P. Brisset and O. Ridoux. The compilation of ?Prolog and its execution with MALI. PI 687, IRISA, 1992.

    Google Scholar 

  7. P. Brisset and O. Ridoux. Continuations in ?Prolog. In David S. Warren, editor, Tenth Int. Conf. Logic Programming, pages 27–43. The MIT Press, 1993.

    Google Scholar 

  8. G. Brooks, G. J. Hansen, and S. Simmons. A new approach to debugging optimized code. In SIGPLAN’ 92 Conf. on Programming Language Design and Implementation, pages 1–11, 1992.

    Google Scholar 

  9. L. Byrd. Understanding the control flow of Prolog programs. In S.-A. Tärnlund, editor, Logic Programming Workshop, 1980.

    Google Scholar 

  10. C. Consel and S. C. Khoo. Semantics-directed generation of a Prolog compiler. In J. Maluszynski and M. Wirsing, editors, 3rd Int. Symp. on Programming Language Implementation and Logic Programming, volume 528 of LNCS, pages 135–146. Springer-Verlag, 1991.

    Google Scholar 

  11. A. de Bruin and E. P. de Vink. Continuation semantics for Prolog with cut. In TAPSOFT’89: Int. Joint Conf. on Theory and Practice of Software Development, LNCS. Springer-Verlag, 1989.

    Google Scholar 

  12. S. K. Debray and P. Mishra. Denotational and operational semantics for Prolog. Journal of Logic Programming, 5:61–91, 1988.

    Article  MATH  MathSciNet  Google Scholar 

  13. M. Ducassé. Opium: An extendable trace analyser for Prolog. Journal of Logic programming, 39:177–223, 1999. Special issue on Synthesis, Transformation and Analysis of LogicPrograms, A. Bossi and Y. Deville (eds).

    Google Scholar 

  14. M. Ducassé and J. Noyé. Tracing Prolog programs by source instrumentation is efficient enough. Journal of Logic Programming, 43(2), 2000. Tech. Notes.

    Google Scholar 

  15. M. Eisenstadt. A powerful Prolog trace package. In 6th European Conf. on Artificial Intelligence. North-Holland, 1984.

    Google Scholar 

  16. E. Jahier and M. Ducassé. A genericap proach to monitor program executions. In D. De Schreye, editor, Int. Conf. on Logic Programming, pages 139–153. MIT Press, 1999.

    Google Scholar 

  17. N. D. Jones and A. Mycroft. Stepwise development of operational and denotational semantics for Prolog. In Int. Symp. Logic Programming, pages 281–288. IEEE, Computer Society Press, 1984.

    Google Scholar 

  18. G. Kahn. Natural semantics. In Symp. on Theoretical Aspects of Computer Science, volume 247 of LNCS. Springer-Verlag, 1987. The paper is also available as INRIA Report 601, February, 1987.

    Google Scholar 

  19. A. Kishon and P. Hudak. Semantics directed program execution monitoring. Journal of Functional Programming, 5(4):501–547, 1995.

    Article  Google Scholar 

  20. A. Kishon, P. Hudak, and C. Consel. Monitoring semantics: a formal framework for specifying, implementing and reasoning about execution monitors. ACM Sigplan Notices, 26(6):338–352, 1991.

    Article  Google Scholar 

  21. D. Miller and G. Nadathur. A logicp rogramming approach to manipulating formulas and programs. In Fifth Int. Conf. and Symp. Logic Programming. IEEE, Computer Society Press, 1987.

    Google Scholar 

  22. S. Moroshita and M. Numao. Prolog computation model BPM and its debugger PROEDIT2. In 5th Int. Conf. Logic Programming, pages 147–158. Springer-Verlag, 1986.

    Google Scholar 

  23. G. Nadathur and D. A. Miller. An overview of ?Prolog. In R. A. Kowalski and K. A. Bowen, editors, Joint Int. Conf. and Symp. Logic Programming, pages 810–827. MIT Press, 1988.

    Google Scholar 

  24. T. Nicholson and N. Foo. A denotational semantics for Prolog. ACM Transactions on Programming Languages and Systems, 11(4):650–665, 1989.

    Article  Google Scholar 

  25. A. Pettorossi and M Proietti. Transformation of logicpro grams: Foundations and techniques. Journal of Logic Programming, 19 & 20:261–320, 1994.

    Article  MathSciNet  Google Scholar 

  26. G. D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, Computer Science Department, Aarhus University, 1981.

    Google Scholar 

  27. M. Proietti and A. Pettorossi. Semantics preserving transformation rules for Prolog. In Symp. on Partial Evaluation and Semantics-Based Program Manipulation, pages 274–284. ACM Press, 1991. Sigplan Notices 26:9.

    Google Scholar 

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

    Google Scholar 

  29. F. Q. B. Da Silva. Correctness Proofs of Compilers and Debuggers: an Approach Based on Structural Operational Semantics. PhD thesis, Univ. of Edinburgh, 1991.

    Google Scholar 

  30. G. Tobermann and C. Beckstein. What’s in a trace: The box model revisited. In Peter Fritzon, editor, AADEBUG, volume 749 of LNCS. Springer-Verlag, 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Jahier, E., Ducassé, M., Ridoux, O. (2001). Specifying Prolog Trace Models with a Continuation Semantics. In: Logic Based Program Synthesis and Transformation. LOPSTR 2000. Lecture Notes in Computer Science, vol 2042. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45142-0_10

Download citation

  • DOI: https://doi.org/10.1007/3-540-45142-0_10

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-45142-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics