Abstract
The aim of this paper is to provide theoretical foundations for the declarative debugging of wrong answers in lazy functional logic programming. We rely on a logical framework which formalizes both the intended meaning and the execution model of programs in a simple language which combines the expressivity of pure Prolog and a significant subset of Haskell. As novelties w.r.t. to previous related approaches, we deal with functional values both as arguments and as results of higher order functions, we obtain a completely formal specification of the debugging method, and we extend known soundness and completeness results for the debugging of wrong answers in logic programming to a substantially more difficult context. A prototype implementation of a working debugger is planned as future work.
Work partially supported by the Spanish CICYT (project CICYT-TIC98-0445-C03-02/97 ‘TREND’)
Acknowledgement
We are grateful to the anonymous referees for their constructive remarks.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
S. Antoy, R. Echahed, M. Hanus. A Needed Narrowing Strategy. 21st ACM Symp. on Principles of Programming Languages, Portland, ACM Press, pp. 268–279, 1994.
G. Ferrand. Error Diagnosis in Logic Programming, an Adaptation of E.Y. Shapiro’s Method. The Journal of Logic Programming 4(3), pp. 177–198, 1987.
M. Falaschi, G. Levi, M. Martelli, C. Palamidessi. A Model-theoretic Reconstruction of the Operational Semantics of Logic Programs. Information and Computation 102(1). pp. 86–113, 1993.
J.C. González-Moreno, M.T. Hortalá-González, M. Rodrìguez-Artalejo. A Higher Order Rewriting Logic for Functional Logic Programming. Procs. of ICLP’97, The MIT Press, pp. 153–167, 1997.
J.C. González-Moreno, M.T. Hortalá-González, F.J. López-Fraguas, M. Rodrìguez-Artalejo. An Approach to Declarative Programming Based on a Rewriting Logic, Journal of Logic Programming 40(1), pp. 47–87, 1999.
M. Hanus. The Integration of Functions into Logic Programming: A Survey. J. of Logic Programming 19-20, special issue ‘Ten Years of Logic Programming’, pp. 583–628, 1994.
M. Hanus (ed.), Curry: an Integrated Functional Logic Language, Version 0.7, February 2, 2000. Available at http://www.informatik.uni-kiel.de/~curry/.
J. W. Lloyd. Declarative Error Diagnosis. New Generation Computing 5(2), pp. 133–154, 1987.
R. Loogen, F.J. López-Fraguas, M. Rodrìguez-Artalejo. A Demand Driven Computation Strategy for Lazy Narrowing. Procs. of PLILP’93, Springer LNCS 714, pp. 184-200, 1993.
F.J. López-Fraguas, J. Sánchez-Hernández.T OY: A Multiparadigm Declarative System, in Proc. RTA’99, Springer LNCS 1631, pp 244–247, 1999. Available at http://titan.sip.ucm.es/toy.
L. Naish. Declarative dDebugging of Lazy Functional Programs. Australian Computer Science Communications, 15(1), pp. 287–294, 1993.
L. Naish. A Declarative Debugging Scheme. J. of Functional and Logic Programming, 1997-3.
L. Naish, T. Barbour. A Declarative Debugger for a Logical-Functional Language. In Graham Forsyth and Moonis Ali, eds. Eight International Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems Invited and additional papers, Vol. 2, pp. 91–99, 1995. DSTO General Document 51.
L. Naish, T. Barbour. Towards a Portable Lazy Functional Declarative Debugger. Australian Computer Science Communications, 18(1), pp. 401–408, 1996.
H. Nilsson, P. Fritzson. Algorithmic Debugging of Lazy Funcional Languages. The Journal of Functional Programming, 4(3), pp. 337–370, 1994.
H. Nilsson, J. Sparud. The Evaluation Dependence Tree as a Basis for Lazy Functional Debugging. Automated Software Engineering, 4(2), pp. 121–150, 1997.
H. Nilsson. Declarative Debugging for Lazy Functional Languages. Ph.D. Thesis. Dissertation No. 530. Univ. Linkóping, Sweden. 1998.
J. Peterson, K. Hammond (eds.), Report on the Programming Language Haskell 98, A Non-strict, Purely Functional Language, 1 February 1999.
E.Y. Shapiro. Algorithmic Program Debugging. The MIT Press, Cambridge,Mass., 1982.
L. Sterling, E. Shapiro. The Art of Prolog. The MIT Press, 1986.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Caballero, R., López-Fraguas, F.J., Rodrìguez-Artalejo, M. (2001). Theoretical Foundations for the Declarative Debugging of Lazy Functional Logic Programs. In: Kuchen, H., Ueda, K. (eds) Functional and Logic Programming. FLOPS 2001. Lecture Notes in Computer Science, vol 2024. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44716-4_11
Download citation
DOI: https://doi.org/10.1007/3-540-44716-4_11
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41739-2
Online ISBN: 978-3-540-44716-0
eBook Packages: Springer Book Archive