Inference rules for OWL-P in N3Logic

—This paper presents OWL-P that is a lightweight formalism of OWL2. Before proposing our solution we have analyzed the OWL fragment that is actually used on the Web. OWL-P supports easy inferences by omitting complex language constructs. Moreover, we present inference rules for the proposal. Our formalization is based on Notation 3 Logic, which extended RDF by logical symbols and created the Semantic Web logic for deductive RDF graph stores. We also tested experimentally our OWL-P how it deals with real data for reasoning.


I. INTRODUCTION
R ESOURCE Description Framework (RDF) is a general method for conceptual description or modeling of information that is implemented in web resources.RDF Schema (RDFS) extends RDF to classes providing basic elements for the description of vocabularies.OWL adds more vocabulary for describing properties and classes i.e. relations between classes, cardinality, and richer typing of properties.Unfortunately, OWL has high worst-case complexity results for key inference problems.The complexity of a fully compliant implementation is considered high [2].The largest part of this are blank nodes and lists.To overcome this problem we propose a lightweight OWL 2.0 profile called OWL-P.
A rule is perhaps one of the most understandable notions in computer science.It consists of a condition and a conclusion.If a condition that is checkable in some dataset holds, then the conclusion is processed.RDF(S) and OWL entailments can work in the same way.
The paper is constructed according to sections.In Section II we present RDF and Notation 3 Logic concepts.Section III is devoted to related work.In Section IV we present empirical study about OWL elements, OWL-P in the context of OWL2 profile, and comparison to other profiles.In this Section we discuss support of our proposal in existing RDF graph stores.Section V presents reasoning experiments of our OWL profiles.The paper ends with conclusions.

