Implementation of EVOLP with Temporal Operators
XSB-version

This implementation runs under XSB-Prolog.
Rather than running built on top of the "Stable Models Semantics" as in the papers, the base LP semantics used by all the implementations is the "Well Founded Semantics".

To use it, simply consult file temporalEvolpXSB.P (in XSB-Prolog), and then try it according to the syntax below, and using the special predicates in the end of this page.

You may want to start running this small example.


Syntax:
 Rules are of the form:

 Head <- Body.

 where Head is a literal and Body a conjunction of literals separated by commas. To write facts, simply ommit the body and the <-

A literal is either an atom A in the extended language, or a default negated atom not A. 

An atom in the extended language is either an atom of the base  language, or assert((Rule)) where Rule is any rule in the extended language. 

You can also use the temporal operators:

  • previous(G) which is true if G was true in the previous state;
  • sometime(G) which is true if G was true in some state in the past;
  • always(G) which is true if G was true in all states in the past;
  • since(G1,G2) which is true if G2 is true in all states after a state where G1 is true.

As for the assert, these temporal predicates can also be nested.
Calls to prolog predicates can be made by calling prolog/1.

After consulting the initial evolving program, events may be given. 

Events are sets of rules of evolving programs.

Prolog code can be added both in the file with the evolving program, and in the file with the events. The Prolog code must be between 'beginProlog' and 'endProlog'.


Special predicates:
   
clean
Resets the knowledge base (i.e retracts the evolving program and all events until the present time).

consultEvol(FileName)
Consults the initial evolving logic program in the file FileName.

consultEvents(FName)
Reads a sequence of sets of events from the file FName. The various sets in the file are separated with 'newEvents'.

events ListofEvents
Simultaneously executes the events in the list.

listObj
Lists the current state of the preprocessed generalized LP.

listUp
Lists the evolving program and sequence of events so far.

current(N)
Returns the number of the state after the last event.

holds G
Query of goal G in the state after the last event.

G after S
Query of goal G after S steps. S may be a variable, in which case it queries for every S until current.

G after S in (X,Y) 
Query of G after S steps, where S varies from X to Y.

G after S until X 
The same as G after S in (1,X).