# Graphol: A Graphical Language for Ontology Modeling Equivalent to OWL 2
## 4 The Graphol Language
### Graphol Syntax  
The basic principle that guides Graphol in representing ontologies is that a Graphol ontology is a graph whose nodes and edges assume the forms described in Figure 2.  
Nodes can be of two kinds: _predicate nodes_ and _operator nodes_. Predicate nodes model the terms in the ontology alphabet, i.e., atomic concepts, rendered as rectangles, atomic roles, which are depicted as diamonds, atomic attributes, drawn as circles, atomic value-domains, represented as rounded rectangles, and constants (i.e., individuals and values), denoted through octagons. Each predicate node is associated to a label, which is a name from the ontology alphabet (to distinguish between individual nodes and value nodes, the labels of value nodes are in inverted commas). We note that the shapes used to depict concepts, roles, and attributes are the same as those used in ER diagrams. This choice was made to take advantage of the familiarity that many of the potential users of Graphol may have with this well-known language for conceptual modeling. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Construct** & **Syntax** & **Semantics** \\ \hline Concept negation & \(\
eg C\) & \(\Delta_{O}^{l}\setminus C^{l}\) \\ \hline Role negation & \(\
eg R\) & \((\Delta_{O}^{l}\times\Delta_{O}^{l})\setminus R^{l}\) \\ \hline Attribute negation & \(\
eg V\) & \((\Delta_{O}^{l}\times\Gamma_{V})\setminus V^{l}\) \\ \hline Value-domain negation & \(\
eg F\) & \((\Gamma_{V})\setminus F^{l}\) \\ \hline Concept conjunction & \(C_{1}\sqcap\cdots\sqcap C_{n}\) & \(C_{1}^{l}\cap\cdots\sqcap C_{n}^{l}\) \\ \hline Concept disjunction & \(C_{1}\sqcup\cdots\sqcup C_{n}\) & \(C_{1}^{l}\cup\cdots\sqcap C_{n}^{l}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._The special labels, \"Top\" and \"Bottom\", are reserved for representing universal and empty predicates (i.e, concept, role, attribute, or value-domain), respectively. For example, a diamond with label \"Top\" represents the universal role (\(\top_{R}\)), while a diamond with label \"Bottom\" represents the empty role (\(\bot_{R}\)), analogously for concepts, attributes, and value-domains. Operator nodes are instead used to graphically construct complex expressions. Two shapes for operators are adopted, i.e., the box (which can be either blank or solid), and the hexagon. A blank (resp. solid) box, called _domain (resp. range) restriction node_, is used to represent restrictions on roles or attributes (resp. their inverses). A box is labeled with one of the following keywords: \"exists\", for existential restriction, \"forall\", for universal restriction, \"self\", for self-restriction, and \"\((x,-)\)\" or \"\((-,y)\)\", with \(x\) and \(y\) positive integers, for min and max cardinality restrictions, respectively. When the label is omitted we intend \"exists\". The other operator nodes are denoted by a hexagon and can assume one of the following labels: \"or\" (_union node_), \"and\" (_intersection node_), \"not\" (_complement node_), \"inv\" (_inverse node_), \"oneOf\" (_one-of node_), and \"chain\" (_chain node_). We observe that Graphol uses three visual variables [68] to encode the predicate and constructor nodes. These are (i) the _shape_ of the nodes, which is used to distinguish between predicate nodes, restriction nodes, and operator nodes, and among the different kinds of predicate nodes; (ii) the _size_ of the nodes, which allows to clearly discriminate between the quadrilaterals used for concept nodes, value-domain nodes, and restriction nodes; and (iii) _brightness_, which is used to distinguish the domain restriction node from the range restriction node. To avoid encumbering the user in learning the Graphol syntax, we have chosen to limit the number of different graphical symbols used to depict Graphol nodes, and to maintain it to around seven, which is the commonly recognized ideal upper bound for software engineering graphical languages [69].