22 research outputs found

    Programming with narrowing: A tutorial

    Get PDF
    AbstractNarrowing is a computation implemented by some declarative programming languages. Research in the last decade has produced significant results on the theory and foundation of narrowing, but little has been published on the use of narrowing in programming. This paper introduces narrowing from a programmer’s viewpoint; shows, by means of examples, when, why and how to use narrowing in a program; and discusses the impact of narrowing on software development activities such as design and maintenance. The examples are coded in the programming language Curry, which provides narrowing as a first class feature

    Call Pattern Analysis for Functional Logic Programs

    Get PDF
    This paper presents a new program analysis framework to approximate call patterns and their results in functional logic computations. We consider programs containing non-strict, nondeterministic operations in order to make the analysis applicable to modern functional logic languages like Curry or TOY. For this purpose, we present a new fixpoint characterization of functional logic computations w.r.t. a set of initial calls. We show how programs can be analyzed by approximating this fixpoint. The results of such an approximation have various applications, e.g., program optimization as well as verifying safety properties of programs

    Programmiersprachen und Rechenkonzepte

    Get PDF
    Seit 1984 veranstaltet die GI-Fachgruppe "Programmiersprachen und Rechenkonzepte", die aus den ehemaligen Fachgruppen 2.1.3 "Implementierung von Programmiersprachen" und 2.1.4 "Alternative Konzepte für Sprachen und Rechner" hervorgegangen ist, regelmäßig im Frühjahr einen Workshop im Physikzentrum Bad Honnef. Das Treffen dient in erster Linie dem gegenseitigen Kennenlernen, dem Erfahrungsaustausch, der Diskussion und der Vertiefung gegenseitiger Kontakte

    Optimal divide and query

    Full text link
    Algorithmic debugging is a semi-automatic debugging technique that allows the programmer to precisely identify the location of bugs without the need to inspect the source code. The technique has been successfully adapted to all paradigms and mature implementations have been released for languages such as Haskell, Prolog or Java. During three decades, the algorithm introduced by Shapiro and later improved by Hirunkitti has been thought optimal. In this paper we first show that this algorithm is not optimal, and moreover, in some situations it is unable to find all possible solutions, thus it is incomplete. Then, we present a new version of the algorithm that is proven optimal, and we introduce some equations that allow the algorithm to identify all optimal solutions.This work has been partially supported by the Spanish Ministerio de Ciencia e Innovación under grant TIN2008-06622-C03-02 and by the Generalitat Valenciana under grant PROMETEO/2011/052.Insa Cabrera, D.; Silva Galiana, JF. (2011). Optimal divide and query. En Progress in Artificial Intelligence. Springer Verlag (Germany). 7026:224-238. https://doi.org/10.1007/978-3-642-24769-9_17S2242387026Braßel, B., Huch, F.: The Kiel Curry system KiCS. In: Proc of 17th International Conference on Applications of Declarative Programming and Knowledge Management (INAP 2007) and 21st Workshop on (Constraint) Logic Programming (WLP 2007), pp. 215–223. Technical Report 434, University of Würzburg (2007)Caballero, R.: A Declarative Debugger of Incorrect Answers for Constraint Functional-Logic Programs. In: Proc. of the 2005 ACM SIGPLAN Workshop on Curry and Functional Logic Programming (WCFLP 2005), pp. 8–13. ACM Press, New York (2005)Caballero, R.: Algorithmic Debugging of Java Programs. In: Proc. of the 2006 Workshop on Functional Logic Programming (WFLP 2006). Electronic Notes in Theoretical Computer Science, pp. 63–76 (2006)Caballero, R., Martí-Oliet, N., Riesco, A., Verdejo, A.: A Declarative Debugger for Maude Functional Modules. Electronic Notes in Theoretical Computer Science 238, 63–81 (2009)Davie, T., Chitil, O.: Hat-delta: One Right Does Make a Wrong. In: Seventh Symposium on Trends in Functional Programming, TFP 2006 (April 2006)Fritzson, P., Shahmehri, N., Kamkar, M., Gyimóthy, T.: Generalized Algorithmic Debugging and Testing. LOPLAS 1(4), 303–322 (1992)Hirunkitti, V., Hogger, C.J.: A Generalised Query Minimisation for Program Debugging. In: Adsul, B. (ed.) AADEBUG 1993. LNCS, vol. 749, pp. 153–170. Springer, Heidelberg (1993)Insa, D., Silva, J.: An Algorithmic Debugger for Java. In: Proc. of the 26th IEEE International Conference on Software Maintenance, pp. 1–6 (2010)Insa, D., Silva, J.: Optimal Divide and Query (extended version). Available in the Computing Research Repository (July 2011), http://arxiv.org/abs/1107.0350Lloyd, J.W.: Declarative Error Diagnosis. New Gen. Comput. 5(2), 133–154 (1987)Luo, Y., Chitil, O.: Algorithmic debugging and trusted functions. Technical report 10-07, University of Kent, Computing Laboratory, UK (August 2007)Lux, W.: Münster Curry User’s Guide (release 0.9.10 of May 10, 2006), http://danae.uni-muenster.de/~lux/curry/user.pdfMacLarty, I.: Practical Declarative Debugging of Mercury Programs. PhD thesis, Department of Computer Science and Software Engineering, The University of Melbourne (2005)Naish, L., Dart, P.W., Zobel, J.: The NU-Prolog Debugging Environment. In: Porto, A. (ed.) Proceedings of the Sixth International Conference on Logic Programming, Lisboa, Portugal, pp. 521–536 (June 1989)Nilsson, H.: Declarative Debugging for Lazy Functional Languages. PhD thesis, Linköping, Sweden (May 1998)Pope, B.: A Declarative Debugger for Haskell. PhD thesis, The University of Melbourne, Australia (2006)Shapiro, E.: Algorithmic Program Debugging. MIT Press (1982)Silva, J.: A Comparative Study of Algorithmic Debugging Strategies. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 143–159. Springer, Heidelberg (2007)Silva, J.: An Empirical Evaluation of Algorithmic Debugging Strategies. Technical Report DSIC-II/10/09, UPV (2009), http://www.dsic.upv.es/~jsilva/research.htm#tech

    Programmiersprachen und Rechenkonzepte

    Get PDF
    Seit 1984 veranstaltet die GI--Fachgruppe "Programmiersprachen und Rechenkonzepte" regelmäßig im Frühjahr einen Workshop im Physikzentrum Bad Honnef. Das Treffen dient in erster Linie dem gegenseitigen Kennenlernen, dem Erfahrungsaustausch, der Diskussion und der Vertiefung gegenseitiger Kontakte

    Compiling a Functional Logic Language: The Fair Scheme

    Full text link
    Abstract. We present a compilation scheme for a functional logic programming language. The input program to our compiler is a constructor-based graph rewrit-ing system in a non-confluent, but well-behaved class. This input is an interme-diate representation of a functional logic program in a language such as Curry or T OY. The output program from our compiler consists of three procedures that make recursive calls and execute both rewrite and pull-tab steps. This output is an intermediate representation that is easy to encode in any number of programming languages. Our design evolves the Basic Scheme of Antoy and Peters by removing the “left bias ” that prevents obtaining results of some computations—a behavior related to the order of evaluation, which is counter to declarative programming. The benefits of this evolution are not only the strong completeness of computa-tions, but also the provability of non-trivial properties of these computations. We rigorously describe the compiler design and prove some of its properties. To state and prove these properties, we introduce novel definitions of “need ” and “fail-ure. ” For non-confluent constructor-based rewriting systems these concepts are more appropriate than the classic definition of need of Huet and Levy

    Implementing a Functional Logic Programming Language via the Fair Scheme

    Get PDF
    This document presents a new compiler for the Functional Logic programming language Curry based on a novel pull-tabbing evaluation strategy called the Fair Scheme. A simple version of the Fair Scheme is proven sound, complete, and optimal. An elaborated version is also developed, which supports narrowing computations and other features of Curry, such as constraint programming, equational constraints, and set functions. The Fair Scheme is used to develop a new Curry system called Sprite, a high-quality, performant implementation whose aims are to promote practical uses of Curry and to serve as a laboratory for further research. An important aspect of Sprite is its integration with the popular imperative language Python. This combination allows one to write hybrid programs in which the programmer may move between declarative and non-declarative styles with relative ease. Benchmarking data show Sprite to be more complete than other Curry systems and competitive in terms of execution time, particularly for non-deterministic programs
    corecore