Previous topic  Top  Next topic  Print this Topic
 

BodyOrdering

 

BodyOrdering is the sequence of F-atoms executed in a rule or query. E.g. when you have

?- ?X:Person AND ?X[hasName->?Y] AND ?X[worksAt->?Z].

then possible body orderings are

 

?- ?X:Person AND ?X[hasName->?Y] AND ?X[worksAt->?Z].

?- ?X[hasName->?Y] AND ?X:Person AND ?X[worksAt->?Z].

?- ?X[hasName->?Y] AND ?X[worksAt->?Z] AND ?X:Person.

...

When choosing "BodyOrdering = auto" then OntoBroker will try to optimize the sequence of F-atoms in the query. When choosing "BodyOrdering = off" then the sequence of F-atoms will stay it it is:

?- ?X:Person AND ?X[hasName->?Y] AND ?X[worksAt->?Z].

Note that this might lead to situations where the whole program is not evaluable anymore or where the query returns wrong results.