We've started to add basic messaging capabilities to the new "reloaded" Prova version. The "old" version has an extensive agent, workflows and event programming framework so porting this functionality to the "new" version that is rewritten from scratch will take some time. So far, the basic in-process sendMsg and rcvMsg (both global and inline reactions) have been added. See the new tests in ProvaMessagingTest.java. For example, this is the already working use of inline reactions:
:- eval(msg002()). msg002() :- println(["==========Messaging test 002=========="]), % Only one message will be received here as the reaction disappears after the first message is consumed rcvMsg(XID,self,From,inform,a(I)), println(["Received: ",rcvMsg(XID,self,From,inform,a(I))],""). msg002() :- for(I,1,2), sendMsg(XID,self,0,inform,a(I)), println(["Sent: ",sendMsg(XID,self,0,inform,a(I))],""). for(From,From,From) :- !. for(From,From,To) :- From<=To. for(I,From,To) :- From2=From+1, for(I,From2,To). % This outputs: % ==========Messaging test 002========== % Sent: ["sendMsg","prova@hostname","self",0,"inform",["a",1]] % Sent: ["sendMsg","prova@hostname","self",0,"inform",["a",2]] % Received: ["rcvMsg","prova@hostname","self","prova","inform",["a",1]]