15 research outputs found

    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

    Proving Non-Deterministic Computations in Agda

    Get PDF
    We investigate proving properties of Curry programs using Agda. First, we address the functional correctness of Curry functions that, apart from some syntactic and semantic differences, are in the intersection of the two languages. Second, we use Agda to model non-deterministic functions with two distinct and competitive approaches incorporating the non-determinism. The first approach eliminates non-determinism by considering the set of all non-deterministic values produced by an application. The second approach encodes every non-deterministic choice that the application could perform. We consider our initial experiment a success. Although proving properties of programs is a notoriously difficult task, the functional logic paradigm does not seem to add any significant layer of difficulty or complexity to the task

    Liberal Typing for Functional Logic Programs

    Get PDF
    We propose a new type system for functional logic programming which is more liberal than the classical Damas-Milner usually adopted, but it is also restrictive enough to ensure type soundness. Starting from Damas-Milner typing of expressions we propose a new notion of well-typed program that adds support for type-indexed functions, existential types, opaque higher-order patterns and generic functions-as shown by an extensive collection of examples that illustrate the possibilities of our proposal. In the negative side, the types of functions must be declared, and therefore types are checked but not inferred. Another consequence is that parametricity is lost, although the impact of this flaw is limited as "free theorems" were already compromised in functional logic programming because of non-determinism

    Denotation by Transformation: Towards Obtaining a Denotational Semantics by Transformation to Point-free Style

    Get PDF
    It has often been observed that a point-free style of programming provides a more abstract view on programs. We aim to use the gain in abstraction to obtain a denotational semantics for functional logic languages in a straightforward way. Here we propose a set of basic operations based on which arbitrary functional logic programs can be transformed to point-free programs. The resulting programs are strict but, nevertheless, the semantics of the original program is preserved. There is a one-to-one mapping from the primitives introduced by the transformation to operations in relation algebra. This mapping can be extended to obtain a relation algebraic model for the whole program. This yields a denotational semantics which is on one hand closely related to point-free functional logic programs and on the other hand connects to the well developed field of algebraic logic including automatic proving

    Un esquema de programaci贸n l贸gico-funcional con restricciones: marco te贸rico y aplicaci贸n a la depuraci贸n declarativa

    Get PDF
    En este trabajo consideramos dos tipos de errores susceptibles de ser tratados mediante nuestro m茅todo de depuraci贸n declarativa. En primer lugar, se consideran aquellas respuestas que han sido obtenidas de manera inesperada para un objetivo determinado (respuestas incorrectas). Para este primer caso, proponemos un c谩lculo de prueba positivo desarrollado a partir de CRWL(D), mediante el que es posible definir los 谩rboles de c贸mputo como 谩rboles de derivaci贸n l贸gica. En segundo lugar, se considera como un posible error aquel en el que en el conjunto de todas las respuestas obtenidas para un mismo objetivo falte alguna respuesta esperada (respuestas perdidas). En este segundo caso, proponemos otro c谩lculo denominado c谩lculo de prueba negativo, en el cual las derivaciones l贸gicas formalizan la recolecci贸n de respuestas computadas y sirven para definir 谩rboles de c贸mputo aplicables a la diagnosis de respuestas perdidas. Demostramos la correcci贸n l贸gica de los m茅todos de diagnosis propuestos, tanto para respuestas incorrectas como para respuestas perdidas, en relaci贸n a los sistemas de resoluci贸n de objetivos presentados. Finalmente, proponemos la implementaci贸n en el sistema TOY de dos posibles herramientas basadas en los m茅todos de depuraci贸n descritos

    脺ber logisch-funktionale Programmierung und deren Anwendung zum Testen

    Get PDF
    Die vorliegende Arbeit untersucht die Implementierung logisch-funktionaler Programmierung und deren Anwendung zur automatischen Generierung von Testdaten. Logisch-funktionale Programmierung vereint zwei deklarative Programmierparadigmen, funktionale Programmierung und Logikprogrammierung, in einem einheitlichen Programmiermodell. Es stellt sich heraus, dass diese Kombination zur Spezifikation und automatischen Generierung von Testdaten gut geeignet ist. Motiviert durch die erkannte Verwandtschaft von Testdatengenerierung und logisch-funktionaler Programmierung, stellt die Arbeit einen neuen Ansatz vor, logisch-funktionale Programme in rein funktionalen Programmiersprachen auszudr眉cken
    corecore