Two views, one program, one parse
durable source · one parse · node view and script view
Mission foundation / System overview
One program in text and node views
Trident is a typed language for application rules and workflow. Its script view and node view edit the same program graph. The language includes bounded loops, complete branches, tasks, errors, and distributed locks.
System diagram
The node view and script view edit the same program. The branch, task budget, error path, and lock are visible before the workflow runs.
Inside the system
Each plate preserves the internal layout, paths, boundaries, and highlighted decisions. Use the short label first, then follow the lines through the system.
durable source · one parse · node view and script view
one table · two consumers · the refused spellings · the whole control-flow set
the resolution cascade · one named refusal per step · why a composite lowers
the declared budget · the four escapes · the two termination bounds
lex · parse · resolve · static checks · tree-walker and VM · the bit-identity oracle
the corpus · the adversarial cases · the emitter round trip
bootloader and supervisor · the unwind path · the two declared dispositions
the question · the two answers · gravity, declared and consumed
the reachability claim, recorded per leaf · the three docs and the census gate
Key parts
These are the main boundaries, inputs, outputs, and failure rules. The examples show a specific use of each part.
A workflow can appear as text for precise review or as connected nodes for visual understanding. Both views represent the same program.
A planner can review a sensor-to-alert flow as a diagram while an integrator checks the exact rules in text.
Mission choices stay in the application layer. Fast, reusable platform functions stay in the shared foundation.
A team can change a flight rule or approval path without rebuilding the platform beneath it.
When work cannot continue, the system reports a structured reason instead of only stopping. Applications can respond in a planned way.
If a data source is missing, the workflow can record the cause, notify an operator, and move to an approved fallback.
Language examples
These short examples show how Trident makes control, data checks, failure, task limits, and shared work visible in the source.
Types carry exact width, time, and physical meaning into the data model.
i32 readyAssets = 12;
duration responseWindow = 90s;
measure safeDistance = 5<km>;
text status = "ready";
Repeat and foreach make the work limit visible instead of hiding an open-ended loop.
i32 available = 0;
repeat (assets.count(); i32 i = 0) {
if (assets[i]["ready"]) {
available += 1;
}
}
foreach (text unit in assignedUnits) {
t.log.info("checking " + unit);
}
An enum branch must handle every declared state. A new state forces a review.
enum TrackState { New, Confirmed, Rejected }
TrackState state = TrackState.New;
when (state) {
is TrackState.New { action = "review"; }
is TrackState.Confirmed { action = "publish"; }
is TrackState.Rejected { action = "hold"; }
}
Dynamic input becomes usable only after required fields pass a typed check.
var { i32 quantity, text source } = report else {
t.log.warn("report refused");
return 0;
}
accepted += quantity;
Errors expose a code and message so the application can choose a planned response.
on error (err fault) {
if (fault.retryCount < 2) {
retry;
}
fail;
}
t.debug.raiseError("SourceUnavailable", "feed offline");
A task contains a failure and applies a clear time budget to the work.
text result = "pending";
task(50ms) {
result = evaluateReport(report);
} else (err fault) {
result = "held: " + fault.code;
}
The lock declares its mode, wait, lease, and renewal policy. Busy work takes an explicit alternate path.
object policy = t.sync.exclusive(100ms, 60s, true);
lock? ("asset:" + assetId, policy) {
readiness += delta;
} else {
queued = true;
}
A host event enters through typed accessors and keeps missing data behavior explicit.
on event("TrackUpdated", evt) {
text trackId = evt.getText("trackId");
bool trusted = evt.getBool("trusted", false);
if (trusted) {
t.log.info("accepted " + trackId);
}
}
Uses
Pilot questions
Which mission rules should be easy to change
Who must review the visual and text views
How the application should respond to missing or disputed data