Previous topic  Top  Next topic  Print this Topic



The syntax of constraints is similar to the syntax of queries. A constraint is considered violated if a result is yielded when the constraint is posed as a query.

The syntax is:

!- constraintBody.


Example of constraints:

!- ?X:person[worksAt ->  ?C:company, hasJob -> false].


This constraint asserts that if a person works at a company, then it is not possible that this person has no job, namely that the value of the attribute “has job” is “false”.