FLOW ALGEBRA
TITLE: Relationship Versioning Ontology
DOMAIN: AI Semantic Library Relationships / Relationship Ontologies
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/ai-semantic-library-relationships/relationship-versioning-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "RelationshipVersioningOntology" v1.0 {
ontology:
id: "relationship-versioning-ontology"
parent: "ai-semantic-library-relationships"
purpose: "Track immutable versions of semantic relationships, their provenance, compatibility, supersession and evolution across ontology releases."
types:
OntologyVersion: {id: string, ontology_id: string, version: string, released_at: datetime?, parent_versions: string[]}
Entity: {id: string, ontology_version: string, type: string}
RelationshipVersion: {id: string, logical_relationship_id: string, revision: string, subject: string, predicate: string, object: string, valid_from: datetime?, valid_to: datetime?, recorded_at: datetime, status: enum[proposed, active, deprecated, superseded, retracted], confidence: number, provenance: string[]}
ChangeEvent: {id: string, kind: enum[create, revise, deprecate, supersede, retract, restore, merge, split], prior_versions: string[], next_versions: string[], reason: string, timestamp: datetime, actor: string?, evidence: string[]}
CompatibilityAssessment: {id: string, source_version: string, target_version: string, result: enum[compatible, breaking, unknown], rationale: string}
predicates:
version_of(version: RelationshipVersion, logical_relationship_id: string)
supersedes(new_version: RelationshipVersion, old_version: RelationshipVersion)
derived_from(new_version: RelationshipVersion, old_version: RelationshipVersion)
belongs_to(version: RelationshipVersion, ontology: OntologyVersion)
supported_by(version: RelationshipVersion, evidence_id: string)
changed_by(version: RelationshipVersion, event: ChangeEvent)
compatible_with(a: OntologyVersion, b: OntologyVersion)
constraints:
- "Version identifiers are unique within a logical relationship."
- "Published relationship versions are immutable; changes create new versions."
- "All relationship endpoints must resolve in the declared ontology context."
- "Confidence is in [0,1] and must be supported by provenance."
- "Supersession edges must be acyclic; branches and merges are explicitly recorded."
- "Valid time and recorded time are distinct; never silently overwrite either."
- "A retracted assertion remains auditable and is excluded from current inference by default."
- "Semantic identity is not inferred from matching labels or revision numbers alone."
- "No automatic assumption that a later version is logically equivalent to an earlier version."
inference:
rule supersession_lineage:
if supersedes(c,b) and supersedes(b,a)
then ancestor_version(a,c)
confidence: "lineage only; no semantic equivalence implied"
rule active_at_time:
if version_of(v,r) and valid_at(v,t) and status_allows_use(v,t)
then applicable_version(r,v,t)
confidence: "preserve recorded confidence and temporal provenance"
rule impact_analysis:
if changed_by(v,e) and downstream_depends_on(x,v)
then review_required(x,e)
confidence: "dependency signal, not proof of incompatibility"
SEMANTIC_EQUIVALENCE:
- "Compare meaning, domain, range, constraints and context before declaring versions equivalent."
- "Distinguish same logical relationship, exact semantic equivalence and approximate mapping."
- "Retain source and target ontology versions for all equivalence decisions."
CONFIDENCE:
range: [0,1]
factors: [source_reliability, evidence_quality, temporal_validity, mapping_quality, independent_verification]
policy: "Do not increase confidence merely because a relationship is newer or has multiple derived versions."
VALIDATION:
- "Check identifiers, entity types, version references, time intervals and provenance."
- "Detect supersession cycles, orphaned versions and conflicting active assertions."
- "Validate backwards compatibility against changed predicates and constraints."
- "Preserve conflicts and alternative branches pending evidence-based reconciliation."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology definition, versioned relationship assertions, change events, rules and provenance"
note: "Compute hash at execution; no hash value is claimed here."
UPDATE_MODEL:
strategy: "append-only, provenance-preserving, version-aware incremental updates"
steps: [ingest, normalise, validate, diff, classify_change, assess_compatibility, link_versions, recompute_impacts, publish]
rollback: true
rollback_policy: "Restore an earlier active view without erasing later audit history."
AI_CONSUMPTION:
representation: "versioned typed knowledge graph with temporal and provenance-aware relationship edges"
outputs: [current_relationships, historical_relationships, version_lineage, semantic_diffs, compatibility_reports, provenance_records, confidence_annotations]
safeguards: [no_silent_overwrite, no_unverified_equivalence, no_retracted_claims_as_current, preserve_temporal_context, preserve_audit_trail]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard