Skip to content

MAGE's Source Tree

Sam Kumar edited this page Mar 28, 2021 · 1 revision

The MAGE system can be understood as encompassing several layers. This is shown in Figure 2 in the OSDI 2021 paper, reproduced below:

MAGE's source code is in the src/ directory. Each layer in MAGE corresponds roughly to a subdirectory of src/:

  1. The programs that are run using MAGE are, collectively, the "Application" layer. Such programs are in the programs/ directory. This includes any application-specific code shared by multiple programs (e.g., the Record data structure in util.hpp.
  2. MAGE's DSLs are implemented in the dsl/ directory. This includes any libraries that are broadly useful to multiple application (e.g., the ShardedArray library in array.hpp).
  3. MAGE's planner is implemented in the memprog/ directory.
  4. MAGE's engines are implemented in the engine/ directory.
  5. Protocol drivers (e.g., implementations of HalfGates and CKKS) are implemented in the protocols/ directory. Any cryptographic routines that may be shared across multiple protocols (e.g., implementations of pseudorandom functions) are implemented in crypto/.

Utilities shared by MAGE's different layers are implemented in the utils/ directory. Shared definitions specific to MAGE's planning, such as MAGE's instruction formats, are implemented in header files directly in src/ (not in any subdirectory); they can be extended with new instruction types. Wrappers around system calls are implemented in the platform/ directory, to make it easier to port MAGE to a different platform. Finally, the source code for executable driver programs is in the executables/ directory.

Clone this wiki locally