On Validating PML Documents
From Tetherless World Wiki
Contents |
Terminology
Referenced ontologies are those ontologies which contribute definitions to the terms that are used by instance data. For example, we can view wine ontology (and other ontologies) as the referenced ontologies of wine instance data.
Integrity constraints: criteria used to capture consistency requirements for data. Usually they are represented in the referenced ontologies. For example, in OWL, cardinality restriction is a typical integrity constraint representation.
Integrity issues: are the issues caused by instance data failure to satisfy the integrity constraints of the referenced ontologies.
OWL Instance Evaluator
What is OWL Instance Evaluator?
OWL Instance Evaluator(oie) is an online evaluation service for OWL instance data.
URI
How does OWL Instance Evaluator work?
Given an input from user, OWL Instance Evaluator loads it from web or local file system, evaluates it against the selected checking points, then generate the output to users.
Input
- An OWL instance data(URI/Text)
Checking Points
- Loadable: whether it can be loaded from web or local file system?
- Syntactically correct: whether it can be successfully parsed into RDF triples?
- Logically consistent: whether it can pass pellet consistency test?
- Free of integrity issues: whether it violates the integrity constraints defined in referenced ontologies?
Output
- Evaluation report which contains the errors and issues encountered in the evaluation process
Typical Integrity Issues
- MPV: Missing Property Value
Given an individual i that has type c, let m be the number of triples (i p x) in D, where p is a property. If there is a cardinality restriction in referenced ontologies requiring all instances of c to have at least n values for property p, MPV issue will occur if m<n. Corresponding constructs: owl:cardinality, owl:minCardinality, owl:someValuesFrom
- EPV: Excessive Property Value
MPV issue would occur if there are more (i p x) triples in instance data than expected by referenced ontologies. Corresponding constructs: owl:cardinality, owl:maxCardinality
- UIT: Unexpected Individual Type
UIT issue would occur if an individual i is declared to be type t which is not compatible (no subclass relation) with the expected type from referenced ontology. Corresponding constructs: rdfs:domain, rdfs:range, owl:allValuesFrom
- NSIT: Non-specific Individual Type
Given an individual i and its declared type t, if t has some subclasses which are the leaf nodes in class hierarchy, but i is not known to be an instance of any of the subclasses, then NSIT issue will occur.
- RIT: Redundant Individual Type
If an individual i is explicitly declared to be an instance of two classes which have subclass relation, RIT issue would occur.
Error Messages
- Fatal error: validation service failed and cannot proceed e.g.
- Neither URI or text string is provided as input
- Cannot find data from the specified URI/text string input
- No RDF graph can be parsed from the input
- Error: validation service detected errors and the input data may not be processed correctly in whole e.g.
- An RDF graph could be parsed from the input, but some problems encountered
- Logical inconsistency happened
- Warning: validation service detected some integrity issues
Examples
Loading Errors
- Input:
http://iw4.stanford.edu/proofs/tonys/tonys_1/ns2
- Output:
Can not load RDF triples from URI http://iw4.stanford.edu/proofs/tonys/tonys_1/ns2
Syntax Errors
- Input:
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlp:Document rdf:about="http://ex.org/foo#bar"> <pmlp:hasName>a name<pmlp:hasName> </pmlp:Document> </rdf:RDF>
- Output:
RDF syntax error found in the parsing process. Jena report: {The element type "pmlp:hasName" must be terminated by the matching end-tag "</pmlp:hasName>".}
Logical Inconsistencies
- Input:
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlp:Document rdf:about="http://foo.com/bar#me"> <rdf:type rdf:resource="http://inference-web.org/2.0/pml-provenance.owl#Agent" /> </pmlp:Document> </rdf:RDF>
- Output:
OWL DL semantic inconsistency. Pellet report: {Error (KB is inconsistent!): Individual http://foo.com/bar#me is forced to belong to class http://inference-web.org/2.0/pml-provenance.owl#Agent and its complement.}
Integrity Issues
MPV Issue
- Input:
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlp:InferenceEngine rdf:about="http://ex.org/foo#bar"/> </rdf:RDF>
- Output:
Individual http://ex.org/foo#bar: instance of http://inference-web.org/2.0/pml-provenance.owl#InferenceEngine should have at least one value for the property http://inference-web.org/2.0/pml-provenance.owl#hasInferenceEngineRule
EPV Issue
- Input:
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlp:Document rdf:about="http://ex.org/foo#bar"> <pmlp:hasContent rdf:resource="http://ex.org/foo#C1"/> <pmlp:hasContent rdf:resource="http://ex.org/foo#C2"/> </pmlp:Document> </rdf:RDF>
- Output:
Individual http://ex.org/foo#bar: instance of http://inference-web.org/2.0/pml-provenance.owl#Document should have at most 1 values for the property http://inference-web.org/2.0/pml-provenance.owl#hasContent.
UIT Issue
- Input:
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlp:Document rdf:about="http://ex.org/foo#bar"> <pmlp:hasContent rdf:resource="http://ex.org/foo#info_doc_content" /> <pmlp:hasLanguage rdf:resource="http://ex.org/foo#my_language" /> </pmlp:Document> </rdf:RDF>
- Ouput:
Individual http://ex.org/foo#bar: its known type http://inference-web.org/2.0/pml-provenance.owl#Document is not compatible with the expected type http://inference-web.org/2.0/pml-provenance.owl#Information which is suggested by the rdfs:domain restriction on the property http://inference-web.org/2.0/pml-provenance.owl#hasLanguage.
- Input:
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlp:Document rdf:about="http://ex.org/foo#bar"> <pmlp:hasContent> <pmlp:Language rdf:about="http://ex.org/foo#my_language" /> </pmlp:hasContent> </pmlp:Document> </rdf:RDF>
- Ouput:
Individual http://ex.org/foo#my_language: its known type http://inference-web.org/2.0/pml-provenance.owl#Language is not compatible with the expected type http://inference-web.org/2.0/pml-provenance.owl#Information which is suggested by the rdfs:range restriction on the property http://inference-web.org/2.0/pml-provenance.owl#hasContent.
NSIT Issue
- Input:
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlp:IdentifiedThing rdf:about="http://ex.org/foo#bar"> <pmlp:hasName>a name</pmlp:hasName> </pmlp:IdentifiedThing> </rdf:RDF>
- Ouput:
Individual http://ex.org/foo#bar defined to have types http://inference-web.org/2.0/pml-provenance.owl#IdentifiedThing which are not leaf nodes in class hierarchy. You are expected to add a more specific type, the leaf node in class hierarchy, to the instance data.
RIT Issue
- Input:
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlp:Document rdf:about="http://foo.com/bar#me"> <rdf:type rdf:resource="http://inference-web.org/2.0/pml-provenance.owl#Source" /> </pmlp:Document> </rdf:RDF>
- Ouput:
Individual http://foo.com/bar#me: has a redundant type http://inference-web.org/2.0/pml-provenance.owl#Source
PML Validator
What is PML Validator?
PML Validator is an online validation service for PML document which is a file containing semantic web instance data which presents the explanations (provenance, justification, and trust) encoded by PML ontology. PML Validaotr is a specific implementation of OWL Instance Evaluator in PML domain.
PML Ontology
- provenance component: http://inference-web.org/2.0/pml-provenance.owl
- justification component: http://inference-web.org/2.0/pml-justification.owl
- trust component: http://inference-web.org/2.0/pml-trust.owl
Service URI
http://onto.rpi.edu/alpha/pmlvalidator/
How does PML Validator work?
As a specific implementation of the general OWL Instance Evaluator, PML Validator has similar workflow with OWL Instance Evaluator. That is, given an input (PML document) from user, PML Validator loads it from web or local file system, evaluates it against the selected checking points, then generate the output to users.
What is a valid PML document
A PML document is valid if it is free of all of the following problems. Although PML Validator is a specific implementation of OWL Instance Evaluator PML uses different strategy to treat integrity issues.
| status | classification | implementation |
|---|---|---|
| ? | load data |
|
| ? | load reference ontology and instance data |
|
| agreed | Syntax Errors |
|
| TBD | Logical Inconsistency |
|
| agreed | (min/max)cardinality |
|
| not error? | ??? |
|
| TBD | ??? |
|
Examples
- Examples in OWL Instance Evaluator
- Broken Link
<hasInferenceRule rdf:resource="http://www.cs.rpi.edu/~michaj6/GILA/gila.owl#MRE_RULE"/> in http://www.cs.rpi.edu/~michaj6/GILA/PML/gilaPml_2.owl
- Property value's type is range class of the subproperty
<rdf:RDF xmlns:pmlp="http://inference-web.org/2.0/pml-provenance.owl#" xmlns:pmlj="http://inference-web.org/2.0/pml-justification.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <pmlj:InferenceStep rdf:about="http://ex.org/foo#bar"> <pmlj:fromAnswerOrQuery> <pmlj:NodeSet rdf:about="http://ex.org/foo#n1" /> </pmlj:fromAnswerOrQuery> </pmlj:InferenceStep> </rdf:RDF>
