「‍」 Lingenic

Guarded Computation

(⤓.md ◇.md); γ ≜ [2026-07-13T062546.818, 2026-07-13T071146.396] ∧ |γ| = 3

Guarded Computation

Origin. FGCP's Guarded Horn Clauses (GHC) and its successor KL1; Ueda's concurrent logic programming; influenced Flat Concurrent Prolog.

Mechanism. Clauses have guards: conditions that must succeed before the clause commits. Multiple clauses can be tried concurrently; the first to have its guard succeed commits, and the others are abandoned. This is committed-choice nondeterminism — once chosen, no backtracking. The model enables fine-grained concurrency: processes communicate through shared logic variables that become incrementally instantiated.

Procedure. Structure the program as concurrent processes communicating via streams (incrementally instantiated lists). Each process is a recursive clause that reads from input streams, computes, and writes to output streams. Guards test input availability and conditions; the process suspends until its guard succeeds. Composition is wiring: connect output streams of one process to input streams of another.

Applies to. Pipeline architectures, reactive systems, stream processing, and any computation naturally expressed as communicating sequential processes.

Limitations. Committed-choice means no backtracking; if the committed clause leads to failure, the entire computation fails rather than trying alternatives. This trades completeness for efficiency. Debugging is difficult because the commit point is implicit, and deadlocks arise when processes wait circularly for variables that none can instantiate.

© 2026 Lingenic LLC