Chapter 1
The Language of Flow
Flow Algebra
Author: Mark Higgins
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 February 2026
Author: Mark Higgins
Flow Algebra was designed to be readable, writable, and verifiable by both humans and machines.
Its grammar balances the rigour of mathematics with the natural flow of structured thought.
Where programming languages rely on strict syntax, Flow Algebra relies on coherence — indentation, intent, and hierarchy replace brackets and semicolons.
At the highest level, a Flow document reads like annotated logic.
Each indented block represents a domain of meaning, and the flow between them represents causal direction.
The grammar of Flow Algebra follows four simple structural rules:
| Rule | Meaning | Example |
|---|---|---|
|
1. Indentation defines scope
|
Nested elements inherit context. |
params:\n threshold: 0.8
|
|
2. Colons declare values
|
Assigns constants or states.
|
locale: "en-GB"
|
|
3. Arrows define direction
|
Shows transformation or outcome.
|
if x > 0 → accept
|
|
4. Hash symbols introduce annotations
|
Marks descriptive comments or headers.
|
# ---------- PROCESS ----------
|
| Symbol | Meaning | Notes |
|---|---|---|
|
→
|
transition / transformation
|
A flow from one state to another
|
|
↺
|
recursion / feedback
|
A loop returning to origin
|
|
∑
|
aggregation / summation
|
Merging results or states
|
|
≈
|
approximate equality
|
Tolerant match within thresholds
|
|
⧉
|
coherence check
|
Used in monitors to verify balance
|
A Flow is structured in blocks — logically grouped segments that express how information or energy moves.
Blocks can contain nested sub-flows, creating self-contained modules within a larger system.
flow "DataPipeline"
# ---------- IO ----------
io.read:
format: csv
source: "input.csv"
io.write:
format: json
target: "output.json"
# ---------- PROCESS ----------
process:
filter:
if value > 10 → include
normalise:
scale → 0–1Here, filter and normalise are nested flows under the broader process domain. Each sub-flow inherits the parent context — indentation conveys belonging, not syntax.
This indentation-based grammar allows for infinite depth while preserving perfect readability.
It is both visual and logical: the eye follows the structure; the system follows the logic.
Every Flow has internal variables and parameters.
Variables represent changing states; constants represent fixed context.
params:
threshold: 0.7
locale: "en-GB"
state:
count = 0
total = ∑(entries)
CONST_PI = 3.14159
radius = 5
circumference = 2 * CONST_PI * radiusVariables can also carry types (optional, for clarity):
threshold: float = 0.85
label: str = "accepted"
count: int = 0Annotations begin with # and carry meaning, structure, or instruction. They can be used as headings, notes, or temporal markers:
# ---------- MONITOR ----------
monitor:
check:
if result ≈ expected → stable
else → alert("deviation detected")Annotations are not ignored by Flow Algebra engines —
they can act as semantic hints, helping interpreters categorise or render flows visually. In essence, annotations bridge narrative meaning and logical structure.
Flow Algebra deliberately merges formal logic with readable language:
if sensor.temperature > limit → trigger("cooling")
can be read aloud as:
If the sensor temperature exceeds the limit, trigger cooling.”
This dual readability makes Flow Algebra bilingual —
it speaks to both humans and machines without losing precision.
Long-form narrative comments can co-exist with algebraic instructions:
# System maintains internal equilibrium
# by monitoring differential heat across nodes.
process:
if ΔT > 5 → redistribute("thermal_load")The fusion of language and algebra enables scientists, engineers, and AI systems to reason within the same expressive field — bridging logic, meaning, and design.
To write in Flow Algebra is to think structurally.
It encourages clarity, causality, and coherence — every indentation mirrors a decision, every arrow a transformation.
Where traditional algebra manipulates numbers, Flow Algebra manipulates relationships.
It captures not only what happens, but how and why.
Flow Algebra is the geometry of reason written in lines.
where: