2,688 research outputs found

    A Semantic Framework to Debug Parallel Lazy Functional Languages

    Get PDF
    It is not easy to debug lazy functional programs. The reason is that laziness and higherorder complicates basic debugging strategies. Although there exist several debuggers for sequential lazy languages, dealing with parallel languages is much harder. In this case, it is important to implement debugging platforms for parallel extensions, but it is also important to provide theoretical foundations to simplify the task of understanding the debugging process. In this work, we deal with the debugging process in two parallel languages that extend the lazy language Haskell. In particular, we provide an operational semantics that allows us to reason about our parallel extension of the sequential debugger Hood. In addition, we show how we can use it to analyze the amount of speculative work done by the processes, so that it can be used to optimize their use of resources

    A Generalized Model for Algorithmic Debugging

    Full text link
    The final publication is available at Springer via http://dx.doi.org/10.1007/978-3-319-27436-2_16Algorithmic debugging is a semi-automatic debugging technique that is present in practically all mature programming languages. In this paper we claim that the state of the practice in algorithmic debugging is a step forward compared to the state of the theory. In particular, we argue that novel techniques for algorithmic debugging cannot be supported by the standard internal data structures used in this technique, and a generalization of the standard definitions and algorithms is needed. We identify two specific problems of the standard formulation and implementations of algorithmic debugging, and we propose a reformulation to solve both problems. The reformulation has been done in a paradigm-independent manner to make it useful and reusable in different programming languages.This work has been partially supported by the EU (FEDER) and the Spanish Ministerio de Economía y Competitividad (Secretaría de Estado de Investigación, Desarrollo e Innovación) under Grant TIN2013-44742-C4-1-R and by the Generalitat Valenciana under Grant PROMETEOII/2015/013. David Insa was partially supported by the Spanish Ministerio de Educación under FPU Grant AP2010-4415.Insa Cabrera, D.; Silva Galiana, JF. (2015). A Generalized Model for Algorithmic Debugging. En Logic-Based Program Synthesis and Transformation. Springer. 261-276. https://doi.org/10.1007/978-3-319-27436-2_16261276Eclipse (2003). http://www.eclipse.org/Barbour, T., Naish, L.: Declarative debugging of a logical-functional language. Technical report, University of Melbourne (1994)Braßel, B., Siegel, H.: Debugging lazy functional programs by asking the oracle. In: Chitil, O., Horváth, Z., Zsók, V. (eds.) IFL 2007. LNCS, vol. 5083, pp. 183–200. Springer, Heidelberg (2008)Caballero, R.: A declarative debugger of incorrect answers for constraint functional-logic programs. In: Proceedings of the 2005 ACM-SIGPLAN Workshop on Curry and Functional Logic Programming (WCFLP 2005), pp. 8–13. ACM Press, New York, USA (2005)Caballero, R., Martin-Martin, E., Riesco, A., Tamarit, S.: EDD: A declarative debugger for sequential erlang programs. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014 (ETAPS). LNCS, vol. 8413, pp. 581–586. Springer, Heidelberg (2014)Caballero, R., Riesco, A., Verdejo, A., Martí-Oliet, N.: Simplifying questions in maude declarative debugger by transforming proof trees. In: Vidal, G. (ed.) LOPSTR 2011. LNCS, vol. 7225, pp. 73–89. Springer, Heidelberg (2012)Cheda, D., Silva, J.: State of the practice in algorithmic debugging. Electron. Notes Theor. Comput. Sci. 246, 55–70 (2009)Davie, T., Chitil, O.: Hat-delta: one right does make a wrong. In: Butterfield, A., (ed.) Proceedings of the 17th International Workshop on Implementation and Application of Functional Languages (IFL 2005), p. 11, September 2005Davie, T., Chitil, O.: Hat-delta: One right does make a wrong. In: Proceedings of the 7th Symposium on Trends in Functional Programming (TFP 2006), April 2006Fritzson, P., Shahmehri, N., Kamkar, M., Gyimóthy, T.: Generalized algorithmic debugging and testing. ACM Lett. Program. Lang. Syst. (LOPLAS) 1(4), 303–322 (1992)González, J., Insa, D., Silva, J.: A new hybrid debugging architecture for eclipse. In: Gupta, G., Peña, R. (eds.) LOPSTR 2013, LNCS 8901. LNCS, vol. 8901, pp. 183–201. Springer, Heidelberg (2014)Hermanns, C., Kuchen, H.: Hybrid debugging of java programs. In: Escalona, M.J., Cordeiro, J., Shishkov, B. (eds.) ICSOFT 2011. CCIS, vol. 303, pp. 91–107. Springer, Heidelberg (2013)Insa, D., Silva, J.: An algorithmic debugger for java. In: Proceedings of the 26th IEEE International Conference on Software Maintenance (ICSM 2010), pp. 1–6 (2010)Insa, D., Silva, J.: Automatic transformation of iterative loops into recursive methods. Inf. Soft. Technol. 58, 95–109 (2015)Insa, D., Silva, J., Riesco, A.: Speeding up algorithmic debugging using balanced execution trees. In: Veanes, M., Viganò, L. (eds.) TAP 2013. LNCS, vol. 7942, pp. 133–151. Springer, Heidelberg (2013)Insa, D., Silva, J., Tomás, C.: Enhancing declarative debugging with loop expansion and tree compression. In: Albert, E. (ed.) LOPSTR 2012. LNCS, vol. 7844, pp. 71–88. Springer, Heidelberg (2013)Lloyd, J.: Declarative error diagnosis. New Gener. Comput. 5(2), 133–154 (1987)Lux, M.: Münster Curry User’s Guide, May 2006. http://danae.uni-muenster.de/lux/curry/user.pdf ,MacLarty, I.D.: Practical Declarative Debugging of Mercury Programs. Ph.D. thesis, University of Melbourne (2005)Naish, L., Dart, P.W., Zobel, J.: The NU-Prolog debugging environment. In: Porto, A. (ed.) Proceedings of the 6th International Conference on Logic Programming (ICLP 1989), pp. 521–536. Lisboa, Portugal (1989)Nilsson, H.: Declarative Debugging for Lazy Functional Languages. Ph.D. thesis, Linköping, Sweden, May 1998Nilsson, H.: How to look busy while being as lazy as ever: the implementation of a lazy functional debugger. J. Funct. Program. 11(6), 629–671 (2001)Nilsson, H., Fritzson, P.: Algorithmic debugging for lazy functional languages. J. Funct. Program. 4(3), 337–370 (1994)Nilsson, H., Sparud, J.: The evaluation dependence tree: an execution record for lazy functional debugging. Technical report, Department of Computer and Information Science, Linköping (1996)Nilsson, H., Sparud, J.: The evaluation dependence tree as a basis for lazy functional debugging. Autom. Softw. Eng. 4(2), 121–150 (1997)Pope, B.: A Declarative Debugger for Haskell. Ph.D. thesis, The University of Melbourne, Australia (2006)Shapiro, E.: Algorithmic Program Debugging. MIT Press, Cambridge (1982)Shapiro, E.Y.: Inductive inference of theories from facts. Technical report RR 192, Yale University (New Haven, CT US) (1981)Silva, J.: A survey on algorithmic debugging strategies. Adv. Eng. Softw. 42(11), 976–991 (2011)Silva, J.: A vocabulary of program slicing-based techniques. ACM Comput. Surv. 44(3), 1–12 (2012)Thompson, B., Naish, L.: A guide to the nu-prolog debugging environment. Technical report, University of Melbourne (1997

    A Lightweight Hat: Simple Type-Preserving Instrumentation for Self-Tracing Lazy Functional Programs

    Get PDF
    Existing methods for generating a detailed trace of a computation of a lazy functional program are complex. These complications limit the use of tracing in practice. However, such a detailed trace is desirable for understanding and debugging a lazy functional program. Here we present a lightweight method that instruments a program to generate such a trace, namely the augmented redex trail introduced by the Haskell tracer Hat. The new method is a major step towards an omniscient debugger for real-world Haskell programs

    Tracing and Debugging of Lazy Functional Programs - A Comparative Evaluation of Three Systems

    Get PDF
    In this paper we compare three systems for tracing and debugging Haskell programs: Freja, the Redex Trail System and Hood. We identify the similarities and differences of these systems and we evaluate their usefulness in practice by applying them to a number of small to medium programs in which errors had deliberately been introduced

    The Interactive Curry Observation Debugger iCODE

    Get PDF
    AbstractDebugging by observing the evaluation of expressions and functions is a useful approach for finding bugs in lazy functional and functional logic programs. However, adding and removing observation annotations to a program is an effort making the use of this debugging technique in practice uncomfortable. Having tool support for managing observations is desirable. We developed a tool that provides this ability for programmers. Without annotating expressions in a program, the evaluation of functions, data structures and arbitrary subexpressions can be observed by selecting them from a tree-structure representing the whole program. Furthermore, the tool provides a step by step performing of observations where each observation is shown in a separated viewer. Beside searching bugs, the tool can be used to assist beginners in learning the non-deterministic behavior of lazy functional logic programs. To find a surrounding area that contains the failure, the tool can furthermore show the executed part of the program by marking the expressions that are activated during program execution

    A Generalization and Paradigm-Independent Reformulation of Algorithmic Debugging

    Full text link
    The final publication is available at Springer via http://dx.doi.org/10.1007/978-3-319-27436-2_16Algorithmic debugging is a semi-automatic debugging technique that is present in practically all mature programming languages. In this paper we claim that the state of the practice in algorithmic debugging is a step forward compared to the state of the theory. In particular, we argue that novel techniques for algorithmic debugging cannot be supported by the standard internal data structures used in this technique, and a generalization of the standard definitions and algorithms is needed. We identify two specific problems of the standard formulation and implementations of algorithmic debugging, and we propose a reformulation to solve both problems. The reformulation has been done in a paradigm-independent manner to make it useful and reusable in different programming languages.This work has been partially supported by the EU (FEDER) and the Spanish Ministerio de Economía y Competitividad (Secretaría de Estado de Investigación, Desarrollo e Innovación) under Grant TIN2013-44742-C4-1-R and by the Generalitat Valenciana under Grant PROMETEOII/2015/013. David Insa was partially supported by the Spanish Ministerio de Educación under FPU Grant AP2010-4415.Insa Cabrera, D.; Silva, J. (2015). A Generalization and Paradigm-Independent Reformulation of Algorithmic Debugging. Springer. 261-276. http://hdl.handle.net/10251/71738S261276Eclipse (2003). http://www.eclipse.org/Barbour, T., Naish, L.: Declarative debugging of a logical-functional language. Technical report, University of Melbourne (1994)Braßel, B., Siegel, H.: Debugging lazy functional programs by asking the oracle. In: Chitil, O., Horváth, Z., Zsók, V. (eds.) IFL 2007. LNCS, vol. 5083, pp. 183–200. Springer, Heidelberg (2008)Caballero, R.: A declarative debugger of incorrect answers for constraint functional-logic programs. In: Proceedings of the 2005 ACM-SIGPLAN Workshop on Curry and Functional Logic Programming (WCFLP 2005), pp. 8–13. ACM Press, New York, USA (2005)Caballero, R., Martin-Martin, E., Riesco, A., Tamarit, S.: EDD: A declarative debugger for sequential erlang programs. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014 (ETAPS). LNCS, vol. 8413, pp. 581–586. Springer, Heidelberg (2014)Caballero, R., Riesco, A., Verdejo, A., Martí-Oliet, N.: Simplifying questions in maude declarative debugger by transforming proof trees. In: Vidal, G. (ed.) LOPSTR 2011. LNCS, vol. 7225, pp. 73–89. Springer, Heidelberg (2012)Cheda, D., Silva, J.: State of the practice in algorithmic debugging. Electron. Notes Theor. Comput. Sci. 246, 55–70 (2009)Davie, T., Chitil, O.: Hat-delta: one right does make a wrong. In: Butterfield, A., (ed.) Proceedings of the 17th International Workshop on Implementation and Application of Functional Languages (IFL 2005), p. 11, September 2005Davie, T., Chitil, O.: Hat-delta: One right does make a wrong. In: Proceedings of the 7th Symposium on Trends in Functional Programming (TFP 2006), April 2006Fritzson, P., Shahmehri, N., Kamkar, M., Gyimóthy, T.: Generalized algorithmic debugging and testing. ACM Lett. Program. Lang. Syst. (LOPLAS) 1(4), 303–322 (1992)González, J., Insa, D., Silva, J.: A new hybrid debugging architecture for eclipse. In: Gupta, G., Peña, R. (eds.) LOPSTR 2013, LNCS 8901. LNCS, vol. 8901, pp. 183–201. Springer, Heidelberg (2014)Hermanns, C., Kuchen, H.: Hybrid debugging of java programs. In: Escalona, M.J., Cordeiro, J., Shishkov, B. (eds.) ICSOFT 2011. CCIS, vol. 303, pp. 91–107. Springer, Heidelberg (2013)Insa, D., Silva, J.: An algorithmic debugger for java. In: Proceedings of the 26th IEEE International Conference on Software Maintenance (ICSM 2010), pp. 1–6 (2010)Insa, D., Silva, J.: Automatic transformation of iterative loops into recursive methods. Inf. Soft. Technol. 58, 95–109 (2015)Insa, D., Silva, J., Riesco, A.: Speeding up algorithmic debugging using balanced execution trees. In: Veanes, M., Viganò, L. (eds.) TAP 2013. LNCS, vol. 7942, pp. 133–151. Springer, Heidelberg (2013)Insa, D., Silva, J., Tomás, C.: Enhancing declarative debugging with loop expansion and tree compression. In: Albert, E. (ed.) LOPSTR 2012. LNCS, vol. 7844, pp. 71–88. Springer, Heidelberg (2013)Lloyd, J.: Declarative error diagnosis. New Gener. Comput. 5(2), 133–154 (1987)Lux, M.: Münster Curry User’s Guide, May 2006. http://danae.uni-muenster.de/lux/curry/user.pdf ,MacLarty, I.D.: Practical Declarative Debugging of Mercury Programs. Ph.D. thesis, University of Melbourne (2005)Naish, L., Dart, P.W., Zobel, J.: The NU-Prolog debugging environment. In: Porto, A. (ed.) Proceedings of the 6th International Conference on Logic Programming (ICLP 1989), pp. 521–536. Lisboa, Portugal (1989)Nilsson, H.: Declarative Debugging for Lazy Functional Languages. Ph.D. thesis, Linköping, Sweden, May 1998Nilsson, H.: How to look busy while being as lazy as ever: the implementation of a lazy functional debugger. J. Funct. Program. 11(6), 629–671 (2001)Nilsson, H., Fritzson, P.: Algorithmic debugging for lazy functional languages. J. Funct. Program. 4(3), 337–370 (1994)Nilsson, H., Sparud, J.: The evaluation dependence tree: an execution record for lazy functional debugging. Technical report, Department of Computer and Information Science, Linköping (1996)Nilsson, H., Sparud, J.: The evaluation dependence tree as a basis for lazy functional debugging. Autom. Softw. Eng. 4(2), 121–150 (1997)Pope, B.: A Declarative Debugger for Haskell. Ph.D. thesis, The University of Melbourne, Australia (2006)Shapiro, E.: Algorithmic Program Debugging. MIT Press, Cambridge (1982)Shapiro, E.Y.: Inductive inference of theories from facts. Technical report RR 192, Yale University (New Haven, CT US) (1981)Silva, J.: A survey on algorithmic debugging strategies. Adv. Eng. Softw. 42(11), 976–991 (2011)Silva, J.: A vocabulary of program slicing-based techniques. ACM Comput. Surv. 44(3), 1–12 (2012)Thompson, B., Naish, L.: A guide to the nu-prolog debugging environment. Technical report, University of Melbourne (1997

    A declarative debugger of incorrect answers for constraint functional-logic programs

    Full text link
    Debugging is one of the essential parts of the software development cycle. However, the usual debugging techniques used in imperative languages such as the step by step execution often are not suitable for debugging declarative programming languages. We present here a graphical debugging environment for constraint lazy functional-logic programs based on declarative debugging. The debugger dis-plays the computation tree associated with a computation which has produced an incorrect answer, and navigates it with the assistance of the user until the error, an incorrect program rule, is found out. The debugger supports programs including equality and disequality constraints

    Algorithmic debugging for complex lazy functional programs

    Get PDF
    An algorithmic debugger finds defects in programs by systematic search. It relies on the programmer to direct the search by answering a series of yes/no questions about the correctness of specific function applications and their results. Existing algorithmic debuggers for a lazy functional language work well for small simple programs but cannot be used to locate defects in complex programs for two reasons: Firstly, to collect the information required for algorithmic debugging existing debuggers use different but complex implementations. Therefore, these debuggers are hard to maintain and do not support all the latest language features. As a consequence, programs with unsupported language features cannot be debugged. Also inclusion of a library using unsupported languages features can make algorithmic debugging unusable even when the programmer is not interested in debugging the library. Secondly, algorithmic debugging breaks down when the size or number of questions is too great for the programmer to handle. This is a pity, because, even though algorithmic debugging is a promising method for locating defects, many real-world programs are too complex for the method to be usuable. I claim that the techniques in in this thesis make algorithmic debugging useable for a much more complex lazy functional programs. I present a novel method for collecting the information required for algorithmically debugging a lazy functional program. The method is non-invasive, uses program annotations in suspected modules only and has a simple implementation. My method supports all of Haskell, including laziness, higher-order functions and exceptions. Future language extensions can be supported without changes, or with minimal changes, to the implementation of the debugger. With my method the programmer can focus on untrusted code -- lots of trusted libraries are unaffected. This makes traces, and hence the amount of questions that needs to be answered, more manageable. I give a type-generic definition to support custom types defined by the programmer. Furthermore, I propose a method that re-uses properties to answer automatically some of the questions arising during algorithmic debugging, and to replace others by simpler questions. Properties may already be present in the code for testing; the programmer can also encode a specification or reference implementation as a property, or add a new property in response to a statement they are asked to judge

    Algorithmic Debugging of Real-World Haskell Programs: Deriving Dependencies from the Cost Centre Stack

    Get PDF
    Existing algorithmic debuggers for Haskell require a transformation of all modules in a program, even libraries that the user does not want to debug and which may use language features not supported by the debugger. This is a pity, because a promising ap- proach to debugging is therefore not applicable to many real-world programs. We use the cost centre stack from the Glasgow Haskell Compiler profiling environment together with runtime value observations as provided by the Haskell Object Observation Debugger (HOOD) to collect enough information for algorithmic debugging. Program annotations are in suspected modules only. With this technique algorithmic debugging is applicable to a much larger set of Haskell programs. This demonstrates that for functional languages in general a simple stack trace extension is useful to support tasks such as profiling and debugging
    corecore