Correction ISSUE-29

I just noticed that QuOnto has a sort of negation which is used for  
integrity constraints. Here's an example:

/* With the following EQL constraint, we guarantee that if the  
ontology is satisfiable then each person is a man or a woman */
/* Note that the ontology violates the constraint: try to disable  
consistency check during query answering
  and you will find out that there are 8 known person, 1 known man  
and 1 known woman */
EQLC
(
verify not exists(	SELECT personTable.personObject
                              		FROM sparqltable(	select ?personObject
                                                         			where {? 
personObject rdf:type 'person'} ) personTable
		WHERE personTable.personObject NOT IN 	(	SELECT manTable.manObject
						FROM sparqltable(	SELECT ?manObject
								WHERE {?manObject rdf:type 'man'}) manTable
						UNION
						SELECT womanTable.womanObject
						FROM sparqlTable(	SELECT ?womanObject
								WHERE {?womanObject rdf:type 'woman'}) womanTable
					)
	)
)

Cheers,
Bijan.

Received on Tuesday, 19 May 2009 16:31:41 UTC