TVL — Timeverse Language
A domain-specific language for programming temporal phase-coordinated agents and missions.
Version 1.0
Status: Hardened
What is TVL?
TVL is a high-level, declarative language designed to simplify the interaction with the Timeverse T2 Protocol. It allows developers to define missions, agents, and contracts that are natively aware of cyclic time, phase windows, and quality gates (HS-Bloch).
The TVL compiler transforms this source code into executable JavaScript that integrates directly with the Timeverse Kernel.
Syntax Overview
Directives
Use directives to configure the global context of your script.
Directives
@timeverse v4.6.2
@anchor SWT6 // Sets the local spatial contextMissions
A mission is a sequence of actions with strict temporal and environmental requirements.
Mission Example
mission optimization {
require carbon < 260
require phase [80, 100] // Zenith window
on ALLOW {
execute qaoa_solver
anchor TSAE -> clockchain
}
}Agents
An agent is a persistent process that monitors phases and acts when conditions are met.
Agent Example
agent drone_alpha {
heartbeat 30s
loop {
check phase
on ACTION {
execute area_scan
anchor TSAE -> cloud_ledger
}
on RECHARGE {
sleep 300s
}
}
}Language Reference
| Keyword | Description |
|---|---|
| mission | Defines a goal-oriented workflow. |
| require | Sets a mandatory gate (phase, carbon, etc.). |
| on [Verdict] | Conditional branch based on protocol verdict. |
| anchor | Persists a hash commitment to a ledger. |
| loop | Repeats a block of code. |
Try it out!
Test your TVL code in the Lab IDE.