Results 1 -
9 of
9
The Integration of Functions into Logic Programming: From Theory to Practice
- Journal of Logic Programming
, 1994
"... Abstract. Functional logic programming languages combine the most important declarative programming paradigms, and attempts to combine these paradigms have a long history. The declarative multi-paradigm language Curry is influenced by recent advances in the foundations and implementation of function ..."
Abstract
-
Cited by 317 (50 self)
- Add to MetaCart
Abstract. Functional logic programming languages combine the most important declarative programming paradigms, and attempts to combine these paradigms have a long history. The declarative multi-paradigm language Curry is influenced by recent advances in the foundations and implementation of functional logic languages. The development of Curry is an international initiative intended to provide a common platform for the research, teaching, and application of integrated functional logic languages. This paper surveys the foundations of functional logic programming that are relevant for Curry, the main features of Curry, and extensions and applications of Curry and functional logic programming. 1
A Semantics for Tracing Declarative Multi-Paradigm Programs
- In Proceedings of the 6th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP’04
, 2004
"... We introduce the theoretical basis for tracing lazy functional logic computations in a declarative multi-paradigm language like Curry. Tracing computations is a difficult task due to the subtleties of the underlying operational semantics which combines laziness and non-determinism. In this work, we ..."
Abstract
-
Cited by 19 (11 self)
- Add to MetaCart
We introduce the theoretical basis for tracing lazy functional logic computations in a declarative multi-paradigm language like Curry. Tracing computations is a difficult task due to the subtleties of the underlying operational semantics which combines laziness and non-determinism. In this work, we define an instrumented operational semantics that generates not only the computed values and bindings but also an appropriate data structure—a sort of redex trail—which can be used to trace computations at an adequate level of abstraction. In contrast to previous approaches, which rely solely on a transformation to instrument source programs, the formal definition of a tracing semantics improves the understanding of the tracing process. Furthermore, it allows us to formally prove the correctness of the computed trail. A prototype implementation of a tracer based on this semantics demonstrates the usefulness of our approach.
Systematic generation of glass-box test cases for functional logic programs
- IN: PROC. OF THE 9TH INTERNATIONAL ACM SIGPLAN SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING, ACM PRESS
, 2007
"... We employ the narrowing-based execution mechanism of the functional logic programming language Curry in order to automatically generate a system of test cases for glass-box testing of Curry programs. The test cases for a given function are computed by narrowing a call to that function with initially ..."
Abstract
-
Cited by 11 (2 self)
- Add to MetaCart
We employ the narrowing-based execution mechanism of the functional logic programming language Curry in order to automatically generate a system of test cases for glass-box testing of Curry programs. The test cases for a given function are computed by narrowing a call to that function with initially uninstantiated arguments. The generated test cases are produced w.r.t. a selected code-coverage criterion such as control-flow coverage. Besides an adaption of the notion of control-flow coverage to functional (logic) programming, we present a novel coverage criterion for this programming paradigm. A particular difficulty of the adaption is the handling of laziness.
CurryBrowser: A Generic Analysis Environment for Curry Programs
- In Proc. of the 16th Workshop on Logic-based Methods in Programming Environments (WLPE’06
, 2006
"... Abstract. We present CurryBrowser, a generic analysis environment for the declarative multi-paradigm language Curry. CurryBrowser supports browsing through the program code of an application written in Curry, i.e., the main module and all directly or indirectly imported modules. Each module can be s ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
Abstract. We present CurryBrowser, a generic analysis environment for the declarative multi-paradigm language Curry. CurryBrowser supports browsing through the program code of an application written in Curry, i.e., the main module and all directly or indirectly imported modules. Each module can be shown in different formats (e.g., source code, interface, intermediate code) and, inside each module, various properties of functions defined in this module can be analyzed. In order to support the integration of various program analyses, CurryBrowser has a generic interface to connect local and global analyses implemented in Curry. CurryBrowser is completely implemented in Curry using libraries for GUI programming and meta-programming. 1
TeaBag: A Functional Logic Language Debugger
- In Proc. 13th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2004
, 2004
"... Abstract. We describe a debugger for functional logic computations. The debugger is an accessory of a virtual machine currently under development. A distinctive feature of this machine is its operational completeness of computations, which places novel demands on a debugger. We give an overview of t ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Abstract. We describe a debugger for functional logic computations. The debugger is an accessory of a virtual machine currently under development. A distinctive feature of this machine is its operational completeness of computations, which places novel demands on a debugger. We give an overview of the debugger’s features, in particular the handling of nondeterminism, the ability to control non-deterministic steps, to remove context information, to toggle eager evaluation, and to set breakpoints on both functions and terms. We briefly describe the debugger’s architecture and its interaction with the associated virtual machine. Finally, we describe a short debugging session of a defective program to show in action debugger features and window screenshots. 1
A Program Transformation for Tracing Functional Logic Computations
- UNIVERSITÀ
, 2006
"... Tracing program executions is a promising technique to find bugs in lazy functional logic programs. In previous work we developed an extension of a heap based semantics for functional logic languages which generates a trace reflecting the computation of the program. This extension was also prototyp ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Tracing program executions is a promising technique to find bugs in lazy functional logic programs. In previous work we developed an extension of a heap based semantics for functional logic languages which generates a trace reflecting the computation of the program. This extension was also prototypically implemented by instrumenting an interpreter for functional logic programs. Since this interpreter is too restricted for real world applications, we developed a program transformation which efficiently computes the trace by means of side effects during the computation. This paper presents our program transformation.
Reporting Failures in Functional Logic Programs
- In Proc. of the 15th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2006
, 2006
"... Computing with failures is a typical programming technique in functional logic programs. However, there are also situations where a program should not fail (e.g., in a deterministic top-level computation) but the evaluation fails accidentally, e.g., due to missing pattern combinations in an operatio ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Computing with failures is a typical programming technique in functional logic programs. However, there are also situations where a program should not fail (e.g., in a deterministic top-level computation) but the evaluation fails accidentally, e.g., due to missing pattern combinations in an operation defined by pattern matching. In this case, the program developer is interested in the context of the failed program point in order to analyze the reason of the failure. Therefore, this paper discusses techniques for reporting failures and proposes a new one that has been integrated in a Prolog-based compiler for the declarative multi-paradigm language Curry. Our new technique supports separate compilation of modules, i.e., the compilation of modules has not taken into account whether failures should be reported or not. The failure reporting is only considered in some linking code for modules. In contrast to previous approaches, the execution of programs in the failure reporting mode causes only a small overhead so that it can be also used in larger applications.
Lazy and Faithful Assertions for Functional Logic Programs
"... Abstract. Assertions or contracts are an important technique to improve the quality of software. Thus, assertions are also desirable for functional logic programming. Unfortunately, there is no established meaning of assertions in languages with a demand-driven evaluation strategy. Strict assertions ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Abstract. Assertions or contracts are an important technique to improve the quality of software. Thus, assertions are also desirable for functional logic programming. Unfortunately, there is no established meaning of assertions in languages with a demand-driven evaluation strategy. Strict assertions are immediately checked but may influence the behavior of programs. Lazy assertions do not modify the behavior but may not be faithful since some assertions might not be checked at all. This paper proposes an intermediate approach where the user can choose between lazy or faithful assertions. In order to avoid disadvantages of faithful assertions, we propose to delay them until an explicit point where faith is required, e.g., at the end of the program execution or before I/O actions. We describe a prototypical implementation of this idea in the functional logic language Curry. 1
Representing Functional Logic Computations ⋆
"... Abstract. The execution of declarative programs is largely independent of concrete execution strategies. For instance, functional logic languages support various strategies to execute programs, e.g., sequential, parallel, concurrent, fair, depth-first etc. This freedom causes difficulties for tools ..."
Abstract
- Add to MetaCart
Abstract. The execution of declarative programs is largely independent of concrete execution strategies. For instance, functional logic languages support various strategies to execute programs, e.g., sequential, parallel, concurrent, fair, depth-first etc. This freedom causes difficulties for tools intended to visualize, trace, or debug functional logic computations. To improve this situation, we describe structures for representing a functional logic computation independently of its concrete execution strategy. Our representation serves as an interface to connect different implementations of functional logic languages, such as PAKCS, KiCS, MCC, FLVM, or TOY, to current and future tools, such as tracers or debuggers, for visualizing and understanding computations. 1

