2021-09-27 10:30:54 +08:00
|
|
|
# NAC3 compiler
|
2021-06-25 12:28:33 +08:00
|
|
|
|
|
|
|
This repository contains:
|
2021-11-03 17:22:14 +08:00
|
|
|
- nac3ast: Python abstract syntax tree definition (based on RustPython).
|
|
|
|
- nac3parser: Python parser (based on RustPython).
|
2021-09-27 10:30:54 +08:00
|
|
|
- nac3core: Core compiler library, containing type-checking and code
|
|
|
|
generation.
|
2021-11-03 17:22:14 +08:00
|
|
|
- nac3standalone: Standalone compiler tool (core language only).
|
2021-09-27 10:30:54 +08:00
|
|
|
- nac3artiq: Integration with ARTIQ and implementation of ARTIQ-specific
|
|
|
|
extensions to the core language.
|
2021-11-03 17:22:14 +08:00
|
|
|
- runkernel: Simple program that runs compiled ARTIQ kernels on the host
|
|
|
|
and displays RTIO operations. Useful for testing without hardware.
|
|
|
|
|
2021-09-27 10:30:54 +08:00
|
|
|
|
|
|
|
The core compiler knows nothing about symbol resolution, host variables
|
|
|
|
etc. nac3artiq and nac3standalone provide (implement) the
|
2021-06-25 12:28:33 +08:00
|
|
|
symbol resolver to the core compiler for resolving the type and value for
|
2021-09-27 10:30:54 +08:00
|
|
|
unknown symbols. The core compiler only type checks classes and functions
|
|
|
|
requested by nac3artiq/nac3standalone (the API should allow the
|
2021-06-25 12:28:33 +08:00
|
|
|
caller to specify which methods should be compiled). After type checking, the
|
2021-09-27 10:30:54 +08:00
|
|
|
compiler analyses the set of functions/classes that are used and performs
|
2021-06-25 12:28:33 +08:00
|
|
|
code generation.
|
|
|
|
|
|
|
|
value could be integer values, boolean values, bytes (for memcpy), function ID
|
|
|
|
(full name + concrete type)
|