Compilers¶
IR¶
- MIR: https://github.com/vnmakarov/mir
- LLVM:
- https://github.com/numba/llvmlite Python wrapper used by Numba
- See numpile (below)
- Mapping High Level Constructs to LLVM IR
- PPCI: https://pypi.org/project/ppci/ (Dead)
- QBE: https://c9x.me/compile/
- Translates programs written in QBE IR language to ASM (ia64, arm64 or rv64)
Code generation¶
See: Code generation
Type checking¶
https://mukulrathi.com/create-your-own-programming-language/intro-to-type-checking/
Learn¶
Basic¶
- https://chocopy.org/ : ChocoPy is a programming language designed for classroom use in undergraduate compilers courses. ChocoPy is a restricted subset of Python 3, which can easily be compiled to a target such as RISC-V. Tooling is in Java.
- https://github.com/windelbouwman/sauce-os
Advanced¶
- https://www.cs.cornell.edu/courses/cs6120/2020fa/ : CS 6120: Advanced Compilers
Program transformation¶
- For Python: look at Bowler, Fissix.
- Example use: https://github.com/craigds/decrapify
Examples compilers¶
Simple C compilers¶
More interesting projects¶
- https://github.com/adamsol/Pyxell “Multi-paradigm programming language compiled to C++, written in Python.” (3000 LOC of Python + 3000 LOC of C++)
- See also: https://www.pyxell.org/docs/
- https://github.com/xdslproject “A Python Compiler Design Toolkit”
- https://github.com/ShivamSarodia/ShivyC “C compiler created in Python.”
- https://github.com/sdiehl/numpile - A tiny 1000 line LLVM-based numeric specializer for scientific Python code.
Libjit¶
- https://www.stephendiehl.com/posts/libjit/
- https://github.com/gergo-/pylibjit / https://publik.tuwien.ac.at/files/PubDat_228436.pdf
Books¶
Resources¶
META II & OMeta¶
- http://www.chilton-computing.org.uk/acl/literature/reports/p025.htm
- https://www.bayfronttechnologies.com/mc_tutorial.html
- https://en.wikipedia.org/wiki/META_II
- https://en.wikipedia.org/wiki/OMeta
- https://github.com/vkazanov/pymetaii (Python implementation)
#compiler #python #programming #java
Page last modified: 2024-11-16 21:33:39