Operations and control flow
L sequences resolved source instructions and source-defined actions. The supported instruction set is intentionally smaller than the complete grammar/vocabulary inventory.
Sequencing and evaluation order
Section titled “Sequencing and evaluation order”Statements retain their original order after source expansion. Coordinated unary Build, Run, Await, Stop, and Show operations process operands in source order. A source-defined one-argument action applied to several operands instead expands its entire body for each operand before starting the next.
Run acknowledges launch before the next instruction, while the child process continues independently. This permits overlapping OS processes; it does not establish parallel evaluation of arbitrary expressions. Native fragments may have their own Rust evaluation rules. Logeme assembly order is not a general source expression-order promise.
Supported coordination. The two-App program declares First and Second before these instructions:
Start First and Second.Await Second and First.Show First's Output.Show Second's Output.Fragment. Source: demo/phase1/main.l (lines 8–11).
Example evidence
Ordered lifecycle and display excerpt from the complete two-App CLI witness; requires preceding First and Second declarations. existing-witness-not-run. Evidence guide.
Start First and Second expands Build/Run for First, then Build/Run for Second. Await Second and First joins in the opposite order. The two Shows still display First before Second: the retained CLI test expects First\nSecond\n. Replacing Start with Execute would finish First's Start/Await composition before starting Second.
Assignment
Section titled “Assignment”Passive declarations such as "count" is 7. and supported Define forms introduce or assign typed values. Runtime assignment evaluates its right-hand side at the ordered instruction position. A stored Output value remains a snapshot across subsequent invocations.
Definite assignment intersects all paths that continue to a read. Exit branches cannot reach later reads and therefore do not require a value there. The compiler does not insert hidden defaults, and an unused Output assignment still performs the member read and its runtime availability check.
Supported snapshot assignment — excerpt. The complete snapshot fixture first declares a Basic App named Worker that prints saved:
Run Worker.Await Worker.Define "snapshot" as Worker's Output.Run Worker.Await Worker.Show snapshot.Show Worker's Output.Fragment. Source: testdata/phase1/language/lang-11.l (lines 5–11).
Example evidence
Snapshot and rerun excerpt from LANG-11; requires the preceding Worker declaration and IO import. existing-witness-not-run. Evidence guide.
The first Await makes Output available. Define reads it once; later invocations do not change snapshot. The last Show reads the latest Output separately. The frontend witness checks that the saved value retains its binding.
Comparisons
Section titled “Comparisons”The current condition operators and their boundaries are:
Table: scroll horizontally to read all columns.
| Condition | Supported operands | Meaning |
|---|---|---|
| Bare value | Truth | Test the boolean value |
left is right | Matching Text, Number, or Truth | Equality |
left equals right | Matching Text, Number, or Truth | Equality |
left isnt right | Matching Text, Number, or Truth | Inequality |
left less than right | Number and Number | Strict order |
left greater than right | Number and Number | Strict order |
left less than equal to right | Number and Number | Inclusive order grammar |
left greater than equal to right | Number and Number | Inclusive order grammar |
target has an Error | Checked App and its Error | Test the selected process operation/invocation error |
The inclusive-order spelling follows L's grammar. Source phrases must satisfy both grammar and operand typing.
not or no negates only the condition forms whose grammar owns that modifier. Values do not have general truthiness, Text ordering is rejected, and mixed scalar comparisons do not coerce. The Error in a has condition must belong to the same target; it is not generic collection membership.
Selection
Section titled “Selection”If selects a branch from a supported condition. An attached else belongs to the unmatched if. Otherwise can attach to an immediately preceding unmatched conditional in the same source paragraph; it does not search arbitrary earlier paragraphs or create an unconditional fallback after unrelated statements.
Supported equality and selection. This program makes the wait explicit on the branch that continues:
Use IO's Print from `io` as "Print"."message" is `condition`."enabled" is true.Create "Worker" as a New Basic App.The App Prints message.Run Worker.If enabled equals true, await Worker, else exit.Define "result" as Worker's Output.Show result.Complete program. Source: testdata/phase1/language/lang-13.l.
Example evidence
Complete LANG-13 program: Truth equality chooses Await and then reads finalized App output. Existing native witness, not run here. existing-witness-not-run. Evidence guide.
enabled is Truth. When it equals true, Await joins Worker; otherwise Exit terminates the program. Every path reaching the Output assignment has joined. Expected stdout is condition\n.
Conditional ownership — excerpt from a frontend witness. The member-resolution source declares an App, declares Text x, and executes the App before these clauses:
If it has an Error, exit with the Error, else define "y" as it's Output.If x isnt y, exit with an error of `text values of both x & y should be Hello World`.Otherwise, show y and then exit.Fragment. Source: lyger/test/member-resolution.l (lines 7–9).
Example evidence
Conditional ownership excerpt from the member-resolution frontend witness; preceding App, x, and execution omitted. No successful runtime claim. existing-witness-not-run. Evidence guide.
The first else belongs to the Error test and assigns y from the completed invocation. Otherwise belongs to the immediately preceding If x isnt y. This binding fixture requires the earlier declarations; its Text comparison differs by Print's final newline.
The grammar can parse multiple conditions, but outer lowering explicitly rejects joined condition lists. Consequently and/or in the vocabulary does not establish general boolean short-circuiting. Coordination of actions, declarations, and operands is a different supported use of conjunctions.
Iteration and collection operations
Section titled “Iteration and collection operations”While and three-part source loops remain unsupported. Collections support Put, Place and typed reads; configured Get/Take words do not introduce further operations.
Unsupported loop — source fragment:
While true is true, Show `again`.Fragment. Source: docs/examples/control-while-unsupported.l.
Example evidence
Documentation-only unsupported While illustration derived from configured grammar and the explicit outer-instruction rejection; not parsed or run. static-inspection. Evidence guide.
The grammar recognizes this While shape, but the instruction builder rejects it.
The Rust backend separately supports bounded iteration compositions described in the target reference. It rejects the three-part X form. Native loop composition does not confer source-level iteration semantics, collection ordering, bounds behavior, or break/continue vocabulary.
Arithmetic and native calculations
Section titled “Arithmetic and native calculations”Number is binary64, but the configured English grammar has no general infix arithmetic expression system. No public precedence table for +, -, multiplication, division, or arithmetic grouping can be inferred from numeric literals or D/E templates.
D/E calculates native expressions; G/I selects branches. A source-defined native-backed word may use supported target fragments deliberately. Such a definition documents its own typed contract and target dependence; it is not a built-in arithmetic operator family.
Show and output
Section titled “Show and output”Show is an outer observation instruction. It writes Text bytes unchanged and formats supported runtime values without adding a newline. Direct App and Error display rejects. It does not implicitly join a process, replay unrelated captured output, or turn child stderr into stdout. Use explicit Await before Output when completion is required.
IO.Print is an imported action that adds one newline. See IO for raw-byte and numeric behavior.
Supported application print and outer observation — complete canonical example.
Use IO's Print from `io` as "Print".
"message" is `Hello World!`.Create "Hello" as a New Basic App.The App Prints message.Execute Hello.Show Hello's Output.Complete program. Source: demo/basic/main.l.
Example evidence
Canonical Hello World App with explicit IO.Print import and finalized output. existing-witness-not-run. Evidence guide.
The App Prints message belongs to Hello's generated program and appends LF through imported IO.Print. Execute waits for that invocation; Show Hello's Output then writes the captured Hello World!\n exactly. Show does not add a second LF. The canonical CLI witness records that expected output.
Exit and Return
Section titled “Exit and Return”Bare Exit terminates the whole L program after cleanup and succeeds if cleanup succeeds. Exit with an explicit Error/text failure follows the maintained error path and returns failure. Exit inside a continuation or expanded source action still exits the orchestrator; it is not merely a return from the nearest paragraph.
Supported whole-program termination.
Use IO's Print from `io` as "Print"."firstText" is `First`."secondText" is `Second`.
Create "First" as a New Public Basic App.The App Prints firstText.Show First's Output.Exit.Show `unreachable paragraph tail`.
Create "Second" as a New Public Basic App.The App Prints secondText.Show Second's Output.
Execute First and Second.Show `unreachable program tail`.Complete program. Source: demo/paragraphs/exit-program.l.
Example evidence
Bare Exit from an App continuation terminates later paragraph and program actions; complete maintained runtime witness. existing-witness-not-run. Evidence guide.
Execute reaches First's continuation, which shows First\n and then exits. The following Show in the paragraph, Second's Execute operand, and the program's final Show are unreachable. The retained paragraph test expects that one output line and status 0 when cleanup succeeds. Compare the explicit-error example, whose exit status is 1.
Function.Return belongs to the builtin native-backed Function facility. It emits target return syntax within its composed function. The presence of Return does not make Exit a function return, nor establish general source exceptions or arbitrary return-value transport between processes.
Sources and witnesses
Section titled “Sources and witnesses”Primary sources: instruction construction, condition typing, flow analysis, emission, condition kinds, and grammar. Existing witnesses: instruction adjacency, scalar conditions and snapshots, paragraph grammar coordination, bare Exit, and error Exit.
Canonical source: docs/spec/control-flow.md.