This document defines what it would take for the Rust bfo crate to be meaningfully conformant to the bundled BFO 2020 specification in BFO-2020-master/README.md, BFO-2020-master/21838-2/README.md, and the OWL / Common Logic artifacts under BFO-2020-master/21838-2.
“Completely conformant” needs to be split into three layers:
-
Vocabulary conformanceThe crate exposes the complete BFO 2020 class and relation inventory, with canonical IDs, labels, IRIs, hierarchy, inverses, and domain/range metadata. -
Artifact conformanceThe crate can reproduce or validate itself against the official BFO OWL core artifact and, optionally, the temporalized-relations profile. -
Axiom conformanceThe crate encodes enough formal semantics to check the domain/range, inverse, symmetry, transitivity, and profile rules that are provable from the official artifacts. Full CLIF theorem proving is out of scope for ordinary runtime Rust code, but the crate should still validate itself against the official CLIF/OWL sources in tests.
The current crate is only a partial vocabulary sketch. It is not yet conformant at any of the three layers.
The current lib.rs mixes:
- a small subset of genuine BFO terms
- several game-specific relations
- a hand-maintained relation schema tuned to Riggy
That is useful for the game, but it is not publishable as a general BFO crate.
The bundled bfo-core.ofn declares 36 classes. The current Rust crate models 18.
Currently present:
EntityContinuantIndependentContinuantMaterialEntityObjectImmaterialEntitySiteSpecificallyDependentContinuantRoleDispositionFunctionQualityGenericallyDependentContinuantInformationContentEntityOccurrentProcessHistoryTemporalRegion
Still missing from the BFO 2020 core hierarchy:
ObjectAggregateFiatObjectPartContinuantFiatBoundaryFiatPointFiatLineFiatSurfaceSpatialRegionZeroDimensionalSpatialRegionOneDimensionalSpatialRegionTwoDimensionalSpatialRegionThreeDimensionalSpatialRegionRelationalQualityRealizableEntityProcessBoundarySpatiotemporalRegionZeroDimensionalTemporalRegionOneDimensionalTemporalRegionTemporalInstantTemporalInterval
The current crate exposes 10 relations, but several of them are not BFO relations at all.
Current Rust relations that are genuinely BFO-aligned:
SpecificallyDependsOnInheresInHasParticipantOccursIn
Current Rust relations that are too coarse or renamed beyond spec:
OccupiesBFO distinguishesoccupies spatial region,occupies temporal region, andoccupies spatiotemporal region.ConnectedToNot a BFO core relation.
Current Rust relations that are Riggy-specific and must not live in the core bfo crate:
ContainsResidentOfIsAboutHasOutput
Notes:
is aboutis not a BFO core relation. It belongs in an extension layer, likely IAO-aligned, not inbfocore.containsandresident ofare game/domain ontology relations and should move back into Riggy or a separate extension crate.
The bundled relations table includes many relations that are not yet represented:
continuant part of/has continuant partproper continuant part of/has proper continuant partoccurrent part of/has occurrent partproper occurrent part of/has proper occurrent parttemporal part of/has temporal partproper temporal part of/has proper temporal partmember part of/has member partlocated in/has locationoccupies spatial regionoccupies temporal regionoccupies spatiotemporal regionbearer ofrealizes/has realizationhas material basis/material basis ofgenerically depends on/is carrier ofconcretizes/is concretized byparticipates inhas history/history offirst instant of/has first instantlast instant of/has last instantprecedes/preceded byenvironstemporally projects ontospatially projects ontospecifically depended on by
The Rust crate should stop being hand-authored term-by-term. The source of truth should be the bundled BFO artifacts:
- Core OWL: BFO-2020-master/21838-2/owl/bfo-core.ofn
- Core OWL RDF/XML: BFO-2020-master/21838-2/owl/bfo-core.owl
- Core Common Logic modules: BFO-2020-master/21838-2/common-logic
- Temporalized relations profile: BFO-2020-master/21838-2/owl/profiles/temporal extensions/temporalized relations
- Human-readable term inventories: bfo-2020-terms.csv and bfo-2020-relations-table.csv
The published bfo crate should contain only official BFO vocabulary and semantics.
Move out of bfo core:
ContainsResidentOfConnectedToIsAboutHasOutput
Replacement plan:
- keep
bfostrictly spec-derived - add a Riggy-side extension enum for game relations
- if needed later, add companion crates such as
iao,ro, orbfo-ext
The crate should define stable public Rust enums, but they should be generated from the official artifacts rather than manually curated.
Target shape:
pub enum BfoClass {
Entity,
Continuant,
Occurrent,
IndependentContinuant,
SpecificallyDependentContinuant,
GenericallyDependentContinuant,
MaterialEntity,
ImmaterialEntity,
Site,
SpatialRegion,
ContinuantFiatBoundary,
FiatPoint,
FiatLine,
FiatSurface,
Object,
ObjectAggregate,
FiatObjectPart,
Quality,
RelationalQuality,
RealizableEntity,
Role,
Disposition,
Function,
InformationContentEntity,
Process,
ProcessBoundary,
History,
SpatiotemporalRegion,
TemporalRegion,
ZeroDimensionalSpatialRegion,
OneDimensionalSpatialRegion,
TwoDimensionalSpatialRegion,
ThreeDimensionalSpatialRegion,
ZeroDimensionalTemporalRegion,
OneDimensionalTemporalRegion,
TemporalInstant,
TemporalInterval,
}And similarly for relations:
pub enum BfoRelation {
ContinuantPartOf,
HasContinuantPart,
ProperContinuantPartOf,
HasProperContinuantPart,
OccurrentPartOf,
HasOccurrentPart,
ProperOccurrentPartOf,
HasProperOccurrentPart,
TemporalPartOf,
HasTemporalPart,
ProperTemporalPartOf,
HasProperTemporalPart,
MemberPartOf,
HasMemberPart,
SpecificallyDependsOn,
SpecificallyDependedOnBy,
GenericallyDependsOn,
IsCarrierOf,
InheresIn,
BearerOf,
Realizes,
HasRealization,
HasMaterialBasis,
MaterialBasisOf,
Concretizes,
IsConcretizedBy,
LocatedIn,
HasLocation,
OccupiesSpatialRegion,
OccupiesTemporalRegion,
OccupiesSpatiotemporalRegion,
OccursIn,
Environs,
HasParticipant,
ParticipatesIn,
HasHistory,
HistoryOf,
FirstInstantOf,
HasFirstInstant,
LastInstantOf,
HasLastInstant,
Precedes,
PrecededBy,
TemporallyProjectsOnto,
SpatiallyProjectsOnto,
}Each term should carry:
- BFO ID, for example
BFO:0000001 - canonical IRI
- preferred label
- optional textual definition
- parent term
- inverse relation, if any
- domain and range restrictions
- source profile:
coreortemporalized_relations
Target API:
pub struct TermMeta {
pub id: &'static str,
pub iri: &'static str,
pub label: &'static str,
pub definition: Option<&'static str>,
}And:
pub struct RelationMeta {
pub id: &'static str,
pub iri: &'static str,
pub label: &'static str,
pub inverse: Option<BfoRelation>,
pub domain: &'static [BfoClass],
pub range: &'static [BfoClass],
pub profile: Profile,
}The bundled spec distinguishes the core OWL artifact from stronger temporalized-relations material. The Rust crate should expose that distinction directly.
pub enum Profile {
CoreOwl,
TemporalizedRelations,
CommonLogicReference,
}This matters because “complete conformance” is ambiguous unless the crate states which profile a term belongs to.
The current RelationSpec is too thin. For conformance, the crate needs to distinguish:
- inverse
- reverse
- temporalized variants
- profile membership
- whether a relation is transitive
- whether it is reflexive or irreflexive
- whether it is asymmetric or symmetric
Target:
pub struct RelationSemantics {
pub inverse: Option<BfoRelation>,
pub transitive: bool,
pub symmetric: bool,
pub asymmetric: bool,
pub reflexive_on: Option<&'static [BfoClass]>,
pub profile: Profile,
}Not every logical property can be reconstructed from OWL alone, so some of this metadata will need to be sourced from the Common Logic modules and maintained in generated data.
Deliverables:
- all BFO 2020 classes in Rust
- all core and temporalized relation names in Rust
- canonical IDs, labels, IRIs
- parent/child hierarchy
- inverse mappings
- profile tagging
Acceptance criteria:
- every class declared in
bfo-core.ofnexists in Rust - every object property declared in
bfo-core.ofnexists in Rust - every temporalized-relation term in the bundled documentation is either represented or explicitly marked unsupported
- zero Riggy-specific terms remain in the public core API
Deliverables:
- generated
TermMetaandRelationMeta - domain/range metadata
- definitions and labels imported from the spec artifacts or documentation CSVs
Acceptance criteria:
- tests compare all Rust term IDs/labels against the bundled CSV and OWL data
- tests verify inverse mappings and parent chains
Deliverables:
- a richer
RelationSemanticslayer - validated domain/range checks
- validation rules for inverse, partonomy, and temporal-region constraints where the artifacts support them
Acceptance criteria:
- relation-domain/range tests pass against the official inventory
- inverse pairs are complete and internally consistent
- profile-specific rules are enforced only in the profiles where they belong
Deliverables:
- test tooling that reads the bundled OWL functional syntax and checks Rust registry parity
- optional export of Rust registry back into OWL Functional Syntax or JSON
Acceptance criteria:
- a test can assert exact parity for declared classes and object properties
- a test can assert exact parity for labels and IDs
Deliverables:
- a curated set of test assertions derived from: common-logic and documentation/axiomatization-pds
- encoded invariants for relations such as temporal-part and participation constraints
Acceptance criteria:
- crate tests cover the major subtheories: material entity continuant mereology occurrent mereology specific dependence generic dependence participation temporal region spatiotemporal region history
This still will not turn Rust into a Common Logic theorem prover, but it will make the crate demonstrably traceable to the formal source artifacts.
Recommended target structure:
bfo/
src/
lib.rs
class.rs
relation.rs
profile.rs
metadata.rs
registry.rs
validate.rs
generated/
classes.rs
relations.rs
metadata.rs
tools/
extract_bfo_terms.rs
check_owl_parity.rs
BFO-2020-master/
CONFORMANCE_PLAN.md
Key rule:
generated/should be derived from the bundled official artifacts- handwritten code should only define API shape, validation logic, and generation tooling
These should not be part of the first conformance pass:
- implementing a full Common Logic reasoner in Rust
- merging BFO with IAO/RO/OBI in the same crate
- keeping Riggy-specific relation names in the core ontology crate
- treating the current game ontology as if it were identical to BFO
- Rename the current public relation enum to
BfoRelationand remove non-BFO relations from it. - Add the missing BFO class variants and explicit BFO IDs.
- Add a
Profileenum and mark which relations belong tocoreversustemporalized_relations. - Introduce generated metadata tables instead of handwritten labels.
- Add a parity test that counts and matches classes and object properties against
bfo-core.ofn. - Add a Riggy-side extension relation enum for
Contains,ResidentOf,IsAbout,HasOutput, and any future game-only relations.
This crate can be called “BFO 2020 conformant” when all of the following are true:
- it exposes the full BFO 2020 term inventory from the bundled artifacts
- it does not mix game/domain-specific relations into the core ontology vocabulary
- every public term has canonical ID, IRI, label, hierarchy, and inverse metadata where applicable
- tests prove parity against the bundled OWL core artifact
- tests cover a meaningful subset of the stronger CLIF axioms as executable conformance checks
Until then, the crate should be described as:
a BFO-inspired Rust ontology vocabulary, not a conformant BFO 2020 implementation