Skip to main content

Loop Concept Ontology

Process Concepts
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 04 December 2026
Audio Overview
KIRETH RESEARCH — AI SEMANTIC LIBRARY
LOOP CONCEPT ONTOLOGY — STANDARD FLOW ALGEBRA
Version: 1.0 | Encoding: UTF-8 | Date: 2026-12-04
Authors: Mark Anthony Higgins — Sky Recursive AI
Licence: Open Research Licence (project attribution; exact terms unverified)
Source: https://kirethresearch.org/booksai-core/entity-graph/abstract-concepts/process-concepts/loop-concept-ontology.html
Integration: AI Core / Entity Graph / Abstract Concepts / Process Concepts
Status: Proposed formalisation; published page and grammar not independently verified.

1. CANONICAL DEFINITION
A loop is a process structure in which control may return to an earlier execution point, enabling repeated evaluation or transformation. A loop definition is distinct from an execution instance. A loop may execute zero times, terminate, continue indefinitely, or fail. Repeated control does not imply repetition of the entire system state. A cycle denotes closure in a specified representation; iteration denotes repeated application; recursion denotes self-reference or self-invocation. These concepts may overlap but are not equivalent.

2. ENTITY MODEL
Loop L = (id, version, S, I, G, B, U, E, P, R, C)
S: typed state domain; I: initialisation; G: continuation guard; B: body; U: update; E: exit policy; P: execution policy; R: resource budget; C: context.
Execution instance = (instanceId, loopId, version, initialState, currentState, iterationCount, trace, status, evidence).
Statuses: pending, running, suspended, terminated, failed, cancelled, budget_exhausted, unknown.
Assessment statuses: established, rejected, unknown, disputed, not_applicable.
Each trace event records iteration index, time, input state, guard result, output state, effects, resource usage and provenance. Unknown guard values must follow an explicit policy, not silently become false.

3. CLASSIFICATION
Pre-test loop: evaluate guard before body; zero executions possible.
Post-test loop: execute body before testing continuation.
Count-controlled loop: repeat according to a defined integer bound.
Collection loop: traverse a specified collection under ordering and mutation rules.
Event-driven loop: repeat on events, with waiting and cancellation semantics.
Feedback loop: measured output influences subsequent input or control.
Nested loop: body contains another loop with separately scoped state and budget.
Parallel loop: iterations may overlap only under declared dependency and merge policies.
Adaptive loop: body or policy changes under versioned, authorised rules.
Stochastic loop: transitions or stopping conditions depend on random variables.
Persistent service loop: indefinite operation may be intended; liveness and safe cancellation replace mandatory termination.

4. LOCAL FLOW ALGEBRA NOTATION
X →[F] Y denotes a typed transformation; g ∘ f applies f first. Operators below are proposed local notation, not verified executable grammar.
F_init: Input × Context → State
F_guard: State × Context → {true,false,unknown}
F_body: State × Context → Result(State,Effects,Error)
F_update: State × Effects → State
F_budget: Trace × Budget → Decision
F_exit: State × ExitReason → ExecutionRecord
F_validate: ExecutionRecord × Policy × Evidence → Assessment
F_commit: ValidatedCandidate × Authority → VersionedRecord
F_iterate = F_update ∘ F_body, with result unpacking and error propagation understood.

5. COMPOSITE FLOWS
Input →[F_init] s0 →[F_guard] decision
true →[F_body] result →[F_update] s1 →[F_budget] decision → guard
false →[F_exit] terminated record
unknown → suspend, resolve or fail according to policy.
Body failure → record partial effects → authorised compensation or failure exit.
Sequential composition L2 ∘ L1 requires compatible exit and entry types. Nested loops retain independent counters and propagate cancellation according to policy. Parallel composition requires explicit synchronisation, deterministic merge where required, and protection against conflicting writes. A retry must not duplicate non-idempotent effects without a deduplication or compensation mechanism.

6. MATHEMATICAL SEMANTICS
For a deterministic pre-test loop, s_(k+1)=T(s_k) while G(s_k)=true, where T includes body and update. Exit index N=inf{k≥0:G(s_k)=false}, with infinity if no such index exists under total Boolean guards and no exceptional exits. A count-controlled loop with bound n≥0 executes n bodies in the absence of early exits.
Termination certificate: a ranking function V:S→N strictly decreases on every continuing transition. This proves termination if transitions are total and each body finishes. An invariant J holds if J(s0) and J(s) ∧ G(s) imply J(T(s)). Partial correctness additionally requires J(s) ∧ ¬G(s) to imply the postcondition; total correctness requires termination.
Fixed point: T(s*)=s*. This does not imply guard failure or correctness. For a contraction T on a nonempty complete metric space with factor 0≤q<1, repeated application converges to its unique fixed point, and d(s_k,s*)≤q^k d(s0,s*). A tolerance exit requires a separately declared error criterion. Period p>0 means T^p(s)=s; minimal period distinguishes fixed points from longer oscillations.
Stochastic loops: define stopping time N relative to the observed filtration. Almost-sure termination P(N<∞)=1 does not imply finite E[N]. For independent trials with constant success probability p>0, first-success trial count has expectation 1/p.
Resource accounting: total cost C_N=Σ_(k=0)^(N-1)c_k for additive costs; elapsed time under concurrency requires scheduling semantics. Budgets bound permitted execution, not mathematical convergence.

