3 research outputs found

    Concurrency in prolog using threads and a shared database

    Get PDF
    Concurrency in Logic Programming has received much attention in the past. One problem with many proposals, when applied to Prolog, is that they involve large modifications to the standard implementations, and/or the communication and synchronization facilities provided do not fit as naturally within the language model as we feel is possible. In this paper we propose a new mechanism for implementing synchronization and communication for concurrency, based on atomic accesses to designated facts in the (shared) datábase. We argüe that this model is comparatively easy to implement and harmonizes better than previous proposals within the Prolog control model and standard set of built-ins. We show how in the proposed model it is easy to express classical concurrency algorithms and to subsume other mechanisms such as Linda, variable-based communication, or classical parallelism-oriented primitives. We also report on an implementation of the model and provide performance and resource consumption data

    Improving Distributed Unification through Type Analysis

    No full text
    n distributed implementations of logic programming, data structures are spread among different nodes and unification involves sending and receiving messages to access them. Traditional implementations make remote data structures accessible to other processes by sending messages which carry either the overall data structure (infinite-level copying) or only remote references to these data structures (zero-level copying). These fixed policies can be far from optimal on various classes of programs and may induce substantial overhead. The purpose of this paper is to present an implementation scheme for distributed logic programming which consists of tailoring the copying level to each procedure. The scheme is based on a consumption specification which describes the way the procedure "consumes" its arguments locally. The consumption specification (or an approximation of it) can be automatically obtained through a static analysis inspired by traditional type analyses. The paper also describes a high-level distributed implementation that uses the consumption specification to avoid unnecessary copying and to request data structures globally. Experimental results for a network of workstations show the potential of the approach
    corecore