## 5 Implementation and Evaluation Tests
### Flatting Module
\begin{table}
\begin{tabular}{p{142.3 pt} p{142.3 pt}} \hline \hline
**Element** & **Conversion** \\ \hline \multirow{4}{*}{ObjectComplementOf} & If the child element is a Class element then a new temporal class entity is introduced; if the child node is a property-based class definition (ObjectSomeValuesFrom, ObjectAllValuesFrom, ObjectHasValue, DataSomeValuesFrom, DataAllValuesFrom, DataHasValue) then a new value is introduced. In this case, the not p(a) is simplified to p(not a). Remark: all other kind of complex class expressions are converted into a temporal class before processing this element. \\ \hline ObjectOneOf & A new temporal class with unique name is assigned to this complex class expression; the individuals in the child list is assigned to this temporal class (ClassAssertion) \\ \hline ObjectSomeValuesFrom, ObjectAllValuesFrom, DataAllValuesFrom, DataHasValue & If the parent element is a class axiom, then it is preserved. Otherwise a new temporal class with unique name is assigned to this complex class expression and a corresponding EquivalentClasses axiom is constructed. \\ \hline ObjectMinCardinality, ObjectMaxCardinality, ObjectExactCardinality, DataMinCardinality, DataMaxCardinality & The axiom Cardinality (n, p, o) is converted into the following expression: ObjectSomeValuesFrom (p, o). \\ \hline DisjointClasses, DisjointUnion, SubObjectPropertyOf, EquivalentProperties, DisjointDateProperties, SubDataPropertyOf, EquivalentDateProperties, NegativeObjectPropertyAssertion, NegativeDataPropertyAssertion & As the closed world approach is used in the attribute oriented view, this axiom is ignored. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: _Cont._(: ObjectInverseOf :)  
for $c in $output_doc//ObjectInverseOf  let $p := $c/ObjectProperty/@IRI/string()  let $pu:= concat(''Inv_',$p)  return (  update replace $c with <ObjectProperty IRI=''{$pu}'' /> ,  if ( not ($output_doc//Declaration/ObjectProperty[@IR/string() = $pu ]))  then  update insert <Declaration> <ObjectProperty IRI=''{$pu}''/>  </Declaration> into $output_doc  else ()  )  
The conversion program builds a simplified ontology description containing no complex class expressions and no data type expressions. The program eliminates all irrelevant information items from the initial ontology description. An example (Section 5.1) demonstrates the flattening process on a simplified input ontology. The ontology fragment contains, among others, the important class constructor elements (ObjectIntersectionOf; ObjectAllValuesFrom; ObjectUnionOf; ObjectInverseOf; DataSomeValuesFrom). In this list, we omit the usual Declaration elements in order to keep the list short. The flattening module generates the input format for ontology metric evaluation. It can be considered as a preparation module that performs many transformation steps in order to provide efficient metric evaluation. The main benefits of the flattening process are as follows:  
* Eliminating of irrelevant ontology components;
* Direct supporting the proposed metrics;
* Explicit representation of derived concepts;
* Lower execution cost in metric calculations.