Skip to main content

Flow Algebra Domain Ontology

AI Semantic Library Domains
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 October 2026
Audio Overview
FLOW ALGEBRA
TITLE: Flow Algebra Domain Ontology
VERSION: 1.0
SOURCE_URL: https://kirethresearch.org/booksai-core/ontologies/domain-ontologies/ai-semantic-library-domains/flow-algebra-domain-ontology.html
STATUS: Domain-based draft; source page content not independently verified.
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library

DOMAIN:
  id: flow_algebra_domain_ontology
  label: Flow Algebra Domain Ontology
  category: AI Semantic Library Domains
  purpose: Represent typed semantic flows, composable transformations, executable reasoning steps, and their validation and provenance.

TYPES:
  Flow: {id: string, version: string, inputs: list, outputs: list, steps: list}
  Entity: {id: string, type: string, attributes: map}
  Relation: {subject: Entity, predicate: string, object: Entity}
  Operator: {id: string, input_types: list, output_type: string, semantics: string}
  FlowStep: {id: string, operator: Operator, inputs: list, outputs: list, dependencies: list}
  Constraint: {id: string, expression: string, severity: string}
  Assertion: {id: string, proposition: string, evidence: list, confidence: float}
  ProvenanceRecord: {source: string, timestamp: string, method: string}
  ExecutionState: {flow_id: string, step_id: string, status: string, outputs: map}

RELATIONSHIPS:
  Flow CONTAINS FlowStep
  FlowStep USES Operator
  FlowStep DEPENDS_ON FlowStep
  FlowStep READS Entity
  FlowStep PRODUCES Entity
  Relation CONNECTS Entity
  Constraint VALIDATES FlowStep
  Assertion SUPPORTED_BY ProvenanceRecord
  Flow DERIVES_FROM Flow

OPERATORS:
  TYPE_CHECK(input, expected_type) -> boolean
  MAP(entity, transformation) -> Entity
  FILTER(entities, predicate) -> list[Entity]
  JOIN(left, right, relation) -> list[Relation]
  INFER(facts, rules) -> list[Assertion]
  VALIDATE(flow, constraints) -> ValidationResult
  COMPOSE(flow_a, flow_b) -> Flow
  EXECUTE(flow, context) -> ExecutionState

INFERENCE_RULES:
  R1: IF step_b DEPENDS_ON step_a THEN step_a MUST complete before step_b executes.
  R2: IF output_type(step_a) != input_type(step_b) THEN composition MUST fail unless an explicit conversion exists.
  R3: IF an assertion lacks evidence THEN its confidence MUST be marked unverified.
  R4: IF a constraint fails THEN downstream dependent execution MUST halt or enter a declared recovery branch.
  R5: IF a dependency cycle exists THEN execution MUST reject the cycle unless a bounded recursive strategy is declared.
  R6: IF a source changes THEN derived assertions MUST be marked for revalidation.

CONFIDENCE:
  range: [0.0, 1.0]
  rule: Confidence is evidence-calibrated and is not proof of truth.
  aggregation: Explicitly record the aggregation method; do not assume independence.
  missing_evidence: unknown

SEMANTIC_EQUIVALENCE:
  condition: Two flows are equivalent only under declared input domains, output semantics, side effects, and termination assumptions.
  verification: Compare types, constraints, observable results, and provenance.
  note: Similar names or embeddings do not establish logical equivalence.

PROVENANCE:
  require: [source_identifier, creation_time, transformation_history, version]
  policy: Preserve source-to-assertion lineage and distinguish observed facts from inferred claims.

FLOW_HASH:
  algorithm: SHA-256
  input: Canonical UTF-8 serialisation of versioned flow definition excluding the FLOW_HASH field itself.
  purpose: Integrity and reproducible change detection.
  note: Recompute on any canonical definition change.

UPDATE_MODEL:
  strategy: versioned_incremental
  triggers: [source_change, schema_change, rule_change, evidence_change]
  actions: [invalidate_affected_derivations, revalidate_types, rerun_affected_steps, record_provenance, recompute_flow_hash]
  preserve_history: true

AI_CONSUMPTION:
  format: typed_semantic_flow
  requirements: [explicit_types, deterministic_dependencies, source_traceability, confidence_metadata, validation_before_execution]
  outputs: [entity_graph, inferred_assertions, execution_trace, validation_report]
  safeguards: [no_unsupported_fact_promotion, bounded_recursion, conflict_detection, uncertainty_preservation]

EXAMPLE_FLOW:
  id: classify_and_link_knowledge
  input: [document_text]
  steps:
    - extract_entities(document_text) -> entities
    - type_check(entities) -> validated_entities
    - infer_relations(validated_entities) -> candidate_relations
    - validate(candidate_relations) -> verified_relations
    - record_provenance(verified_relations) -> traceable_graph
  output: [traceable_graph]

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