FLOW ALGEBRA
Habitat Ontology — Full Flow Algebra v1.0
Kireth Semantic Library
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/ecological-entities/habitat-ontology-2.html
Status: Newly authored formalisation; source-page wording not independently verified.
flow "HabitatOntology" v1.0 {
namespace: "kireth.semantic_library.biological_entities.ecological_entities.habitat"
locale: "en-GB"
purpose: "Represent habitats, their environmental conditions, occupants, spatial boundaries and temporal changes as typed, auditable ecological knowledge."
TYPES {
Habitat: EcologicalEntity { id: URI; name: String; description: String?; spatial_extent: Geometry?; temporal_extent: Interval?; habitat_type: HabitatType; provenance: SourceRef[]; }
HabitatType: Enum { terrestrial, freshwater, marine, coastal, estuarine, subterranean, aerial, artificial, transitional, other }
Microhabitat: Habitat { parent_habitat: HabitatID; }
Organism: BiologicalEntity { taxon_id: TaxonID?; life_stage: String?; }
Population: EcologicalEntity { taxon_id: TaxonID; spatial_extent: Geometry?; }
BiologicalCommunity: EcologicalEntity { member_populations: PopulationID[]; }
Ecosystem: EcologicalEntity { spatial_extent: Geometry?; }
Biome: EcologicalEntity { classification_scheme: String; }
AbioticFactor: EnvironmentalVariable { name: String; unit: String?; value: Number?; uncertainty: Number?; }
Resource: Entity { resource_type: String; availability: Number?; unit: String?; }
Disturbance: Event { disturbance_type: String; intensity: Number?; timestamp: DateTime?; }
Observation: Evidence { method: String; timestamp: DateTime; source: SourceRef; }
HabitatCondition: Enum { favourable, marginal, degraded, unsuitable, unknown }
Confidence: Real[0,1]
}
RELATIONSHIPS {
LOCATED_IN(Organism|Population|Habitat, Habitat|Ecosystem|Biome)
OCCUPIES(Organism|Population, Habitat)
PROVIDES_RESOURCE(Habitat, Resource)
HAS_ABIOTIC_FACTOR(Habitat, AbioticFactor)
SUPPORTS_COMMUNITY(Habitat, BiologicalCommunity)
CONTAINS_MICROHABITAT(Habitat, Microhabitat)
PART_OF(Habitat, Ecosystem|Biome)
ADJACENT_TO(Habitat, Habitat)
CONNECTED_TO(Habitat, Habitat)
FRAGMENTED_BY(Habitat, Disturbance)
ALTERED_BY(Habitat, Disturbance)
SUITABLE_FOR(Habitat, Organism|Population, Confidence)
OBSERVED_BY(Habitat, Observation)
SEMANTIC_EQUIVALENCE(Entity, Entity, Confidence)
}
CONSTRAINTS {
C01: Habitat.id is unique and persistent.
C02: Every claim records evidence, provenance and observation time when available.
C03: Microhabitat.parent_habitat references an existing Habitat.
C04: No habitat can be its own direct or transitive parent.
C05: Occupancy does not imply permanent residence or habitat suitability.
C06: Suitability is taxon-, life-stage-, location- and time-dependent.
C07: Habitat and biome classifications may overlap; they are not interchangeable.
C08: Missing environmental measurements remain unknown, never default to zero.
C09: Spatial containment and temporal overlap must be checked before aggregating observations.
C10: Correlation between disturbance and condition does not by itself establish causation.
}
INFERENCE {
R01: CONTAINS_MICROHABITAT(h,m) => PART_OF(m,h).
R02: OCCUPIES(o,h) and OBSERVED_BY(h,e) => candidate HABITAT_OCCURRENCE(o,h,e); do not infer suitability without further evidence.
R03: HAS_ABIOTIC_FACTOR(h,f) and WITHIN_TOLERANCE(o,f) and RESOURCE_SUFFICIENT(h,o) => candidate SUITABLE_FOR(h,o); attach confidence and uncertainty.
R04: CONNECTED_TO(h1,h2) does not imply biological dispersal without a species-specific connectivity model.
R05: ALTERED_BY(h,d) and measured pre/post condition change => candidate HABITAT_CHANGE(h,d); causal status remains unconfirmed without supporting design.
R06: PART_OF(h,e) and PART_OF(e,b) => contextual biome association for h, subject to spatial and classification validation.
}
FLOW {
INPUT: habitat_records, taxon_records, environmental_observations, spatial_layers, evidence_sources
NORMALISE: canonical identifiers, units, coordinates, time zones and controlled vocabulary
VALIDATE: entity types, references, geometry, temporal bounds and constraints C01..C10
LINK: build typed habitat-occupant-environment-resource graph
EVALUATE: run inference rules with provenance and explicit unknowns
SCORE: confidence = calibrated_evidence_score(source_quality, recency, coverage, agreement, uncertainty)
HASH: FLOW_HASH = SHA256(canonical_serialisation(version, entities, relations, rules, provenance))
UPDATE_MODEL: apply versioned changes; preserve prior states and invalidate dependent inferences
AI_CONSUMPTION: export machine-readable entities, typed edges, evidence, confidence, temporal scope and hash
OUTPUT: validated_habitat_graph, inferred_claims, unresolved_claims, audit_log
}
INVARIANTS {
I01: Every exported relation has valid typed endpoints.
I02: No inferred claim is promoted to observed fact without evidence.
I03: Confidence stays within [0,1] and is not treated as a probability without calibration.
I04: Changes preserve provenance and version history.
I05: Reproducible canonical input yields the same FLOW_HASH.
I06: Semantic equivalence never erases distinctions of scale, place, season or life stage.
}
EXAMPLE {
Habitat: "pond-margin-01" { habitat_type: freshwater; name: "Pond margin" }
Microhabitat: "reed-bed-01" { parent_habitat: "pond-margin-01" }
CONTAINS_MICROHABITAT("pond-margin-01", "reed-bed-01")
NOTE: No species occupancy or habitat suitability is asserted without observations.
}
}
Licence and use: Intended for open scientific and educational reuse subject to the licence stated by Kireth Research. This formalisation is a conceptual specification, not a claim of empirically validated ecological observations or a tested executable runtime.
Download Code
Copy to Clipboard