17,967 research outputs found

    Adding plural arguments to Curry programs

    Get PDF
    Functional logic languages combine lazy (demand-driven) evaluation strategies from functional programming with non-deterministic computations from logic programming. To provide a strategy-independent semantics, most languages are based on the call-time choice semantics where parameters are passed as values. From an implementation point of view, the call-time choice semantics fits well with sharing performed by lazy languages. On the other hand, there are also situations where it is intended to pass non-deterministic arguments as sets of values in order to exploit the power of non-deterministic programming. This alternative parameter passing model is known under the name "plural" arguments. In this paper, we show how both mechanisms can be integrated in a single language. In particular, we present a novel technique to implement plural arguments in a call-time choice language so that existing implementations of contemporary functional logic languages can be easily re-used to implement plural parameter passing

    An Integrated Development Environment for Declarative Multi-Paradigm Programming

    Full text link
    In this paper we present CIDER (Curry Integrated Development EnviRonment), an analysis and programming environment for the declarative multi-paradigm language Curry. CIDER is a graphical environment to support the development of Curry programs by providing integrated tools for the analysis and visualization of programs. CIDER is completely implemented in Curry using libraries for GUI programming (based on Tcl/Tk) and meta-programming. An important aspect of our environment is the possible adaptation of the development environment to other declarative source languages (e.g., Prolog or Haskell) and the extensibility w.r.t. new analysis methods. To support the latter feature, the lazy evaluation strategy of the underlying implementation language Curry becomes quite useful.Comment: In A. Kusalik (ed), proceedings of the Eleventh International Workshop on Logic Programming Environments (WLPE'01), December 1, 2001, Paphos, Cyprus. cs.PL/011104

    SASLOG : Lazy Evaluation Meets Backtracking

    Get PDF
    We describe a combined functional / logic programming language SASLOG which contains Turner’s SASL, a fully lazy, higher-order functional language, and pure Prolog as subsets. Our integration is symmetric, i.e. functional terms can appear in the logic part of the program and v.v. Exploiting the natural correspondence between backtracking and lazy streams yields an elegant solution to the problem of transferring alternative variable bindings to the calling functional part of the program. We replace the rewriting approach to function evaluation by combinator graph reduction, thereby regaining computational efficiency and the structure sharing properties. Our solution is equally well suited to a fixed combinator set and to a super combinator implementation. In the paper we use Turner's fixed combinator set

    Constraint Functional Logic Programming over Finite Domains.

    Get PDF
    Abstract In this paper, we present our proposal to Constraint Functional Logic Programming over Finite Domains (CFLP (FD) ) with a lazy functional logic programming language which seamlessly embodies finite domain (FD) constraints. This proposal increases the expressiveness and power of constraint logic programming over finite domains (CLP (FD) ) by combining functional and relational notation, curried expressions, higher-order functions, patterns, partial applications, non-determinism, lazy evaluation, logical variables, types, domain variables, constraint composition, and finite domain constraints. We describe the syntax of the language, its type discipline, and its declarative and operational semantics. We also describe TOY(FD), an implementation for CFLP (FD) , and a comparison of our approach with respect to CLP (FD) from a programming point of view, showing the new features we introduce. And, finally, we show a performance analysis which demonstrates that our implementation is competitive with respect to existing CLP (FD) systems and that clearly outperforms the closer approach to CFLP (FD)
    corecore