Generate the code

Step 3 of the TVB-O spine: compile one specification into backend-native source, a study directory and a runnable workflow.

TVB-O does not interpret your specification at run time. It compiles it: the adapter for the target backend resolves everything that can be resolved in Python, and a template emits concrete, readable source — a JAX solve_fn, a TVB model class, a Julia system, a C kernel, a plot.py. That file is the deliverable. It is what you attach to a paper, and it is what a reviewer reads when they want to know what was actually integrated.

The same compilation writes the study directory the run will fill, so a spec, its generated code, its results and its figures all sit in one predictable layout.

Next

The generated code has to run somewhere: ④ Run.