Academia.edu no longer supports Internet Explorer.
To browse Academia.edu and the wider internet faster and more securely, please take a few seconds to upgrade your browser.
The Concurrent Prolog predicate for merging n input streams is investigated, and a compilation technique tor getting its efficient code is presented. Using the. technique, data are transferred with a .delay independent of n. Furthermore, it is shown that the addition and the removal of an input stream can be done within an average time of 0(1). The predicate for distributing data on an input stream to fa output streams can also be. realized as efficiently as n-ary merge. The compilation technique for the distributt predicate can further be applied to the implementation of mutable arrays thaf allow constant-time accessing and updating. Although the efficiency stated above could be achieved by a sOphisticated compiler, the codes should be provided directly by the system to get rid of the bulk ot source programs and the time required to compile them. 1 INTRODUCTION When we implement a large-scale distributed system in a parallel logic programming language such as Concurrent Prolog (Shapiro 1983) and PARLOG (Clark and Gregory 1984), the performance of the system will be influenced significantly by how efficiently streams as. interprocess communication channels can be merged and distributed. This paper deals with implementation techniques of the predicates that merge many input streams and those which distribute data on a single input stream into multiple output streams. The language we chose for the following discussions is Concurrent Prolog. However, the results obtained are applicable also to PARLOG. For readers unfamiliar with Concurrent Prolog, an outline of Concurrent Prolog is described in Appendix I. This paper focuses on implementation on conventional sequential computers. Of course, to demonstrate the viability of Concurrent Prolog on parallel computers, the scope of discussion cannot be limited to sequential computers. However, even on a parallel architecture, it would be very likely for each processor to deal with multiple processes for the following reasons. First, the number of processes a user can create should not be limited to the number of processors available. Second, even if a lot of processors are available, the best way to allocate two processes which communicate intensively with each other
International Conference on Logic Programming/Joint International Conference and Symposium on Logic Programming, 1994
PDP (Prolog Distributed Processor) is a multisequential system for Independent ANDnOR parallel execution of Prolog. The system is composed of a set of workers controlled hierarchically. Each w orker operates on its own private memory and interprocessor communication is performed only by the passing of messages. Independent AND parallelism is exploited following a fork-join scheme and OR parallelism is exploited following a multisequential approach. Both kinds of parallelism are implemented using closed environments. To exploit OR parallelism, the parent w orker environment i s reconstructed in a new worker by recomputing the initial goal without backtracking, following the success path obtained from the parent w orker. PDP deals with OR under AND parallelism producing the solutions of a set of parallel goals in a distributed way, that is, creating a new task for each element of the cross product. This approach has the advant a g e o f a voiding both storing partial solutions and synchronizing workers, resulting in a largely increased performance. PDP has been implemented on a transputer network and performance results show that PDP introduces very little overhead into sequential programs, and provides a high speedup for coarse grain parallel programs.
ACM Transactions on Programming Languages and Systems, 2001
Since the early days of logic programming, researchers in the field realized the potential for exploitation of parallelism present in the execution of logic programs. Their high-level nature, the presence of nondeterminism, and their referential transparency, among other characteristics, make logic programs interesting candidates for obtaining speedups through parallel execution. At the same time, the fact that the typical applications of logic programming frequently involve irregular computations, make heavy use of dynamic data structures with logical variables, and involve search and speculation, makes the techniques used in the corresponding parallelizing compilers and run-time systems potentially interesting even outside the field. The objective of this article is to provide a comprehensive survey of the issues arising in parallel execution of logic programming languages along with the most relevant approaches explored to date in the field. Focus is mostly given to the challenge...
Implementations of Logic Programming Systems, 1994
This paper introduces IC-Prolog II { a new implementation of Prolog that is particularly suited to distributed applications. Unlike o t h e r w ork on distributed logic programming, we do not aim to improve t h e r a w performance of a logic program nor do we require multi-processor machines or specialised hardware. Instead, our aim is to widen the applicability of logic programming to encompass new classes of practical applications which require the coordination of concurrently executing programs on separate workstations to communicate over the network. IC-Prolog II features multiple threads, a Parlog subsystem and high-level communication primitives. Multiple threads enables the concurrent execution of independent goals. The Parlog subsystem allows local ne-grained parallelism to be speci ed. In IC-Prolog II, Prolog can call Parlog and vice-versa. The combination of the two logic languages o ers greater expressive p o wer than simply the sum of the two since di erent components of the same application may use either Parlog or Prolog or both. The high-level communication primitives provide the means for independent IC-Prolog II processes on di erent m a c hines on a network to communciate. The result is a language well-suited for writing network-friendly applications.
ACM Transactions on Programming Languages and Systems, 2001
Since the early days of logic programming, researchers in the field realized the potential for exploitation of parallelism present in the execution of logic programs. Their high-level nature, the presence of non-determinism, and their referential transparency, among other characteristics, make logic programs interesting candidates for obtaining speedups through parallel execution. At the same time, the fact that the typical applications of logic programming frequently involve irregular computations, make heavy use of dynamic data structures with logical variables, and involve search and speculation, makes the techniques used in the corresponding parallelizing compilers and run-time systems potentially interesting even outside the field. The objective of this paper is to provide a comprehensive survey of the issues arising in parallel execution of logic programming languages along with the most relevant approaches explored to date in the field. Focus is mostly given to the challenges emerging from the parallel execution of Prolog programs. The paper describes the major techniques used for shared memory implementation of Or-parallelism, Andparallelism, and combinations of the two. We also explore some related issues, such as memory management, compile-time analysis, and execution visualization.
Proceedings of the 14th annual international symposium on Computer architecture - ISCA '87, 1987
This paper presents a new multiprocessor architecture for the parallel execution of logic programs, developed as part of the Aquarius Project. This architecture is designed to support AND-parallelism, OR-parallelism, and intelligent backtracking. We present the most comprehensive experimental results available to date on combined ANDparallelism, OR-parallelism, and intelligent backtracking in Prolog programs. Simulation results indicate that most Prolog programs in use today cannot effectively make use of multiprocessing.
ACM Transactions on Programming …, 1991
2017
Logic programming has been used in a broad range of fields, from artifficial intelligence applications to general purpose applications, with great success. Through its declarative semantics, by making use of logical conjunctions and disjunctions, logic programming languages present two types of implicit parallelism: and-parallelism and or-parallelism. This thesis focuses mainly in Prolog as a logic programming language, bringing out an abstract model for parallel execution of Prolog programs, leveraging the Extended Andorra Model (EAM) proposed by David H.D. Warren, which exploits the implicit parallelism in the programming language. A meta-compiler implementation for an intermediate language for the proposed model is also presented. This work also presents a survey on the state of the art relating to implemented Prolog compilers, either sequential or parallel, along with a walk-through of the current parallel programming frameworks. The main used model for Prolog compiler implement...
New Generation Computing, 1985
Concurrent Prolog is a logic-based parallel programming language which was designed and implemented experimentally in Prolog by E. Shapiro. In this paper, we examine the expressive power of communication mechanism based on shared logical variables and show that the language can express both unbounded buffer and bounded buffer stream communication only by shared logical variables and read-only annotation. We will
2007
Abstract. We connect the GNU Prolog compiler with the programming environment PM2, obtaining a system that allows the development of distributed multi-threaded Prolog applications. This is especially useful for computationally intensive problems, where performance is an important factor. The system API offers thread management primitives, as well as explicit communication between threads via message-passing.
Microprocessors and Microsystems, 1989
IEEE Transactions on Computers, 1990
This paper presents performance results for a parallel execution model for Prolog that supports AND-parallelism, oa-parallelism, and intelligent backtracking. The results show that restricted ANo-parallelism is of limited benefit for small programs, but produced speedups from 7 to 10 on two large programs. on-parallelism was generally not found to be useful for the benchmarks examined if the semantics of Prolog were preserved.
New Generation Computing, 1984
This paper describes the design of a Prolog machine architecture and organization. Our objective was to determine the maximum performance attainable by a sequential Prolog machine for "reasonable" cost. The paper compares the organization to both general purpose micro-coded machines and reduced instruction set machines. Hand timings indicate a peak performance rate of 450 K LIPS (logical inferences per second) is well within current technology limitations and 1 M LIPS is potentially feasible.
International Journal of Computers and Applications, 2000
DISPO is a Distributed Prolog Virtual Machine for interpreting and executing Prolog programs through distribution and multi-threading. It is a distributed version of a standard Prolog interpreter designed for exploiting OR-parallelism and pipe-lined AND parallelism. Some distinctive features of DISPO is that it speeds up the execution of Prolog programs and generates all possible solutions for a query, i.e. it works as an all-solutions Prolog virtual machine. The effectiveness of its distribution technique and load balancing equations resulted in a 70% average speedup in the execution time of a number of Prolog benchmark programs. These results are presented graphically with a detailed analysis of system performance.
This paper presents an approximation to the study of parallel systems using sequential tools. The Independent And-parallelism in Prolog is an example of parallel processing paradigm in the framework of logic programming, and implementations like &-Prolog uncover the potential performance of parallel processing. But this potential can also be explored using only sequential systems. Being the spirit of this paper to show how this can be done with a standard system, only standard Prolog will be used in the implementations included. Such implementations include tests for parallelism in And-Prolog, a correctnesschecking meta-interpreter of &-Prolog and a simulator of parallel execution for &-Prolog.
New Generation Computing, 2002
PAN is a general purpose, portable environment for executing logic programs in parallel. It combines a flexible, distributed architecture which is resilient to software and platform evolution with facilities for automatically extracting and exploiting AND and OR parallelism in ordinary Prolog programs. PAN incorporates a range of compile-time and run-time techniques to deliver the performance benefits of parallel execution while retaining sequential execution semantics. Several examples illustrate the efficiency of the controls that facilitate the execution of logic programs in a distributed manner and identify the class of applications that benefit from distributed platforms like PAN.
The Journal of Logic Programming, 1986
2000
This paper discusses the design of Dorpp, an or-parallel Prolog system for distributed memory architectures. The problem of sharing the environment across a set of nodes that do not physically share memory is addressed in a novel manner by designing a Virtual Shared Memory (VSM) scheme to specifically meet the requirements of or-parallelism. The aim is to avoid the overheads of a general VSM scheme that would provide a stricter level of memory coherence than is actually required.
Lecture Notes in Computer Science, 2011
We discuss the impact of the separation of logic engines (independent logic processing units) and multi-threading on the design of coordination mechanisms for a Prolog based agent infrastructure. We advocate a combination of coroutining constructs with focus on expressiveness and a simplified, multi-threading API that ensures optimal use available parallelism. In this context, native multi-threading is made available to the application programmer as a set of high-level primitives with a declarative flavor while cooperative constructs provide efficient and predictable coordination mechanisms. As illustrations of our techniques, a parallel fold operation as well as cooperative implementations of Linda blackboards and publish/subscribe are described.
1999
Delta Prolog is a logic programming language extending Prolog with constructs for sequential and parallel composition of goals, interprocess communication and synchronization, and external non-determinism. We present sequential and parallel search strategies for the language, based on the notion of derivations space. They rely upon distributed backtracking, a mechanism supporting the coordinated execution of multiple communicating Delta Prolog processes in their joint search for the solutions to a given problem. Then we describe an execution environment for Delta Prolog based on an abstract machine and discuss implementation issues for distributed memory Transputer-based multiprocessors. 1 INTRODUCTION Delta Prolog (P) is a parallel extension to Prolog inspired by Monteiro's Distributed Logic. The theory of Distributed Logic (Mon83], Mon86]) extends Horn Clause Logic (HCL) with constructs for the speci cation of distributed systems. As a distinctive feature, the P model relies on the programmer to specify the sequentiality constraints and the desirable parallelism existing in each problem, together with the corresponding communication schemes (PP84], PMCA86], PMCA88], CFP89b], CFP89a]). The presentation is organized as follows. In section 2, we discuss the programming model and give an example. A discussion of the P sequential and parallel execution models is made in section 3. Then, in section 4, we discuss implementation issues of the parallel execution models and outline the implementation on a Transputer-based distributed memory multi-computer (Meiko Computing Surface). Finally, in section 5, we present some conclusions and current work. 2 THE PROGRAMMING MODEL In this section we discuss the P language, focusing on the programming model, the language syntax and semantics, and give an example. 2.1 Language constructs A P program is a sequence of clauses of the form: H :-G 1 ;. .. ; G n :(n 0): H is a Prolog goal and each G i may be either a Prolog or a P goal. The latter are either split, event, or choice goals, described below. The comma is the sequential composition operator. Declaratively, the truth of goals in P is time-dependant, so H is true if G 1 ;. .. ; G n are true in succession (see section 2.2 below). Operationally, to solve goal H is to solve successively goals G 1 ;. .. ; G n. An important aspect is that a P program without P goals is a Prolog program, and so P is a true extension to Prolog. 2.1.1 Split goals Split goals are of the form S 1 ==S 2 , where // is a right associative parallel composition operator and S 1 and S 2 are arbitrary P goal expressions. To solve S 1 ==S 2 is to solve S 1 and S 2 within concurrent processes. Declaratively, S 1 // S 2 is true i S 1 and S 2 are jointly true. The abstract execution models for the language do not require that the processes solving these two goals share memory. So if S 1 and S 2 share logical variables, the variables must be uni ed whenever both processes terminate. Failure to unify those variables, failure to solve S 1 or S 2 , or failure of a subsequent goal and backtracking into the split goal, trigger distributed backtracking. Distributed backtracking extends the backtrack-based strategy of sequential Prolog systems as required to deal with concurrent processes. 2.1.2 Event goals Event goals are of the form X?E : C or X!E : C, where X is a term (the message), ? and ! are in x binary predicate symbols (the communication modes), E is bound to a Prolog atom (the event name), and C is a goal expression (the event condition), which can not evaluate P goals. Two event goals, e.g. X?E : C and X!E : C, are complementary i they have the same event name, and di erent communication modes (i.e. one of type ? and the other of type !). If C and D are the atom true, we write X?E and X!E. The two event goals execute successfully i X and Y unify and the conditions C and D evaluate to true. An event is the outcome of the successful resolution of a pair of complementary event goals. An event goal can only be said to be true when it has been successfully solved with its complementary goal. Thus the declarative semantics of P states that a goal is true for some combinations of sequences of events. An event goal, like X?E : C, suspends until a complementary event goal, like Y !E : D, is available in a concurrent process. When they are simultaneously available, their joint resolution may be intrepreted as a two-way exchange of messages followed by uni cation of X and Y and evaluation of conditions C and D. This form of rendezvous mechanism is a generalization of Hoare's and Milner's synchronous communication (Hoa85], Mil80]) as it takes advantage of term uni cation for exchanging messages. The only signi cance of the communication modes ! and ? is that they are complementary in the
Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.