What is this?

Cowl is a lightweight C/C++ API for working with OWL 2 ontologies, developed by SisInf Lab at the Polytechnic University of Bari.


Access to OWL 2 ontologies is currently limited to platforms supporting Java (via the OWL API) or Python (through OWLReady). owl-cpp also exists for other platforms, though it deserializes ontologies into RDF triples rather than OWL axioms and constructs.

Cowl aims to bring OWL support to most remaining platforms. In fact, it abides to some key principles which make it very portable:

  • It is written in standard C11 with no compiler-specific extensions and no platform-specific API calls.

  • It is completely self-contained, with no external dependencies other than uLib (which is also self-contained).

  • It goes to great lengths to have a tiny memory footprint while being very fast, meaning it can run even on the most resource-constrained devices.


Cowl is a complete implementation of the OWL 2 specification. Currently supported features:

  • Deserialization of ontologies into an optimized in-memory store.

  • Programmatic ontology queries.

  • Ontology editing (addition and removal of axioms, annotations, imports, etc.).

  • Ontology serialization to files, memory buffers or custom streams.


While Cowl’s architecture allows for multiple readers and writers, the library currently only supports reading and writing OWL ontologies in functional syntax.


Additional context about Cowl is provided in the following academic publications:


Cowl is distributed under the Eclipse Public License, Version 2.0.