home
  News
  Discussion forum
  WIKI
  Collaboration
  Downloads
  Language grammar
  Examples
 associated projects
  RuleML
  GoPubMed
  Mandarax
  RBSLA
  Jena

News

 

14 October 2004: Version 1.7.1 of Prova with Mandarax 3.3.1 has been released.

The version includes the following updates:
  • Prova 1.7.1 is integrated with Mandarax 3.3.1 and released with full open source under GNU LPGL license. It is available from Mandarax Project on SourceForge.net.
  • Comprehensive exception handling brings new dimension to the language improving its quality and usability. Almost all built-in predicates have been reworked to throw exceptions instead of silently intercepting them and backtracking. The users can now define exception handlers in Prova to process exceptions from built-in predicates, Java API constructors and method calls, and SQL queries. If a handler matching the occurring exception is not registered, the predicate/call/query fails as before. The handlers can execute an appropriate action, for example, logging the error, and either fail or succeed, with the latter ("compensation") option resulting in resuming the processing as though the exception did not occur. The exception handler can instantiate variables that the offending call was supposed to instantiate if successful, for example, by substituting certain default values. All exception handlers defined in outer recursion levels are also active for inner levels but the ones declared deeper are chosen in precedence. Currently, only the first applicable exception handler is executed.
       The following fragment based on ideas in ex010.prova shows the use of an exception handler declared by using a built-in predicate on_exception([in] Class, [in] Handler) prior to opening a non-existing file. The handler on_io_exception() (its name is user's choice) prints the exception and substitutes empty XML data for that not read from a non-existing file.
     
    :- eval(ex021()).
     
    on_io_exception(Reader) :-
       exception(Ex),
       println([Ex]),
       % Corrective action: make Reader access empty XML data
       StringReader=java.io.StringReader("<?xml version=1.0?>").
       Reader=java.io.BufferedReader(StringReader).
     
    ex021() :- 
       on_exception(java.io.IOException,on_io_exception(Reader)),
       fopen("nosuchfile.xml",Reader),
       % Enumerate and print one Line at a time
       read_enum(Reader,Line),
       println(["Line=",Line]).
     
    Output:
    > java.io.IOException
    > Line=<?xml version="1.0"?>

  • Prova consult is now an atomic transaction: the Prova rule base remains unchanged if IO or syntax problems occur during its execution.
  • Example ex016.prova introduces a new conversational consult(). The goals in the consulted code resulting in messages sent to the engine are assigned a conversation-id XID that is known to the code following this form of consult. The messages are thus correlated and can be intercepted by an inline reaction.
  • Example ex018.prova shows how multiple inline reactions can wait on the alternative messages expected for the same conversation-id. Sending an end_of_transmission message can be used from one of the reactions to discharge other reactions.
  • Performance of built-in predicates is increased.

5 October 2004: BioWisdom (Cambridge, UK) officially joins the Prova language development and integrates Prova into new products.

BioWisdom (www.biowisdom.com, Cambridge, UK) is the leading supplier of ontology based solutions to the drug discovery industry. Products include the most comprehensive set of life-sciences ontologies available as well as a powerful set of tools for ontology curation and deployment under its Sofia Knowledge Suite brand.

The Prova language (www.prova.ws) is a feature-rich rule based scripting language and distributed agent platform developed at City University, UK for EU projects GeneStream and BioGRID.

BioWisdom shares the Prova vision of rapid development and integration of disparate sources of data, computational engines, and knowledge sources within a declarative logical substrate. BioWisdom proposes to offer a compelling suite of knowledge based products for both ontology curation and process improvement with emphasis on problem solving, workflow and process management.

The combined benefits of declarative logic, loosely coupled integration, and agent communications within its message oriented middleware and ontology services will realise a powerful paradigm for informatics and scientific discovery. BioWisdom looks forward to offering its products to industry whilst sharing its application and systems experience back into the open source development of the Prova system.

More information is available from Simon Beaumont (Simon.Beaumont@biowisdom.com) at BioWisdom and Alex Kozlenkov (a.kozlenkov@city.ac.uk) at City University.

14 September 2004: Version 1.7.0 of Prova with Mandarax 3.3.1 has been released.

The version includes the following updates:
  • Prova 1.7.0 is integrated with Mandarax 3.3.1 and released with complete open source under GNU LPGL license. It is available from Mandarax Project on SourceForge.net.
  • New example prova/prova-xp/uniprot_use_002.prova shows how to create dynamically Java Swing dialogs and use J2SSH to set up port forwarding for remote MySQL queries.
  • Installation Notes now explain how to set up the system.
  • A Reviewer's Guide provides a walkthrough of the main features of the language.
  • An example prova/prova-aa/examples/jade/update_pdb_ssh shows how to combine Prova based J2SSH with the mobile agent monitoring PDB updates.
  • Minor bugs have been corrected.

31 August 2004: Version 1.6.5 of Prova with Mandarax 3.3.1 has been released.

The version includes the following important updates:
  • Prova 1.6.5 is integrated with Mandarax 3.3.1 and released with complete open source under GNU LPGL license. It is available from Mandarax Project on SourceForge.net.
  • Multiple Prova JADE agents can now co-exist on the same machine, so the JADE-based examples using more than one agent (e.g., prova/prova-aa/examples/jade/exchange) can run on one computer.
  • The version includes syntax error reporting for Prova consult as well as further refactoring and optimizations.
  • The processing of Java types and arithmetic operators is greatly improved in this version. The following fragment from the new ex007.prova shows how mixed type constructors and comparisons work. It is now possible to call Java methods that accept primitive types like short transparently.
     
    ex007() :- 
       % 5 is a java.lang.Integer but is automatically converted to short before the call.
       S=Short(5),   
       % A mixed type comparison (S is Short but 4 is Integer)
       S>4,
       println([S,">4"]).
  • JMS examples in prova/prova-aa/examples/jms and JADE examples in prova/prova-aa/examples/jade are re-packaged.
  • Minor bugs have been corrected.

26 July 2004: Version 1.6.0 of Prova with Mandarax 3.2 has been released.

The version introduces Prova scripting of Java Swing with rule-based events processing, execution of reaction rules in separate threads, thread switching, and refactoring of some of the main Prova classes.
  • Prova 1.6 integrated with Mandarax 3.2 is released with complete open source under GNU LPGL license.
  • A new example prova-examples/ex006.prova demonstrates most of the changes listed below.
  • Java Swing user interfaces accompanied by events processing can now be constructed as Prova scripts. This should be contrasted with Java code for UI events, which requires introduction of separate classes implementing appropriate event listeners. Being a Java API, Swing could surely have been invoked in previous version of Prova. However, until version 1.6, there was no way to define event listeners directly in a Prova script, or intercept and process UI events.
  • Prova 1.6 introduces a built-in predicate listen([in] EventType,[in] JComponent) that makes the main Prova processor a listener to UI events of the specified EventType for the specified UI element. The UI events can then be intercepted in and processed by Prova reaction rules including inline reactions.
  • All UI events are sent as Prova messages with performative swing and their content includes additional qualifiers specifying the type and the source of the event. All reactions to messages with performative swing are processed in the Swing events thread different from the main Prova thread. However, the main Prova thread suspends the processing of incoming messages until the message corresponding to the UI event has been fully processed. This mechanism is useful for solving threading problems in Swing designs.
  • If an asynchronous computation is started from a rule executing in a Swing thread, the computation runs in another 'Worker' thread. However, when the body of the rule resumes after an inline reaction receives the return message, it continues in the Swing thread.
  • A code fragment demonstrating some of the new Java Swing functionality is shown below.

  •  
    test_swing() :-
       F = javax.swing.JFrame("Test Frame"),
       F.setSize(640,480),
       Content = F.getContentPane(),
       FL = java.awt.FlowLayout(),
       Content.setLayout(FL),
     
       % Create a button JB1
       JB1 = javax.swing.JButton("OK"),
       % Call a built-in predicate listen to start transforming UI actions
       %    on the button JB1 to Prova messages
       listen(action,JB1),
       Content.add(JB1),
    
       F.setDefaultCloseOperation( javax.swing.JFrame.EXIT_ON_CLOSE ),
       F.show().
      
    % Reaction rule to process button actions (note the action Swing event type)
    rcvMsg(XID,Protocol,From,swing,[action,Cmd,javax.swing.JButton.JB|Extra]) :-
       % In the Swing events thread
       println(["Submit computation."]),
       spawn(XID,java.lang.Thread,sleep,2000),
       println(["Computation started from the Swing thread."]),
       % Wait for the computation to complete without
       %    blocking the Prova message queue
       rcvMsg(XID,self,Me,swing,[return,Ret]),
       % Computation is complete, and we are back in the Swing events thread with
       %    all local context variables intact and return Ret available
       % ... Prova literals and Swing calls ...
  • The thread switching mechanism has been introduced to help following the Swing threading rules and, in general, to enable execution of rules in a separate thread. The technique makes use of the convention that all incoming messages for performative async are executed in a separate asynchronous Prova thread for rules. Recall that messages with performative swing are executed in the Swing thread. Consider the example below that runs a non-terminating computation asynchronously in a rule body.

  •  
    % Suspend processing and switch threads
    switch_thread(ThreadName) :-
       iam(Me),
       sendMsg(XID,self,Me,ThreadName,[switch_thread]),
       rcvMsg(XID,self,Me,ThreadName,[switch_thread]).
    
    % Prolog-style infinite loop
    %   (note that tail recursion is eliminated in Prova)
    repeat().
    repeat() :-
       repeat().
    
    % Demonstrate how we can switch threads to continue execution of
    %    the rule body in a separate Asynchronous Rules thread
    ex006() :-
       switch_thread(async),
       repeat(),
       Thread.sleep(1000),
       Th = Thread.currentThread(),
       println(["Run in a separate thread: ",Th]).
  • The class ws.prova.reagent has been refactored to move some of its functionality to ws.prova.HelperPredicates.
  • A bug involving constructors and functional Java calls has been corrected. If the Object returned from these calls was specified as a constant Java object in a rule (e.g., 3 = Integer(2) or 3 = Event.getButton()) then these calls succeeded in previous versions even if the equality was not verified.
  • Integer subtraction (e.g., A = B - C) was not working in the previous versions.
  • Example ex006.prova and User's Guide are updated to reflect the changes.
     

15 July 2004: Version 1.5.0 of Prova with Mandarax 3.2 has been released.

The version includes the following important updates:
  • Prova 1.5 is released with complete open source under GNU LPGL license.
  • Prova is re-integrated with Mandarax version 3.2 with the necessary modifications to the Mandarax code, particularly, in org.mandarax.kernel.*, org.mandarax.reference.*, org.mandarax.sql.* as well as additional exclusive extensions under ws.prova.*. All standard Mandarax tests have been tested successfully. The Ant configuration file build.xml now includes corrections necessary for building Prova into mandarax.jar.
  • JavaDoc for the internal calls API is located under directory docs/api. This can be useful for developers wishing to update or contribute to the code.
  • Standard Prova examples are now moved to prova-examples directory.
  • Conversation identifiers now have the form "agent@machineNNN" where machine is the hostname of the computer originating the conversation. In this way, if agents on different machines have the same name, there is no confusion between messages belonging to conversations originating from different machines. NNN is the sequential number of the conversation originated by the machine.
  • Asynchronous thread-based computation is now defined precisely. The use of inline reactions as shown in the example below allows a very natural and transparent way of making both procedural and functional Java calls asynchronous. For more details, see the updated User's Guide.

  •  
    % Query that includes a synchronous method call
    worker(Result,Task) :-
       processor(Psimap),
       Psimap.executeTask(Task),
       Result=Psimap.getTaskResult().
     
    % The same query that calls the method asynchronously
    worker(Result,Task) :-
       processor(Psimap),
       spawn(XID,Psimap,executeTask,Task),
       rcvMsg(XID,self,Me,return,[Ret]),
       Result=Psimap.getTaskResult().
  • Prova lists are now temporarily disallowed on the left-hand side of equality sign. This had caused problems in the previous version when parsing functional Java method calls.
  • JMS examples in prova-aa/examples/jms are re-packaged.
  • Minor bugs have been corrected.
  • Many standard Prova and distributed Prova-AA examples and User's Guide are updated to reflect the changes.
     

12 April 2004: Version 1.4.0 of Prova has been released.

The version includes the following important updates:
  • The Prova-AA messaging is now fully compatible with the state machine style of encoding the agent roles in conversation protocols. Shown below are the general pattern for encoding states and transitions in Prova-AA and an example of a code fragment for states 1, 2(agree), and 2(refuse) of the encoding of the Buyer role in the Direct Buy protocol. For more details, see the updated User's Guide.
     
    state_j(...conversation_paramaters...) :-
        [!,],
        [event_j+1(...),] OR [condition_j_j+1(...), !,]
        [actions_j+1(...),]
        [state_j+1(...)].
    state_j(...) :-
        ...
    state_j+1(...) :-
        ...

directbuy_buyer_1(XID,Protocol,From,Product,Price) :-
  % Wait for a generic reply only knowing the conversation-id XID 
  rcvMsg(XID,Protocol,From,Perf,Product,seller),
  % Proceed based on their first reply Perf [agree OR refuse]
  directbuy_buyer_2(Perf,XID,Protocol,From,Product,Price).
 
directbuy_buyer_2(agree,XID,Protocol,From,Product,Price) :-
  !,
  rcvMsg(XID,Protocol,From,inform_result,Product,seller),
  println(["Agreed-1:"|Product]," "),
  % Send our offer (Price for Product)
  sendMsg(XID,Protocol,From,request,[Product,Price],buyer),
  directbuy_buyer_3(XID,Protocol,From,Product,Price).
directbuy_buyer_2(refuse,XID,Protocol,From,Product,Price) :-
  println(["Refused-1"|Product]," "),
  fail().
  • Multiple joins are now fully supported by the built-in sql_select predicate. The example below shows how several single table queries can be done in one multi-table query in the new version of sql_select.
sql_select(DB,cla,[px,PXA],[pdb_id,PDB_ID]),
sql_select(DB,cla,[px,PXB],[pdb_id,PDB_ID]),
PXA<PXB

% The same query as one statement that is executed much faster
 sql_select(DB,�cla as c1,cla as c2�,[�c1.px�,PXA],[�c2.px�,PXB],
    [�c1.pdb_id�,PDB_ID],[where,�c1.pdb_id=c2.pdb_id and c1.px<c2.px�])
  • Recursively nested single and double quotes are now supported. For example, 'aaa"bb'cc'bb"aaa' will be accepted as valid string.
  • All Prova-AA examples and User's Guide are updated to reflect the changes.
     

30 March 2004: Version 1.3.0 of Prova has been released.

The version includes the following important updates completing the intended semantics for agent conversations in Prova-AA:
  • The Prova-AA messaging has been updated to include explicit use of conversation-id(s) in messages. The conversation-id, with recommended names starting with XID, is now the first parameter of sendMsg, rcvMsg, and rcvMult. If XID is a free variable before the invocation of a sendMsg predicate, a new conversation is initiated and XID becomes instantiated with the conversation-id of the new conversation. Otherwise, sendMsg results in the follow-up (or reply) message to the previously existing conversation with the specified conversation-id. For inline reactions rcvMsg and rcvMult, a free conversation-id results in creating of a pattern waiting for messages sent with arbitrary conversation-id. If the conversation-id is a specified constant, only the matching incoming messages will be accepted.
  • The end_of_transmission message now has precise semantics so that its sending only occurs when all waiting inline reactions generated by the same message are discharged. The discharging of inline reactions is recursive in the sense that any such reaction is only discharged when lower-level reactions are discharged and so on.
  • All Prova-AA examples and User's Guide are updated to reflect the changes.
     

12 March 2004: Version 1.2.4 of Prova has been released.

The version includes the following additions:
  • Real-world applications of Prova-AA for distributed computation including the full code of PsiMap computation based on dynamic Manager/Router/Worker approach (see under /prova/prova-aa/examples/jade/psimap in manager and workerplus subdirectories). The full description will be included in the updated Prova User's Guide.
  • Performance enhancements including limited tail recursion elimination.
  • Constant strings surrounded by single as well as double quotes are now accepted. Repeating either of them twice results in embedding a single(double) quote inside a single(double) quote delimited string.
  • rcvMsg pattern for specifying reaction rules now passes the protocol type as the first parameter. This allows replying to messages in a protocol-independent way.
  • A reserved predicate shutdown can be used in heads of rules to specify actions taken by the runtime before the system is terminated. Both Ctrl-C and kill signals are intercepted in addition to normal program termination. This mechanism could, for example, provide an opportunity to send appropriate messages to the collaborating agents.
  • Several non-critical bugs have been fixed.
     

15 January 2004: Version 1.2 of Prova including Prova Agents Architecture Prova-AA has been released.

Prova Agents Architecture Prova-AA can run on top of the Java Message Service JMS and/or Java Agent DEvelopment Framework JADE . Multiple examples and README files are included in the prova-aa subdirectory. Prova-AA allows users to specify pattern-based reaction rules and inline reactions without introducing any new syntax. In particular, the reaction rules are specified as standard Prova rules for the predicate rcvMsg. The sending of messages is handled by the built-in sendMsg predicate. Java objects implementing Serializable interface can be transparently encapsulated. Examples test023.prova and test035.prova show a number of Prova-AA features suitable for running on a single machine.
 

22 December 2003: Prova Agents Architecture Prova-AA will be included with the next release of Prova

Prova Agents Architecture Prova-AA currently running on top of the Java Message Service JMS will be included with the next release of Prova. The specific version of the JMS system is Joram JMS. More details will follow shortly.
 

15 December 2003: consult_string([in] String) and copy([in] Reader, [in] Writer) built-in predicates added

Example test034.prova shows the use of the new built-in predicate consult_string([in] StringBuffer). The predicate allows rules to be read (consulted) from a String. This is useful for sending the rules across from one machine to another in a distributed environment effectively deploying a mobile agent. The example also shows how the new predicate copy([in] Reader, [in] Writer) can be used to copy character data between two objects implementing Reader and Writer interfaces.
 

26 November 2003: Prova integration with Hewlett-Packard Jena 2.0

Examples test029.prova...test033.prova show how Prova can be integrated with Hewlett-Packard's Semantic Web framework Jena. Note that prova_jena.bat or prova_jena.sh should be used to run these examples. These batch files put more JAR-files on the program classpath. All necessary JAR-files from the full latest version of Jena are included with Prova in the directory lib/jena. The integration essentially follows the Java syntax with the exception of the use of the built-in element([in] Object, [in] Iterator) predicate for iterating over collections of RDF objects.