Stage-aware command-line surface for the non-normative FROG reference pipeline
FROG — Free Open Graphical Language
- 1. Overview
- 2. Status and Boundary
- 3. Current Primary Example
- 4. Command Summary
- 5.
validate - 6.
derive-ir - 7.
lower - 8.
emit-contract - 9.
run - 10. Backend-Family Selection
- 11. Artifact Visibility
- 12. Design Rules
- 13. Summary
frogc is the command-line surface of the non-normative FROG reference pipeline.
Its purpose is to expose the published stage boundaries explicitly rather than hide them behind one opaque execution command.
The reference command shape is:
frogc validate <file.frog>
frogc derive-ir <file.frog>
frogc lower <file.frog> [--backend-family <family_id>]
frogc emit-contract <file.frog> [--backend-family <family_id>]
frogc run <file.frog> [--backend-family <family_id>]
frogc is not a specification layer.
It is a convenience surface over the reference implementation modules under:
Implementations/Reference/
Accordingly, frogc must not:
- become the owner of source validity,
- become the owner of semantic truth,
- replace the open FROG Execution IR,
- replace backend contract emission with hidden runtime behavior.
The current primary reference example is:
Examples/05_bounded_ui_accumulator/main.frogThis example is the current preferred anchor because it exercises, in one coherent corridor:
- front-panel widgets,
widget_value,widget_reference,frog.ui.property_write,- canonical
for_loopstructure, - explicit local memory through
frog.core.delay, - public output exposure,
- and first end-to-end runtime execution posture.
# validate canonical source against the supported reference subset
frogc validate Examples/05_bounded_ui_accumulator/main.frog
# derive open execution-facing IR
frogc derive-ir Examples/05_bounded_ui_accumulator/main.frog
# lower for the selected backend family
frogc lower Examples/05_bounded_ui_accumulator/main.frog --backend-family llvm_cpu_v1
# emit the backend-facing contract
frogc emit-contract Examples/05_bounded_ui_accumulator/main.frog --backend-family llvm_cpu_v1
# execute through the reference runtime path
frogc run Examples/05_bounded_ui_accumulator/main.frog --backend-family llvm_cpu_v1
The validate command checks whether the source belongs to the supported validated reference subset.
Typical responsibilities include:
- top-level section validation,
- interface validation,
- front-panel widget validation,
- presentation metadata validation,
- diagram-node validation,
- canonical
for_loopstructure validation, - explicit local-memory validation,
widget_referenceand property-write validation.
Example:
frogc validate Examples/05_bounded_ui_accumulator/main.frog
Expected output posture:
- a validation artifact,
- validated subset flags,
- and explicit diagnostics if validation fails.
The derive-ir command derives an open execution-facing representation from the validated source.
For the current slice, the derived IR should preserve at least:
widget_valueparticipation,widget_referenceparticipation,frog.ui.property_writeobject intent,- canonical
for_loopidentity, - body-region structure,
- explicit local memory,
- public output attribution,
- front-panel declarations as non-semantic UI metadata.
Example:
frogc derive-ir Examples/05_bounded_ui_accumulator/main.frog
The lower command specializes the open Execution IR for a selected backend family.
This step may:
- specialize the loop representation,
- specialize explicit state handling,
- materialize UI-binding operations,
- prepare backend-oriented assumptions,
- but it must not collapse FROG itself into the backend family.
Example:
frogc lower Examples/05_bounded_ui_accumulator/main.frog --backend-family llvm_cpu_v1
For the first executable slice, the lowered form should still preserve:
- bounded loop identity,
- explicit local memory,
- natural UI value paths,
- object-style UI write operations,
- non-semantic front-face metadata preservation.
The emit-contract command emits the backend-facing handoff artifact consumed by a backend or runtime family.
This is the explicit downstream boundary after lowering. The emitted contract should remain attributable to:
- the original source,
- the selected backend family,
- the preserved loop and state model,
- the preserved UI participation model.
Example:
frogc emit-contract Examples/05_bounded_ui_accumulator/main.frog --backend-family llvm_cpu_v1
For the current slice, the emitted contract should make explicit:
- one bounded loop of five iterations,
- one explicit local state cell initialized to zero,
- one control input value,
- one indicator output value,
- one public output value,
- minimal object-style UI writes for
face_color, - and preserved non-semantic UI metadata.
The run command executes through the runtime-side consumption of the emitted or implied backend contract.
For the first executable slice, the conservative reference reading is:
- load source,
- validate,
- derive IR,
- lower,
- emit backend contract,
- prepare runtime-side execution,
- sample the control value,
- apply explicit UI property writes,
- run the bounded accumulation loop,
- publish the final indicator value,
- publish the same public output value.
Example:
frogc run Examples/05_bounded_ui_accumulator/main.frog --backend-family llvm_cpu_v1
Backend-family selection is explicit whenever lowering, contract emission, or runtime execution depends on it.
The recommended first LLVM-oriented family id is:
llvm_cpu_v1This identifier means:
- an LLVM-oriented downstream backend-family target,
- not the definition of FROG,
- not a replacement for open FROG IR,
- not a collapse of backend contract into one private runtime implementation.
A key role of frogc is artifact visibility.
A user should be able to inspect the result of each stage rather than rely on hidden transitions.
At minimum, the current reference path should make visible:
- validation result,
- derived Execution IR,
- lowered form,
- backend contract,
- runtime result.
- Keep stage boundaries explicit.
- Prefer inspectability over hidden convenience.
- Fail explicitly when a stage is unsupported.
- Do not silently bypass validation, derivation, lowering, or contract emission.
- Keep the command surface small enough to audit.
- Keep backend-family choice explicit when it matters.
- Do not turn front-face metadata into hidden semantic law.
frogc is the visible command surface of the non-normative reference pipeline.
Its job is to expose a small, stage-aware, inspectable corridor across:
- validation,
- Execution IR derivation,
- lowering,
- backend contract emission,
- runtime execution.
For the current campaign, it should be centered primarily on:
Examples/05_bounded_ui_accumulator/main.frogThat keeps the command surface aligned with the repository’s most important near-term proof target: one fully explicit executable vertical slice.