II. RDF AND NOTATION3
The RDF data model rests on the concept of creating webresource statements in the form of subject-predicate-object expressions, which in the RDF terminology, are referred to as triples (or statements).
An RDF triple comprises a subject, a predicate, and an object.In [3], the meaning of subject, predicate and object is explained.The subject denotes a resource, the object fills the value of the relation, the predicate refers to the resource's This paper is an extended version of a paper published in [1].characteristics or aspects and expresses a subject -object relationship.The predicate denotes a binary relation, also known as a property.More details are presented in [4].
On the other hand, in the Semantic Web environment there is a Notation3 format, which offers a human-readable serialization of RDF model and it also extended RDF by logical symbols and created a new Semantic Web logic called Notation3 Logic (N3Logic).Following [5], we provide definitions of N3Logic below.
Definition 1 (N3Logic alphabet): A N3Logic alphabet A N 3 consists of the following disjoint classes of symbols: 1) a set I of Internationalized Resource Identifier (IRI) symbols beginning with < and ending with >, 2) a set L of literals beginning and ending with ", 3) a set V of variables, V = B ∪ V U , where B is a set of existential variables (blank nodes in RDF-sense) start with _: and V U is a set of universal variables start with ?, 4) brackets {, }, 5) a logical implication =>, 6) a period ., 7) a keyword @false.Remark 1: Notation3 allows to abbreviate IRIs by using prefixes.Instead of writing <http://example.com>,we can write ex:.Definition 2 (Expression): Each IRI, variable and literal is an expression.
Definition 4 (Implication): In Notation3 all expressions can be in all positions of atomic formulas i.e.IRIs, literals, and variables can be subjects, objects or predicates.
Definition 5 (Interpretation): Let V be the vocabulary.An Interpretation V is I = R I , E I , I I , where: 1) R I is a (nonempty) set of resources (the universe of I), 2) E I is a predicate function, E I : R I → 2 R I ×R I , 3) I I is a interpretation function, We define a simple Notation3 semantics bellow, which is simplified definition of Notation3 semantics [5] that do not support quantification.
Definition 6 (Simple Notation3 semantics): Let I be an interpretation of A N 3 and f be a formula.Then it satisfies the following conditions: the definition respects the atomic formulas, which are triples consisting of subject, predicate and object.They can be intuitively seen as first order formulas like predicate(subject, object).Number 2 of the definition respects the implications.
FOL-RuleML (First-order Logic Rule Markup Language) [6] is a rule language for expressing first-order logic for the web.It is a sublanguage of RuleML [13].In FOL-RuleML each of the rules consists of a set of statements called an atom.The atom is a form that consists of objects, which are individuals or variables, and the relation between them.
SWRL (Semantic Web Rule Language) [7] is based on OWL [14] and Datalog RuleML, which is a sublanguage of the RuleML.Moreover, RuleML contents can be parts of SWRL content.Both in RuleML and SWRL logical operators and quantifications are supported.SWRL extends the set of OWL axioms to include Horn-like rules.SWRL axioms consist of OWL, RDF or rules.A relation can be an IRI, a data range, an OWL property or a built-in relation.An object can be a variable, an individual, a literal value or a blank node.
RIF (Rule Interchange Format) [8], [9] is a standard for exchanging rules among disparate systems.It focuses on exchange rather than developing a single one-fits-all rule language.It can be separated into a number of parts, RIFcore [15] which is the common core of all RIF dialects, RIF-BLD (Basic Logic Dialect) [16] comprising basic dialects (i.e.Horn rules) for writing rules, RIF-PRD [17] (Production Rule Dialect) for representing production rules and RIF-DTB (Datatypes and Built-in Functions) [18] comprising a set of datatypes and built-in functions.R-DEVICE [10] is a deductive rule language for reasoning about RDF data.In R-DEVICE RDF predicates are accomplished as slots with multiple values and resources are represented as the values of RDT types.It supports a second-order syntax, where variables can range over classes and properties.It uses a RuleML-like syntax.
TRIPLE [11] is an RDF rule (query, inference, and transformation) language, with a layered and modular nature.It is based on Horn Logic [19] and F-Logic [20].Rules in TRIPLE are used for transient querying and cannot be used for defining and maintaining views.
SPIN (SPARQL Inferencing Notation) [12] is a constraint and SPARQL-based rule language for RDF.It can link class with queries to capture constraints and rules which describe the behavior of those classes.SPIN is also a method to represent queries as templates.It can represent SPARQL statement as RDF triples.That proposal allows to declare new SPARQL functions.
Jena rule is a rule format used only by inference engine in the Jena framework [21].It uses an RDF-like syntax.It uses triple statements.It is similar to Notation3 Logic but in Jena rule a name of the rule can be defined in a rule.There are not any formula notations.Moreover, built-in functions can be written in function terms.More details are presented in [22].
On the other hand, there are several OWL profiles: RDFS++ [23], L2 [24], RDF 3.0/OWLPrime [25], OWLSIF/pD* [26], OWL LD [27] and OWL-RL [28].RDFS++ and L2 support basic terms.The first one is devoted to AllegroGraph2 and the second is thought to have the greatest possible support.More advanced are RDF 3.0/OWLPrime and OWLSIF/pD*, which are implemented in Oracle database 3 .The most advanced OWL profiles are OWL LD that focuses on Linked Data and OWL-RL that is an official standard.

IV. OWL-P
In this section, we present an empirical study of OWL profiles, OWL-P description, comparison to other profiles and support of our proposal in existing RDF graph stores.Before specifying what elements should be supported by OWL-P we analyzed data snapshot 2015 and identified the presence of OWL vocabulary terms.

A. Empirical study about OWL terms
In this Subsection, we analyze representative datasets from the RDF world.
Table I shows which OWL vocabulary terms are used the most frequently.It is not surprising that the most frequently used are RDF(S) terms.The most popular feature of OWL is owl:sameAs.It is worth noting that the least used terms are properties , which were introduced in OWL2.

