writeStringArray(ModelTypes.annotations, model.annotations);
}
final Map<String, Integer> varIdx = new LinkedHashMap<>();
final VariableInformation[] variables = model.variables;
for (int i = 0; i < variables.length; i++) {
final VariableInformation vi = variables[i];
varIdx.put(vi.name, i);
writeVariable(vi);
}
for (final InternalInformation ii : model.internals) {
writeInternal(ii, varIdx.get(ii.info.name));