Scholarly basis for the translation algorithms
This tool does three distinct jobs, each grounded in established research. The references support the approaches taken; the code implements simplified variants where noted.
1. OWL/RDFS → UML mapping
OWL classes become UML classes, rdfs:subClassOf becomes
generalization, an owl:ObjectProperty with a class range
becomes an association, an owl:DatatypeProperty becomes an
attribute, and rdfs:label supplies readable names — the
correspondences formalized in the ontology-to-UML literature.
- OMG (2014). Ontology Definition Metamodel (ODM), Version 1.1. Object Management Group. — The canonical, standardized OWL/RDFS ↔ UML/MOF mapping; the primary reference for the parse rules.
- Brockmans, S., Volz, R., Eberhart, A., & Löffler, P. (2004). "Visual Modeling of OWL DL Ontologies Using UML." ISWC 2004, LNCS 3298, 198–213. Springer.
- Cranefield, S. (2001). "UML and the Semantic Web." Proc. Int'l Semantic Web Working Symposium (SWWS).
- Baclawski, K., Kokar, M. K., Kogut, P. A., et al. (2002). "Extending the Unified Modeling Language for ontology development." Software and Systems Modeling, 1(2), 142–156.
- Kogut, P., Cranefield, S., Hart, L., et al. (2002). "UML for ontology development." The Knowledge Engineering Review, 17(1), 61–64.
- Gašević, D., Djurić, D., & Devedžić, V. (2009). Model Driven Engineering and Ontology Development (2nd ed.). Springer.
Defined classes and restrictions
Much of what an OWL ontology says is carried by anonymous class
expressions, not by named superclasses. A defined class is
owl:equivalentClass to an intersection (necessary and
sufficient conditions); a restriction under
rdfs:subClassOf states a necessary condition. Reading only
named superclasses would leave defined classes with no edges at all. The
diagram therefore draws:
- each named member of a defining intersection as a dashed generalization (the class is defined as a kind of it), and marks the class «defined»;
- each
someValuesFrom,allValuesFrom, cardinality orhasValuerestriction with a named filler as a dashed association labelled with the property and quantifier (p some, p only, p min 1); unions in fillers, domains and ranges are expanded to their members, and datatype restrictions become attributes; owl:equivalentClassbetween two named classes as a dashed line marked ≡.
This follows the ODM mapping of OWL class expressions onto UML constraints, simplified to what a class diagram can show: unions and complements used as superclasses have no faithful single edge and are left out.
Groups, imported vocabulary, and parallel relations
Classes are grouped by OBO-style IRI prefix (BFO_,
ODP003_) or else by namespace, and each group gets a colour
and an entry in the key. A group none of whose classes lives under the
ontology's own namespace is treated as imported (for instance BFO), drawn
in grey, and pruned to what the ontology uses: its own classes, the
classes they reach through relations, and their ancestors. Relations
among imported classes alone are omitted. Several relations between the
same two classes are drawn as one line with stacked labels, and a
restriction makes the plain domain/range association it repeats
redundant. Above 40 classes, relation labels are placed after layout
(Graphviz xlabel) so they do not widen the drawing.
Reasoning: asserted and inferred
With run reasoner checked (CLI: --reason), the
ontology is classified and the result drawn on the same layout. A
subclass relation the reasoner finds, and that the asserted subclass and
definition edges do not already imply, is drawn as an
orange arrow, and the class it moved is outlined in
orange; Show/Hide inferred (or the i key, also in
downloaded SVGs) switches between the asserted and the classified view.
Only direct inferred superclasses are drawn (a transitive
reduction), so classification adds as few lines as possible.
Unsatisfiable classes are drawn in red; an inconsistent ontology is
reported and not classified.
- HermiT (via owlready2) performs full OWL 2 DL classification, including placing one defined class under another. It needs a Java runtime and is used when one is available.
- owlrl computes the OWL 2 RL closure in pure Python. It finds subsumptions that follow by rule (named equivalences, intersections, property hierarchies) but not those that need DL reasoning, and does not detect unsatisfiable classes.
- Glimm, B., Horrocks, I., Motik, B., Stoilos, G., & Wang, Z. (2014). HermiT: An OWL 2 reasoner. Journal of Automated Reasoning, 53(3), 245–269.
- W3C (2012). OWL 2 Web Ontology Language Profiles (Second Edition), section 4: OWL 2 RL.
Source: from the picture back to the axioms
A diagram summarises; the source panel shows what it
summarises. Click a class to see its IRI (linked, so a BFO term opens its
published page), its definition and other annotations, and its logical
axioms in three views: a Summary, Manchester syntax
(the readable OWL notation used by Protégé), and the
Turtle triples as they stand in the file. Click a line to see
the axiom that produced it: the SubClassOf or
EquivalentTo axiom behind a subclass, definition or
restriction line, or the property's domain and range behind a relation
line. Names in an axiom are links to their own entries; s
shows or hides the panel, and Copy copies the current view.
An inferred line has no axiom of its own. Its panel lists the axioms such an inference usually rests on: the subclass's own axioms, the superclass's definition, and the property hierarchy (sub-properties, chains) connecting the properties the two mention. This is a heuristic, not a justification in the technical sense: the minimal set of axioms that entails a conclusion is found by a reasoner's explanation service, which is planned as a later addition.
The source travels with the diagram as a JSON block inside the SVG
(<script type="application/json" id="o2u-source">), so
a downloaded diagram shows it offline, and the CLI's
--interactive option writes such a file directly.
--no-source leaves it out. Each class's Turtle is its
concise bounded description: its own triples, following blank nodes, plus
annotated axioms and disjointness axioms that name it.
- Horridge, M., Drummond, N., Goodwin, J., Rector, A., Stevens, R., & Wang, H. (2006). The Manchester OWL Syntax. OWL: Experiences and Directions (OWLED 2006).
- Kalyanpur, A., Parsia, B., Horridge, M., & Sirin, E. (2007). Finding all justifications of OWL DL entailments. The Semantic Web: ISWC 2007, LNCS 4825, 267–280.
- Stickler, P. (2005). CBD: Concise Bounded Description. W3C Member Submission.
Flow view: processes as processes
The class view shows what kind of thing each class is. For an ontology of
processes, the Flow view (CLI: --flow) reads
the same axioms as a process: a restriction on a sequence
relation ('issue PO' SubClassOf 'immediately preceded by' some
'manager approval') becomes an arrow; on a non-immediate one
(preceded by) a dashed blue rule that something must come
first; a restriction on realizes or has participant puts
the step in that role's swimlane; and a defined subclass of a step that
adds a condition and its own sequence restriction becomes a conditional
rule, labelled with the condition (if for amount > 10,000).
Which relations count is configurable (--flow-map, a small
JSON file); the defaults are BFO 2020's precedes and
preceded by and the Relation Ontology's immediate forms, and
sub-properties of a mapped relation count too.
With an event log (--events: instances of the
steps, linked by the immediate sequence relations) the view shows the flow
as practiced: line width is the number of cases that took a path,
and paths no axiom allows are drawn in orange. Cases are the connected
chains of events, named by a value all their events share. Choose a case
to trace its path; p switches to the design alone. With
rules (--shapes, SHACL), each violation is
pinned to the step its focus node instantiates. The axioms are read
open-world (a missing predecessor is assumed to exist somewhere); the shapes
check the log closed-world, which is what an audit needs.
Layout: Graphviz dot orders the steps left to right along the
designed sequence; each lane is a horizontal band, steps of one lane that
would overlap take sub-rows, and neato routes the lines on
those fixed positions.
- Arp, R., Smith, B., & Spear, A. D. (2015). Building Ontologies with Basic Formal Ontology. MIT Press.
- Knublauch, H., & Kontokostas, D. (2017). Shapes Constraint Language (SHACL). W3C Recommendation.
- van der Aalst, W. M. P. (2016). Process Mining: Data Science in Action (2nd ed.). Springer.
2. Layered layout (layer assignment & Graphviz dot)
Each class's rank is computed as 1 + max(parent depths) over
generalization edges — textbook longest-path layering within the Sugiyama
layered-drawing framework, which Graphviz dot also implements.
- Sugiyama, K., Tagawa, S., & Toda, M. (1981). "Methods for visual understanding of hierarchical system structures." IEEE Trans. Systems, Man, and Cybernetics, 11(2), 109–125. — Origin of hierarchical/layered layout.
- Gansner, E. R., Koutsofios, E., North, S. C., & Vo, K.-P.
(1993). "A technique for drawing directed graphs." IEEE
Trans. Software Engineering, 19(3), 214–230.
— The algorithm behind
dot. - Di Battista, G., Eades, P., Tamassia, R., & Tollis, I. G. (1999). Graph Drawing: Algorithms for the Visualization of Graphs. Prentice Hall.
3. Scalable force-directed fallback (sfdp)
Above ~500 classes the renderer switches from dot to
sfdp, a multilevel force-directed engine.
- Hu, Y. (2005). "Efficient, high-quality
force-directed graph drawing." The Mathematica Journal, 10(1),
37–71. — The multilevel algorithm
sfdpis based on. - Fruchterman, T. M. J., & Reingold, E. M. (1991). "Graph drawing by force-directed placement." Software: Practice and Experience, 21(11), 1129–1164.
- Ellson, J., Gansner, E., Koutsofios, L., North, S. C., & Woodhull, G. (2002). "Graphviz — Open Source Graph Drawing Tools." Graph Drawing (GD 2001), LNCS 2265, 483–484. Springer.
The code implements simplified versions of these methods (e.g.
longest-path layering rather than dot's full network-simplex
ranking in the built-in layout pass). The ODM and
Brockmans et al. are the primary references for the core
OWL→UML mapping.