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.
- Logic Program
- Operational Semantic
- Semantic Function
- Denotational Semantic
- Trace Model
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, access via your institution.
Tax calculation will be finalised at checkout
Purchases are for personal use onlyLearn about institutional subscriptions
Unable to display preview. Download preview PDF.
R. Bahlke, B. Moritz, and G. Snelting. A generator for language-specific debugging systems. ACM SIGPLAN Notices, 22(7):92–101, 1987.
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.
C. Belleannée, P. Brisset, and O. Ridoux. A pragmatic reconstruction of ?Prolog. Journal of Logic Programming, 41(1):67–102, 1999.
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.
D. Berry. Generating program animators from programming language semantics. PhD thesis, University of Edinburgh, 1991.
P. Brisset and O. Ridoux. The compilation of ?Prolog and its execution with MALI. PI 687, IRISA, 1992.
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.
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.
L. Byrd. Understanding the control flow of Prolog programs. In S.-A. Tärnlund, editor, Logic Programming Workshop, 1980.
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.
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.
S. K. Debray and P. Mishra. Denotational and operational semantics for Prolog. Journal of Logic Programming, 5:61–91, 1988.
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).
M. Ducassé and J. Noyé. Tracing Prolog programs by source instrumentation is efficient enough. Journal of Logic Programming, 43(2), 2000. Tech. Notes.
M. Eisenstadt. A powerful Prolog trace package. In 6th European Conf. on Artificial Intelligence. North-Holland, 1984.
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.
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.
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.
A. Kishon and P. Hudak. Semantics directed program execution monitoring. Journal of Functional Programming, 5(4):501–547, 1995.
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.
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.
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.
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.
T. Nicholson and N. Foo. A denotational semantics for Prolog. ACM Transactions on Programming Languages and Systems, 11(4):650–665, 1989.
A. Pettorossi and M Proietti. Transformation of logicpro grams: Foundations and techniques. Journal of Logic Programming, 19 & 20:261–320, 1994.
G. D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, Computer Science Department, Aarhus University, 1981.
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.
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.
F. Q. B. Da Silva. Correctness Proofs of Compilers and Debuggers: an Approach Based on Structural Operational Semantics. PhD thesis, Univ. of Edinburgh, 1991.
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.
© 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
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42127-6
Online ISBN: 978-3-540-45142-6
eBook Packages: Springer Book Archive