Interop

Lena Code Interop

How Topaz functions as a source or target language in Lena Code conversions.

Lena Code is an independent source-to-source conversion product. Topaz serves as an input or output language only when Lena Code's published support explicitly includes that exact language pair. The handoff boundary is source code, not a shared runtime or an extension of Topaz grammar.

Before converting

The current language-pair and program-shape list published by Lena Code defines its convertible inputs. Programs outside that list use another conversion path. Record the Lena Code version so the conversion can be reproduced.

When Topaz is the target

A generated .tpz file is candidate Topaz source code, not certified output. Review its contents and diff, then validate it using the current Topaz toolchain:

BASH
topaz parse converted.tpz
topaz check converted.tpz
topaz run converted.tpz
topaz build converted.tpz --out-dir converted-build --run

After completing the parse, check, run, and build stages, compare application-relevant outputs, error conditions, data changes, API interactions, effects, and failure handling between the source and converted programs.

When Topaz is the source

When Topaz is the source language, Lena Code defines and manages the mapping to the destination language and host environment. Review destination APIs, data representation, effects, and failure handling as part of the conversion.

Product and syntax boundary

Topaz and Lena Code do not automatically share an ABI, package manager, runtime, or deployment bundle. Foreign-language source code belongs in clearly labeled interop examples and never defines canonical Topaz syntax. If a converter produces a form that current Topaz does not support, topaz check rejects it.