Skip to content

Profile Detection

Detect which OWL 2 profile best fits an ontology using ontologos-profile.

CLI

./benchmarks/scripts/download.sh
cargo build -p ontologos-cli --release

# Text output
./target/release/ontologos profile benchmarks/data/pizza.owl

# JSON output
./target/release/ontologos --format json profile benchmarks/data/family.owl

Library

use ontologos_parser::load_ontology;
use ontologos_profile::{detect_profile, OwlProfile};

let ontology = load_ontology(path)?;
let report = detect_profile(&ontology)?;

if let Some(OwlProfile::El) = report.detected {
    println!("EL ontology");
}

for diag in &report.diagnostics {
    println!("{}: {}", diag.construct, diag.message);
}

Hybrid contract

Profile detection uses two construct sets from ParseMeta:

Set Source Used for
profile_constructs Successfully mapped TBox axioms Detected profile (EL / RL / QL / DL)
constructs Full parse scan Diagnostics for source-only constructs

Example — Pizza ontology:

  • Detected: Dl (mapped axioms mix EL and RL shapes — e.g. existentials plus inverse/functional properties)
  • Diagnostics: list mapped constructs that rule out EL and/or RL, plus any source-only constructs not stored in core

Classification reflects what the reasoner can use from the core model; diagnostics explain profile boundaries.

Profiles

Profile Meaning
El OWL 2 EL — in-house completion classification (ontologos-el)
Rl OWL 2 RL — rule-based materialization via reasonable
Ql OWL 2 QL — detection only (no QL reasoning engine; use ELK or another QL reasoner)
Dl Outside EL/RL/QL — detection only (full DL reasoning is v2.0)

QL and DL: detection only

OntoLogos can detect QL and DL profiles but does not run a QL or DL reasoner today.

Action QL detected DL detected
CLI classify --profile auto Error — no auto route Error — use explicit el, rl, or rdfs if applicable
CLI classify --profile el May error if mapped axioms are not EL May classify mapped EL subset or error on forbidden constructs
Python profile="auto" Same as CLI Same as CLI
Recommended fallback Use Protégé + HermiT/Konclude for DL; explicit --profile rl or rdfs for rule-based materialization on RL-shaped subsets

See Reasonable adapter limits and Comparison.

JSON output shape

ontologos --format json profile file.owl emits:

{
  "detected": "DL",
  "diagnostics": [
    {
      "construct": "InverseObjectProperties",
      "message": "construct is outside OWL 2 EL (mapped axiom rules out OWL 2 EL)"
    },
    {
      "construct": "SubClassOfExistential",
      "message": "construct is outside OWL 2 RL (mapped axiom rules out OWL 2 RL)"
    }
  ]
}

detected uses uppercase serde names (EL, RL, QL, DL). Text CLI output uses El, Rl, etc.

Benchmark corpora

Corpus Expected profile Notes
Pizza Dl Mapped inverse/functional axioms; DL constructs in source
Family Rl RL property axioms mapped; some source-only diagnostics possible

Corpus files: run ./benchmarks/scripts/download.sh. Expected counts are mapper output, not Protégé logical axiom totals.

Next steps