Skip to content
프로젝트

소개

가비지 컬렉터가 필요하지 않을 수도 있습니다.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

micro-mitten

metal's too hot? wear a mitten!

Build Status

micro-mitten??

micro-mitten is a bare-bones Rust-like programming language, stripped down to simplify control-flow structures and the type system.

Like Rust, micro-mitten offers a static approach to memory management; however, micro-mitten's approach is significantly different from Rust's. Rather than depending on single ownership and a complex lifetime system, micro-mitten uses a series of data-flow analyses to statically approximate heap liveness. This means that it maintains the ability to insert freeing code at appropriate program points, without putting restrictions on how you write your code. The theory behind the approach is documented in this thesis (Proust 2017).

Long story short, this is an attempt to see if we really can have unrestrictive compile-time garbage collection.

How can I use it?!

The project depends on libgc and the LLVM-8 toolchain. Cloning this repository and running the following should get you set up with a working copy of mmtnc (the micro-mitten compiler).

./tools.sh # installs `mitten-test`, `mitten-bench`, `knit` and the language runtime
cargo install --path ./ --force # installs `mmtnc`

mmtnc compiles .mmtn files to LLVM IR (.ll) and just dumps the textual representation. Much more helpfully, you can get binaries directly using knit. To build a binary (example) from a source file (example.mmtn) use:

knit --src example.mmtn --gc-strategy=proust 

The --gc-strategy argument is optional, but the default is to use no garbage collection (your computer will hate you). The other options are proust (uses static memory management) and bdw (uses libgc).

Notes

To get an idea of the language syntax, check out the examples in src/test/. If you get something wrong, the compiler should moan at you. Otherwise, please open an issue!

Please note, micro-mitten is purely a research language and its performance is not brilliant when using static memory management. For a full run-down, see my dissertation. Most of the examples in src/test/ will run with static memory management, but there are some notable exceptions and one or two memory leaks.

관련 프로젝트 살펴보기

불러오는 중…