B. OWL2 Profile
In this Subsection we describe our OWL2 profile.Here we discuss which terms of OWL2 should be supported by OWL-P.
To decide which elements of the OWL vocabulary should be supported by OWL-P, we took into account the results in Table  I.Moreover, we considered a time complexity for detecting a required rule application.Because of the complexity we limit elements of body, n ≤ 3 and we limit elements of head, m ≤ 4. Therefore OWL-P drops support for restriction and cardinality classes, class relationships and list-based axioms.
The most important impact on complexity belongs to blank nodes (mainly present in the list-based axioms).Inferencing with blank nodes often requires an isomorphism check, for which in general, no polynomial algorithms are known in the context of RDF [31].OWL-P like OWL-RL do not support cardinality restrictions.Restriction classes terms (i.e.owl:allValuesFrom, owl:someValuesFrom) are too complicated (m > 4).Disjunction, keys and property chains terms are unsupported because they are not blank node free and they use lists.
We propose inference rules for OWL-P in N3Logic, because it is a minimal extension to the RDF data model and it can be used for logic and data.Following [32], we define a rule definition bellow.
Definition 7 (Rule): A body of N3Logic rule and a head of N3Logic rule are written in form of formula (Definition 3).Between the body and the head is the implication (Definition 4).
We assume that RDF and RDF Schema are the subsets of OWL-P so we support this terms in OWL-P.Properties such owl:inverseOf, owl:sameAs and owl:differentFrom are widely used so we deside to add them to OWL-P.For similar reasons, we support OWL1 property characteristics, such as functional, inverse functional, symmetric, and transitive.Supporting terms that describe the (in)equivalence between classes and properties do not cost much (see rules: cax-eqc1, cax-dw, cax-eqc2, scm-eqc1, scm-eqc2, scm-eqp1, scm-eqp2, and prp-pdw).
Fig. 1 present inference rules for properties and Fig. 2 present inference rules for classes.In [1], RDF(S) rules that complement OWL-P rules are presented.A syntactic correctness of rules are tested in reasoning engines such as FuXi7 and cwm 8 .

C. OWL-P and different approaches
In this Subsection we compare our proposal to other languages based on OWL.
In Table II we analyze existing proposals for different OWL2 profiles.OWL-P is simpler than OWL-RL and OWL LD.Our OWL2 profile drops support for restriction and cardinality classes, class relationships, list-based axioms and some of property characteristics.OWL-P supports more terms than RDFS++ and L2.
The inference rules that we present in this Section are the basis of the deductive RDF graph stores.We gathered the datasets from the Web in two ways: 1) crawled data, 2) ontologies: a) ChEBI [33], b) Gene Ontology [34], c) MeSH Ontology [35].
The first dataset was generated in LDSpider [30].The dataset mainly concerns FOAF information because we used FOAF URIs in the seed file.The second group of datasets are ontologies and vocabularies [33], [34], [35].ChEBI [33] is dictionary of molecular entities focused on chemical compounds.Gene Ontology [34] is controlled vocabulary describe gene and protein roles in cells that is accumulating and changing.MeSH Ontology [35] is a comprehensive controlled vocabulary for the purpose of indexing journal articles and books in the life sciences.

VI. CONCLUSIONS AND FUTURE WORK
This paper defines how knowledge and logic might be handled on the Semantic Web environment.We present an OWL-P that is a lightweight profile of OWL2.We propose inference rules for our approach.All rules are tested in reasoning engines.This paper provides a specification of OWL-P which can be more simply and efficiently implemented.Our formalization is based on Notation 3 Logic, which extended Future work will focus on preparing OWL-P rules expressed in popular inference rule syntaxes, such as RuleML, and RIF.Moreover, we would like to examine the relationship between our solution and SPIN, the language that allows to create constraints on Semantic Web models.Another challenge is to check all the possible sources of inconsistency in an ontology.

TABLE I VOCABULARY
TERMS USED IN LOD SNAPSHOT 2015 Definition 8 (Deductive RDF graph store): A deductive RDF graph store is an entity which store RDF triples and can generate new ones under certain conditions through deduction or inference.A deductive RDF graph store can answer queries about the combined given and inferred triples.In TableIIIwe present OWL-P support in deductive RDF graph stores.Most OWL-P terms are supported in presented RDF graph stores.The owl:propertyDisjointWith has the worst support.Oracle 12c, Pellet and Stardog fully support OWL-P.Not all Jena reasoners support OWL-P.