Skip to content

Ontology + reasoning layer — reuse rights and a parallel-pipeline design (BFO ‖ UFO)

Follow-up to research 0001, which concluded: don't adopt Trinity as a core engine; the real prize is an ontology + reasoning layer, pursued behind the UDA and decoupled from the dormant engine. This note answers two questions:

  1. Can we take parts of Tavi Truman / InKnowWorks' repos? (licensing + practical reuse)
  2. Should the reasoning layer run a foundational ontology as a pluggable choice — BFO and UFO as parallel pipelines?

1. What we can reuse, and how

Licensing — all permissive

Artifact License Obligation if reused
microsoft/GraphEngine (Trinity) MIT Preserve Microsoft copyright + license notice
InKnowWorks/IKW-GraphEngine (fork) MIT Preserve Microsoft + InKnowWorks notices
InKnowWorks/RDF-Graph-and-Hypergraph (BFO work) MIT Preserve InKnowWorks notice
BFO 2020 ontology (canonical) CC BY 4.0 (public-domain resource; ISO 21838-2:2020) Attribution
gUFO (lightweight UFO, OWL) CC BY 4.0 (UFO → ISO/IEC CD 21838-5) Attribution
Z3 (axiom verification) MIT (PyPI z3-solver) Preserve notice

No copyleft anywhere; commercial use is fine. The legal right to copy is not the constraint.

Practical reuse — take the ideas + the ontologies, not the C#/Trinity code

The InKnowWorks BFO repo is 100% C# and tightly coupled to the Trinity runtime (TSL compiler, LIKQ, Graph Engine cell store). Lifting that code imports the engine we declined in 0001 — taking Trinity by the back door. Our runtime is Python-core + Rust-serving; the only place C# legitimately lives in the fleet is middle-core (the MCR-F4 producer).

So the reusable, decoupled pieces are:

  • The ontology files themselves, pulled from canonical upstreams (clean provenance): BFO-ontology/BFO-2020 and nemo-ufes/gufo — both CC BY 4.0, both available as OWL.
  • The patterns (not copyrightable, free regardless): ontology-driven schema, the continuant/occurrent (BFO) and endurant/perdurant + relator (UFO) typing disciplines, colored hypergraph modeling, and the traversal ≠ inference rule.
  • The verification approach (BFO CLIF + Z3): re-implement natively with z3-solver for the axioms that exceed OWL DL, rather than copying the C#.

Do not import the C#/Trinity-bound code into backend-core. If the actual code path is ever wanted, scope it as a separate middle-core evaluation.

2. BFO and UFO as parallel pipelines

The two leading foundational (upper) ontologies make different bets. We don't have to pick one globally — we can make the foundational ontology a pluggable profile and run both.

BFO (Basic Formal Ontology) UFO (Unified Foundational Ontology)
Standard ISO 21838-2:2020 ISO/IEC CD 21838-5 (in progress)
Spine Continuant vs Occurrent; 36 classes; realist, minimalist UFO-A (endurants) · UFO-B (events) · UFO-C (social/intentional)
Sweet spot Scientific / biomedical / regulatory data integration (350+ projects) Conceptual & enterprise modeling, software/services, interoperability
Modeling language (none native) OntoUML (stereotypes «kind»/«role»/«relator»), tooling, model→OWL export
Stack fit OWL + CLIF (needs Z3 for the Common-Logic part) gUFO: native OWL 2 DL Turtle file, reuse by specialize/instantiate
Worked precedent for us Tavi Truman's BFO-on-Trinity (manufacturing genealogy / compliance) OntoUML model-driven conceptual modeling

