Interop

Lena Code Interop

How Topaz can be used as a source or target language in Lena Code conversions.

Lena Code is a separate source-conversion product. Topaz can be an input or output language only when Lena Code's published support includes that exact language pair. The handoff is source code, not a shared runtime and not an extension of Topaz grammar.

Before converting

Check the current language-pair support published by Lena Code before relying on a conversion. Support for one pair or one program shape does not imply support for every program. Record the Lena Code version you used so the conversion can be reproduced.

When Topaz is the target

A generated .tpz file is candidate Topaz source, not certified output. Review its contents and diff, then validate it with 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

These commands establish that Topaz can parse, check, run, and build the candidate. They do not prove that the conversion preserved the source program's meaning. Compare the outputs, errors, data changes, and other observable behavior that matter to your application.

When Topaz is the source

Lena Code owns the mapping from Topaz into the destination language and its host behavior. Review destination APIs, data representation, effects, and failure handling as part of the conversion. Passing topaz check on the source does not validate the generated destination program.

Product and syntax boundary

Topaz and Lena Code do not automatically share an ABI, package manager, runtime, or deployment bundle. Foreign-language source 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.