Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] PAL ValidationErrorImpl errors when using API but not GUI

Bertram Stuart sjbertram at
Wed Aug 6 05:24:17 PDT 2008


I have an application that uses a Protege ontology (pprj format) and a 
number of PAL rules for validation. Those PAL rules are called through 
the API, looping over each constraint and calling the following:

EvaluationPolicy evalPolicy = new EvaluationPolicy();
ConstraintEvaluationEngine evalEngine = new 
ConstraintEvaluationEngine(evalPolicy, kb);
ConstraintEngineResponse response = 
Collection<ConstraintViolation> constraintResult = null;

if (response.areThereValidationErrors())
	for (Object obj : response.getValidationErrors(palConstraint))
else if (response.areThereConstraintViolations())
	constraintResult = response.getConstraintViolations(palConstraint);"Number of violations of " + palConstraint.getBrowserText() + 
" = " + constraintResult.size());
{"No constraint violations for " + palConstraint.getBrowserText());

palConstraint is an Instance that is the constraint and kb is the 
KnowledgeBase that the palConstraint was taken from and should be 
checked against. log is just a Log4J logger.

This has worked perfectly fine until recently, when it has started 
failing to parse the PAL rules and instead returning ValidationErrorImpl 
errors. The rules themselves are perfectly fine, as I can run them from 
within Protege and they pass/fail as appropriate. The problem is only 
from API calls, which get messages like the following:

	Predicate named < is referenced but not defined.
	Predicate named > is referenced but not defined.
	Function named number-of-own-slot-values is referenced but not defined.
	Function named coerce-to-string is referenced but not defined.

Given that the predicates and functions are core functionality, I am at 
a loss as to how they can not be defined. I have the protege.jar (3.3.1 
and 3.2.1 have been tested), lax.jar and looks-2.1.3.jar files from the 
Protege folder, plus antlr.jar and pal.jar from the plugins all included 
in my project.

Any suggestions on what might be causing core predicates and functions 
to fail as "not defined", especially when it works from the Protege app 
and worked as API calls until recently?


The information contained in this E-Mail and any subsequent 
correspondence is private and is intended solely for the intended 
recipient(s).  The information in this communication may be 
confidential and/or legally privileged.  Nothing in this e-mail is 
intended to conclude a contract on behalf of QinetiQ or make QinetiQ 
subject to any other legally binding commitments, unless the e-mail 
contains an express statement to the contrary or incorporates a formal Purchase Order.

For those other than the recipient any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance 
on such information is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be 
monitored and recorded for business purposes including security, audit 
and archival purposes.  Any response to this email indicates consent 
to this.

Telephone calls to QinetiQ may be monitored or recorded for quality 
control, security and other business purposes.

QinetiQ Limited
Registered in England & Wales: Company Number:3796233
Registered office: 85 Buckingham Gate, London SW1E 6PD, United Kingdom
Trading address: Cody Technology Park, Cody Building, Ively Road, Farnborough, Hampshire, GU14 0LX, United Kingdom

More information about the protege-discussion mailing list