1. Admin CTIC
  2. rifle

Wiki

Clone wiki

rifle / Validator

RIF Validator is a tool for checking the correcteness of a RIF document. It is part of the RIFle Project.

Important note

This service is down since January 2012. It seems that it will not be available soon.

About the service

RIF-Core Validation Service is a service that allows you to verify that your RIF-Core document is an admissible document according to the RIF-Core Specification, i.e., it is an XML document that conforms to all the syntactic constraints of RIF-Core, including conformance with XML Schema, safeness criteria, RDF/OWL compatibility, etc. This service only accepts normative XML syntax to process RIF-Core documents.

The RIF-Core Validation Service is intended to be used by:

  • RIF-Core developers, to validate the syntactic conformance of RIF-Core documents, thus helping them to debug their own rulesets.
  • RIF-Core consumers, to automatically validate the syntactic conformance of RIF-Core inputs. Moreover, a conformant RIF-Core consumer may use this validator to check the syntax of safe Core formulas and to reject non-safe RIF-Core documents.
  • RIF-Core producers, to automatically validate the syntactic conformance of the produced RIF-Core documents. For instance, RIF-Core editors, to validate the syntactic conformance of RIF-Core formulas, rules, groups and documents, helping developers to debug their own rulesets.

The RIF-Core Validation Service is available as a public web service, but also as open source software under the terms of EPL License, so you can set up your own service or modify the source code, if needed.

Please, notice that this work is not endorsed by W3C.

More documentation about the service can be found here.

There is also an implementation report gathering all the required information by W3C RIF WG.

How to use the service

The service is available on-line. Just give the service the URL of your RIF-Core file or paste the content of your document in the text-area of the web page.

Moreover, the RIF-Core validator is provided as a REST service, allowing third-parties applications to consume it automatically. The documentation of the REST service is the following:

Example of an invocation to the REST web service:

http://idi.fundacionctic.org/rifle/resources/RIFLERest/validate/CORE?urlFile=http://www.w3.org/2005/rules/test/Builtins_String/Builtins_String-premise.rif

Result of the validation

The output of the RIF-Core validation service may be one of the following:

  1. The document is XML valid and well-formed. The document is syntactically conformant with the XML Schema.
  2. The document is not XML valid and well-formed according to the XML Schema. The document must be rejected.
  3. The document is RIF-Core admissible. An admissible RIF-Core document may have some syntactic warnings. See the list of warnings.
  4. The document is not RIF-Core admissible. A syntactic error in the document has been detected during the validation process. The document must be rejected. See the list of errors.

List of Warnings

Warning IDMessageDescription
RIF-WARNING-0No validator document has been configuratedImplementation details
RIF-WARNING-1Unknown datatype: {X}See section RIF Datatypes
RIF-WARNING-2Unknown built-in function or predicate: {X}See section RIF Built-ins
RIF-WARNING-3Resource {X} doesn't exist in the imported RDF graphsSee section Syntax of RIF-RDF/OWL
RIF-WARNING-4Wrong correspondence between RIF and RDF/OWL constantsSee section Syntax of RIF-RDF/OWL

List of Errors

Error IDMessageDescription
RIF-ERROR-0RIF Model Exception: {X}Implementation details
RIF-ERROR-1The service only accepts RIF documentsSee section How to use the Validator
RIF-ERROR-2First Visitor must be an instance of JAVA class: RDFImportsProfilesVisitorImplementation details
RIF-ERROR-100Built-in function or predicate {X} with unappropiate number of parametersSee section RIF Built-ins
RIF-ERROR-101Variable {X} not bound or equatedSee section Safeness Criteria
RIF-ERROR-102Variable {X} used but not declaredSee section Safeness Criteria
RIF-ERROR-103Variable {X} not safe. The document is not RIF-Core admissibleSee section Safeness Criteria
RIF-ERROR-104Import {X} with an unknown profileSee section Importing Profiles
RIF-ERROR-105A RIF document must have a single highest profileSee section Importing Profiles
RIF-ERROR-106Import {X} has rif:iri typed literalsSee section Syntax of RIF-RDF/OWL.
RIF-ERROR-107Import {X} has rdf:text typed literalsSee section Syntax of RIF-RDF/OWL.
RIF-ERROR-108Statement: "{X} rdf:type {Y}" is not present in the imported RDF graphSee section Simple Entailment and RDFS entailment
RIF-ERROR-109OWL annotation property {X} can not be used in RIF-OWL combinationsSee section RIF-OWL Combination
RIF-ERROR-110DL profile {X} and URI {Y} refers to an RDF graph that is not the RDF representation of an OWL DL ontologySee section RIF-OWL Combination
RIF-ERROR-111Non DL-Frame formula: variable {X} in the property positionSee section RIF-OWL Combination

Updated