forked from M-Labs/nac3
1
0
Fork 0
New ARTIQ compiler, third iteration
Go to file
Sebastien Bourdeauducq bf48151748 nac3embedded: do not use *.so for output to avoid confusing cpython 2021-09-24 13:25:48 +08:00
nac3core nac3core/type_inferencer: avoid type var for assign 2021-09-22 19:25:47 +08:00
nac3embedded nac3embedded: do not use *.so for output to avoid confusing cpython 2021-09-24 13:25:48 +08:00
nac3standalone nac3standalone: added thread number arg 2021-09-23 20:02:56 +08:00
.gitignore nac3embedded: basic source extraction 2020-12-18 23:45:09 +08:00
Cargo.lock Merge remote-tracking branch 'origin/master' into optimization 2021-09-23 19:58:24 +08:00
Cargo.toml nac3core: use string interning 2021-09-22 18:04:06 +08:00
README.md updated readme 2021-06-28 17:17:08 +08:00
shell.nix shell.nix: fix syntax 2021-09-24 12:53:48 +08:00

README.md

nac3 compiler

This repository contains:

  • nac3core: Core compiler library, containing type-checking, static analysis (in the future) and code generation.
  • nac3embedded: Integration with CPython runtime.
  • nac3standalone: Standalone compiler tool.

The core compiler would know nothing about symbol resolution, host variables etc. The nac3embedded/nac3standalone library would provide (implement) the symbol resolver to the core compiler for resolving the type and value for unknown symbols. The core compiler would only type check classes and functions requested by the nac3embedded/nac3standalone lib (the API should allow the caller to specify which methods should be compiled). After type checking, the compiler would analyse the set of functions/classes that are used and perform code generation.

value could be integer values, boolean values, bytes (for memcpy), function ID (full name + concrete type)

Current Plan

Type checking:

  • Basic interface for symbol resolver.
  • Track location information in context object (for diagnostics).
  • Refactor old expression and statement type inference code. (anto)
  • Error diagnostics utilities. (pca)
  • Move tests to external files, write scripts for testing. (pca)
  • Implement function type checking (instantiate bounded type parameters), loop unrolling, type inference for lists with virtual objects. (pca)