FLOW ALGEBRA
TITLE: Relationship Integrity Ontology
DOMAIN: AI Semantic Library Relationships / Relationship Integrity
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/ai-semantic-library-relationships/relationship-integrity-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "RelationshipIntegrityOntology" v1.0 {
ontology:
id: "relationship-integrity-ontology"
parent: "ai-semantic-library-relationships"
purpose: "Represent, test and preserve the integrity of typed semantic relationships across ontology versions and knowledge graphs."
types:
Entity: {id: string, ontology: string, class: string, version: string}
Predicate: {id: string, domain: string?, range: string?, version: string}
Assertion: {id: string, subject: string, predicate: string, object: string, context: string?, confidence: number, evidence: string[], version: string}
Constraint: {id: string, kind: enum[type, domain, range, cardinality, identity, disjointness, temporal, provenance, custom], expression: string, severity: enum[error, warning]}
IntegrityCheck: {id: string, assertion_id: string, constraint_id: string, result: enum[pass, fail, unknown], evidence: string[], timestamp: datetime}
ChangeSet: {id: string, base_version: string, target_version: string, affected_assertions: string[]}
predicates:
relates(assertion: Assertion, subject: Entity, object: Entity)
governed_by(assertion: Assertion, constraint: Constraint)
validated_by(assertion: Assertion, check: IntegrityCheck)
derived_from(assertion: Assertion, source: string)
supersedes(new_assertion: Assertion, old_assertion: Assertion)
conflicts_with(a: Assertion, b: Assertion)
depends_on(a: Assertion, b: Assertion)
constraints:
- "All assertion endpoints and predicates must resolve to versioned identifiers."
- "Asserted subject and object types must satisfy declared predicate domain and range where applicable."
- "Confidence values must be finite and within [0, 1]."
- "Required evidence and provenance must remain traceable across updates."
- "Cardinality, identity and disjointness checks use the declared ontology semantics, not unsupported closed-world assumptions."
- "A failed integrity check must not silently delete or rewrite an assertion."
- "Conflicting assertions must retain their contexts, provenance and temporal validity."
- "Hash equality confirms canonical data equality only under the stated canonicalisation procedure; it does not prove semantic truth."
inference:
rule flag_type_violation:
if governed_by(a,c) and evaluate(a,c) == fail
then integrity_issue(a,c)
confidence: "deterministic for explicit constraints and complete inputs"
rule propagate_change_impact:
if supersedes(new,old) and depends_on(downstream,old)
then requires_revalidation(downstream)
confidence: "dependency evidence required"
rule preserve_unresolved_conflict:
if conflicts_with(a,b) and not resolved_with_evidence(a,b)
then retain_as_disputed(a,b)
confidence: "do not infer which assertion is true"
SEMANTIC_EQUIVALENCE:
- "Distinguish identical identifiers, equivalent concepts, aliases and merely similar relationships."
- "Permit equivalence mappings only within their stated scope and ontology versions."
- "Do not collapse context-dependent assertions into unconditional identity."
CONFIDENCE:
range: [0,1]
factors: [source_reliability, evidence_quality, inference_validity, temporal_relevance, cross_source_agreement]
policy: "Integrity pass/fail is separate from epistemic confidence; do not inflate confidence through inference chains."
VALIDATION:
- "Resolve entities, predicates, referenced ontologies and version identifiers."
- "Evaluate types, domain/range, cardinality, disjointness, identity and provenance constraints."
- "Check cycles only for predicates whose semantics forbid them."
- "Record pass, fail or unknown with reproducible evidence and timestamp."
- "Revalidate dependent assertions after any relevant schema, mapping or evidence change."
- "Quarantine unresolved integrity failures without discarding original records."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology version, assertions, constraints, mappings and provenance"
note: "Compute at execution; no hash value is claimed here."
UPDATE_MODEL:
strategy: "versioned, provenance-preserving incremental integrity checking"
steps: [ingest, normalise, resolve_identifiers, validate, detect_conflicts, assess_impact, reconcile, recompute_inferences, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed, versioned knowledge graph with integrity-check annotations"
outputs: [validated_assertions, integrity_reports, conflict_records, dependency_impacts, provenance_records, version_links]
safeguards: [no_silent_repairs, no_unqualified_identity_merges, preserve_disputed_evidence, distinguish_unknown_from_valid]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard