Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!quasi-eli!cs.yale.edu!ciancarini-paolo From: ciancarini-paolo@cs.yale.edu (paolo ciancarini) Newsgroups: comp.lang.prolog Subject: Re: Demons in Prolog Summary: We had some experiences in Shared Prolog Message-ID: <27563@cs.yale.edu> Date: 3 Dec 90 21:04:13 GMT References: <4716@mahendo.Jpl.Nasa.Gov> Sender: news@cs.yale.edu Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158 Lines: 56 Nntp-Posting-Host: poe.systemsy.cs.yale.edu Originator: cianca@poe.CS.Yale.Edu In article <4716@mahendo.Jpl.Nasa.Gov> alan@nereid.jpl.nasa.gov (Alan Quan) writes: > > >I need to find out if it's possible to implement demons in Prolog in an >efficient manner. These can be simple triggers which respond to >pre-specified situations in the input data and then initiate a standard >backward-chained Prolog inference (I'm also interested in efficient >Prolog forward chaining in general, but this is not essential). > In the current implementation of Shared Prolog, a distributed logic language defined and implemented by myself and other people at University of Pisa, Italy, we use both backward and forward chaining as a technique to implement parallel logic agents and triggers. An SP program defines a set of logic agents that cooperate across a blackboard, i.e. a dynamic knowledge base that is actually a Tuple Space a la Linda. Communication operations are in fact in(Atom) and out(Atom), that have a semantic similar to assert and retract (I am afraid that this rule out real-time efficiency, but actually our performance experiences are quite encouraging; and for the moment we are not using Linda for the communication kernel). Agents are triggered by patterns that have the following structure: Read In | Goal Out where Read and In are logic goals that define an activation guard (a trigger) that when satisfied with respect the current contents of the blackboard starts a local Prolog goal (Shared Prolog is an extension of Prolog); when this terminates the Out is written back to the blackboard. So each agent uses locally backward chaining, while the blackboard as a whole can be seen as a working memory of a logic bases production system (that uses forward chaining). We could also define global distributed backtracking in a particular application, but of course it is very computationally expensive, so this is not an embedded linguistic mechanism (as opposed to DeltaProlog, that I believe in its last version included distributed backtracking as a linguistic feature). We implemented Shared Prolog on a network of non homogeneous workstations (Vaxes and Suns). Shared Prolog is a project in progress. It is used to design a complex programming environment. Some formal details are contained in a paper forthcoming on ACM TOPLAS (January 91). Some implementation details are contained in a paper published in Proc. ACM Symp on Principles and Practice of Parallel Programming, Seattle 1990, pp.40-49. Paolo Ciancarini Visiting Scientist Dept. of Computer Science Yale University Brought to you by Super Global Mega Corp .com