7. STRUCTURAL INVARIANTS
I01: Definition and execution identifiers remain distinct.
I02: Every transition conforms to declared state and result types.
I03: Guard evaluation uses the applicable state and policy version.
I04: Unknown is not silently converted to false.
I05: Iteration counts reflect actual body invocations, with completion separately recorded.
I06: Exit reason is explicit and not inferred solely from absence of events.
I07: Required invariants hold at declared checkpoints or violations are recorded.
I08: External effects retain unique identifiers and provenance.
I09: Resource limits and cancellation are enforced at declared safe points.
I10: Parallel merges preserve declared dependencies and conflict rules.
I11: Changes to loop definitions create versioned records.
I12: Termination, convergence and objective fulfilment are assessed separately.

8. RECURSIVE VALIDATION
Given graph K_n and new evidence ΔE, construct candidate K'=Refine(K_n,ΔE). Check type compatibility, guard coverage, invariant obligations, effect safety, resource policy and provenance. Commit K_(n+1) only after applicable validation and authorisation. Otherwise retain K_n and record rejection or unresolved evidence. Stop on validated fixed point, no material change, budget exhaustion, cancellation or unresolved conflict. Detect oscillation by comparing canonical candidate states and relevant policy versions. A repeated graph fingerprint is a diagnostic, not proof of semantic truth. Convergence of the validation process is distinct from termination of the loop being assessed.

9. EVIDENCE AND PROVENANCE
Record source identifier, observation time, valid time, definition version, execution identity, guard outcomes, trace coverage, measurement method and uncertainty. Distinguish observed, inferred, simulated and planned executions. A finite trace cannot establish indefinite termination or nontermination without additional proof. Confidence is not a probability unless calibrated. Missing observations do not establish absence of activity. Preserve contradictory traces and their contexts rather than overwriting them.

10. WORKED EXAMPLES
A. Software: x=3; while x>0 decrement x. Three body executions, ranking V=x, final x=0.
B. Numerical analysis: x_(k+1)=x_k/2, x0=1. Stop when |x|≤0.01; seven iterations yield 0.0078125. Exact zero is never reached in real arithmetic.
C. Engineering control: sample temperature, calculate control action, apply permitted adjustment, repeat. Feedback stability requires a separate plant and controller model.
D. Manufacturing: inspect each of ten parts. Record rejected parts separately; completion does not imply all parts pass.
E. Biology: a regulatory feedback model repeats measurement and response. A recurring control pattern need not imply identical molecular state.
F. Workflow: retry a failed delivery up to three attempts with a stable deduplication key. Exhaustion is a failure outcome, not success.
G. Semantic AI: refine an entity graph, validate constraints and compare canonical versions. Stop on no material change or budget exhaustion; a fixed point does not certify factual correctness.

11. CROSS-ONTOLOGY INTEGRATION
Process Concept: loop is a control structure within a process.
Iteration: each body invocation may instantiate an iteration.
Cycle: control graph may contain a directed cycle without full-state recurrence.
Workflow Concept: loop edges encode repeatable execution paths.
Step / Operation: loop body contains typed executable units.
State Transition: each iteration induces a state transition or failure record.
Input / Output: feedback maps selected outputs into later inputs.
Stable / Equilibrium State: fixed points and stability require distinct assessments.
Recursive Engineering Workflow: versioned refinement and feedback integration.
Consistency / Coherence: validate graph constraints and contextual compatibility.

12. PROPOSED ACCEPTANCE TESTS (NOT EXECUTED)
T01: Initially false pre-test guard → zero body invocations.
T02: Initially false post-test continuation guard → one successful body invocation before exit.
T03: Count bound 5 with no early exit → five body invocations.
T04: Unknown guard → declared unknown-handling policy, not implicit success.
T05: Decrementing nonnegative integer → ranking certificate accepted under total body assumption.
T06: T(x)=x with always-true guard → fixed point but no normal guard termination.
T07: T(x)=-x, x≠0 → period two, not convergence to a fixed point.
T08: Nested counters → independent scope and correct total execution accounting.
T09: Conflicting parallel writes → reject or apply declared conflict policy.
T10: Retry of non-idempotent operation → require deduplication or authorised compensation.
T11: Budget exhaustion → explicit budget exit, no automatic objective success.
T12: Repeated validation graph with unresolved contradiction → retain uncertainty or rejection; do not certify truth.

13. CITATION AND LICENCE
Suggested citation: Higgins, Mark Anthony; Sky Recursive AI (2026). Loop Concept Ontology — Standard Flow Algebra, version 1.0. Kireth Research, AI Semantic Library.
Source: https://kirethresearch.org/booksai-core/entity-graph/abstract-concepts/process-concepts/loop-concept-ontology.html
Open Research Licence attribution follows project convention. Consult the publisher for authoritative licence terms. This is an original proposed formalisation, not a verified transcription of the public page. Published grammar compatibility and exact licence terms have not been independently verified. Acceptance tests are proposed, not executed.
END OF SPECIFICATION
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