Linker
A linker is used to turn an AIR tree into a single PIL file. The linking process operates in the following way:
- Create an empty PIL file
- Start from the main AIR. Let
main_degree_range
be its degree after replacing any unspecified bounds with a default value. Ifmain_degree_range
is a single value, we are in the monolithic case. Otherwise, we're in the composite case. - For each AIR
- Create a new namespace in the PIL file
2a. In the monolithic case, set the namespace degree to
main_degree_range
2b. In the composite case, set the namespace degree to that of the AIR, replacing any unspecified bounds with a default value - Add the constraints to the namespace
- Turn the links into lookups and add them to the namespace
- Create a new namespace in the PIL file
2a. In the monolithic case, set the namespace degree to
The result is a monolithic AIR where:
- each machine instance is a namespace
- each namespace defines its own degree range