Expand description
This module defines a function to initialize a Sail architecture specification. The function initialize_architecture takes a mutable reference to some parsed IR with it’s symbols interned into a Symtab, and produces a SharedState struct, along with Bindings environments for both the registers and the global let bindings.
The general flow to load and initialize a Sail specification is as follows:
-
Load the architecture
.irfile, containing the compiled Jib IR produced by Sail. -
Then create a symbol table and intern the IR symbols producing new IR with identifiers of type Name.
-
Next load the ISA configuration file to generate an ISAConfig. This configuration can refer to symbols in the architecture which is why we need to produce the symbol table before loading this.
-
Finally use the initialize_architecture function in this module to set up everything ready for symbolic execution.