Why this is genuinely worth doing (not just "maybe")

  • UFO/OntoUML is the closest match to the Labs vision. "Model-Driven Platform", "One Model, Many Projections", and the knowledge-graph-snapshot business object are exactly what OntoUML/UFO is for — ontology-driven conceptual models that project into artifacts. A UFO pipeline lines up with our north star better than BFO does.
  • gUFO drops into our stack with no friction. It's a single OWL/Turtle file under CC BY 4.0 — load it into an RDF/OWL store and a standard reasoner. No C#, no Trinity. This makes the UFO pipeline the cheapest one to prove first.
  • BFO earns its parallel track on rigor. ISO-standardized, realist, and the natural choice when we touch scientific/regulatory domains — and we already have a worked reference (Tavi's BFO + Z3 verification) to borrow ideas from.
  • Parallel ≠ double work. Both are foundational ontologies expressible in OWL; the reasoning machinery (store + reasoner + mapping to our knowledge graph) is shared. Only the loaded profile and a thin set of mapping rules differ.

3. Architecture sketch (decoupled, behind the UDA)

Consistent with ADR 0001 (capability mixins) — a reasoning capability, not a core swap:

knowledge-graph-snapshot (ArcadeDB property graph: entities + edges)
        │  export subgraph as RDF
        ▼
[ Reasoner capability ]  ── pluggable foundational profile ──┐
  • RDF/OWL store      profile = gUFO (OWL)   ‖   profile = BFO 2020 (OWL + CLIF/Z3)
  • OWL DL reasoner
  • axiom checks (Z3 for the Common-Logic axioms BFO needs beyond OWL DL)
        │  materialize inferred types/edges
        ▼
back into ArcadeDB as derived edges  →  served via API (consistency, classification, new relations)

Notes: - ArcadeDB is a property-graph/vector store, not a triplestore/OWL reasoner. The reasoning pipeline is a separate component that reads a subgraph as RDF, reasons, and writes inferred facts back as derived edges/types on the snapshot. Clean UDA boundary. - Runtime homes to evaluate (keep it pluggable): Python owlready2 (+ HermiT/Pellet) for OWL DL in our connector core; Oxigraph (Rust SPARQL/RDF) aligns with rust-api-v2 for the store/query side; z3-solver for BFO's beyond-DL axioms. RDFox / GraphDB / Jena Fuseki are heavier external options if scale demands. - Profile = a config + a mapping rule-set, so adding UFO or BFO is additive — same shape as adding a UDA connector.

Recommendation

  1. Build the reasoning layer foundational-ontology-agnostic — a pluggable "profile" (BFO ‖ UFO), behind a UDA ReasonerCapable/OntologyCapable capability. Yes to parallel pipelines; the shared machinery makes it cheap.
  2. Prove it first with gUFO — OWL-native, CC BY 4.0, and the best fit to the model-driven Labs vision. Lowest-friction way to get real inference into the stack.
  3. Keep BFO 2020 as the parallel profile for scientific/regulatory work; borrow Tavi Truman's BFO + Z3 verification ideas, re-implemented natively (no C#/Trinity import).
  4. Source ontologies from canonical upstreams (nemo-ufes/gufo, BFO-ontology/BFO-2020), carry CC BY attribution; if any MIT code is ever lifted, keep its notices.
  5. Next step — a time-boxed spike (spike-researcher): export a knowledge-graph-snapshot subgraph to RDF, load gUFO, run an OWL DL reasoner, and materialize a few inferred classifications back into ArcadeDB. Deliver a runnable PoC + build-vs-buy note on the store/reasoner choice (owlready2 vs Oxigraph vs external triplestore). Add a BFO profile as the second pipeline only after the gUFO one proves the boundary.

Sources

  • BFO 2020 (canonical, CC BY 4.0, ISO 21838-2:2020): https://github.com/BFO-ontology/BFO-2020 · https://basic-formal-ontology.org/
  • gUFO — lightweight UFO in OWL (CC BY 4.0): https://nemo-ufes.github.io/gufo/ · repo: https://github.com/nemo-ufes/gufo · paper: https://arxiv.org/abs/2603.20948
  • UFO / OntoUML: https://en.wikipedia.org/wiki/Unified_Foundational_Ontology · https://ontouml.readthedocs.io/en/latest/intro/ufo.html · UFO journal article: https://journals.sagepub.com/doi/abs/10.3233/AO-210256
  • Tavi Truman / InKnowWorks (BFO + Trinity precedent, MIT): https://github.com/InKnowWorks/RDF-Graph-and-Hypergraph · https://github.com/InKnowWorks/IKW-GraphEngine
  • Reasoner/store candidates: owlready2 (https://owlready2.readthedocs.io/), Oxigraph (https://github.com/oxigraph/oxigraph), Z3 (z3-solver, https://github.com/Z3Prover/z3)
  • Internal: docs/research/0001-trinity-graph-engine.md, docs/adr/0001-universal-data-adapter.md, Labs (Model-Driven Platform, knowledge-graph-snapshot).