ShellRS
ShellRS는 Rust로 작성된 무료 오픈소스 SSH 클라이언트
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Team 14 · Compiler Design (L43+L44) · Vellore Institute of Technology · Release v1.0.0
PGARA is a complete compiler for MiniC, a small C subset, built around a new register allocator. A profiling run measures how often each branch is taken. Every SSA value is then modelled as a two-state Markov decision process (register or memory) to compute the cycles a register would save, and registers are sold in a sealed-bid auction on the chordal interference graph, settled by best-response dynamics into a Nash equilibrium. No graph colouring is used. A web interface, PGARA Compiler Studio, shows every phase of compilation as you type.
manuscript/PGARA-FINAL.pdfmanuscript/PGARA-Manuscript-LaTeX.zipdocs/demo/ (about 8 min 40 s); script in docs/PGARA-Demo-Video-Script.pdf| # | Required item | Where |
|---|---|---|
| 1 | Manuscript LaTeX (zip, all images and class files, compiles on Overleaf) | manuscript/PGARA-Manuscript-LaTeX.zip (unzipped copy in manuscript/latex/) |
| 2 | Source code | pgara/ (compiler and allocators), web/ (GUI), server.py, api/ (Vercel entry point) |
| 3 | README | this file |
| 4 | Dependencies | requirements.txt (standard library only), requirements-dev.txt (optional tools) |
| 5 | Datasets and preprocessing | benchmarks/ (22 MiniC programs), datasets/benchmark_inputs.json, scripts/prepare_datasets.py |
| 6 | Trained models | none: PGARA learns nothing offline; its only "model" is the per-program profile, computed at compile time |
| 7 | Configuration files | configs/experiments.json, configs/server.example.env, vercel.json |
| 8 | Execution scripts | scripts/ (setup, tests, GUI, experiments, benchmark, single compile; .sh and .bat) |
| 9 | Results, metrics, sample outputs | results/ (see results/README.md) |
| 10 | Documentation | manuscript/PGARA-FINAL.pdf, guide/PGARA-Project-Guide.pdf, docs/screenshots/ |
| 11 | Demo video | docs/demo/ |
pgara/ compiler: lexer, parser, semantic, irgen, cfg, ssa, optimize, interp,
regalloc (PGARA + 6 baselines), codegen, simulator, pipeline, bench, experiments
tests/ 27 unit and end-to-end tests
benchmarks/ original suite (10) · extra/ independent suite (7, MiBench/BEEBS) · tuning/ (5)
datasets/ inputs and reference outputs of every program (generated, verified)
configs/ experiment settings and GUI settings template
scripts/ setup and execution scripts
results/ experimental results (JSON), summary tables, sample outputs
manuscript/ final PDF and LaTeX sources
docs/ demo video and script, full GUI screenshots
web/, server.py PGARA Compiler Studio (web GUI)
coverage and playwright (requirements-dev.txt) only to measure coverage or regenerate screenshots.git clone https://github.com/shreyans-chowdry/pgara.git
cd pgara
python3 -m pip install -r requirements.txt # installs nothing: no runtime dependencies
scripts/setup.sh # checks Python and verifies all benchmark programs
On Windows use python instead of python3, and run the .bat scripts.
configs/experiments.json holds every setting used for the manuscript: register budgets k = 3–32, hot-edge threshold θ = 0.75, gain policy and cost-model constants (load 4, store 2, σ = 1, c_mv = 1). Pass it with --config; scripts/run_experiments.sh does this for you.configs/server.example.env: copy it to configs/server.env to change the GUI port or stop the browser from opening.| Task | Command | Time |
|---|---|---|
| Start the web GUI | scripts/run_gui.sh (or start.sh, start.command, start.bat, python3 server.py) → http://127.0.0.1:8765/ | instant |
| Run all tests | scripts/run_tests.sh (Windows: scripts\run_tests.bat) | 1–3 min |
| Reproduce every result of the paper | scripts/run_experiments.sh (Windows: scripts\run_experiments.bat) | 15–25 min |
| Run selected studies | scripts/run_experiments.sh main inputs | |
| Quick four-allocator study | scripts/run_benchmark.sh | 10 s |
| Compile one program | scripts/compile_example.sh benchmarks/05_rarebranch.mc 4 "7 10" "13 10" | 1 s |
| Rebuild sample outputs | python3 scripts/sample_outputs.py | 1 s |
| Summarise results | python3 scripts/summarise_results.py | 1 s |
There is no training step: PGARA's only learned quantity is the per-program profile, which is measured during compilation.
The studies of python3 -m pgara.experiments are:
| Study | What it does |
|---|---|
tuning | chooses θ on the held-out suite benchmarks/tuning (never used in reported results) |
main | 17 programs, seven allocators, k = 3, 4, 5, 6, 8, 16, 32 |
inputs | five test inputs per program at k = 4 |
errsweep | rare-branch, training error rate 1%–60% |
costs | sensitivity to the model constants σ and c_mv |
policy | realised (always-in-register) gain vs optimal-policy gain |
scaling | allocation time on generated programs of growing size |
The allocators are PGARA, Static-Prior PGARA, profiled-frequency priority (ablation), loop-depth priority, Chaitin–Briggs with static and with profile-weighted spill costs, and linear scan.
A fresh clone was set up in a clean Python 3 environment with no extra packages. scripts/setup.sh, scripts/run_tests.sh (27 tests, OK) and scripts/run_experiments.sh main all ran successfully, and results/v2/main.json was reproduced exactly.
At k = 4, over 17 programs (geometric mean), PGARA needs:
It also executes 50% fewer spill memory operations than linear scan. All 1,428 compiled configurations match the reference output. See results/README.md.
input() reads the next one.Errors appear under the editor and in red in the gutter. Click an error to jump to its line.
| Tab | What it shows |
|---|---|
| Tokens | The token stream from the maximal-munch DFA lexer, colour-coded by kind: keywords purple, identifiers blue, numbers orange, operators pink. Hover a token to highlight it in the source. |
| AST | An interactive syntax tree. Drag to pan, scroll to zoom, click a node to fold it. Colours show declarations (indigo), control flow (violet), statements (green), expressions (orange) and leaves (blue). |
| Symbols | The scoped symbol table, one card per scope, with unique IR names, kinds, types and reference counts. |
| TAC | Three-address code. Use the step buttons or Play to emit it one instruction at a time. |
| SSA & Optimiser | Pruned SSA with φ-functions, then the optimised SSA, with a log of each optimisation pass. |
| CFG | The control-flow graph. Block headers are coloured by how often they ran (blue for rare, red for hot). Each edge shows its profiled probability (static prior). Violet dashed edges are loop back edges. |
| Allocation | The interference graph, with each register in its own colour and spilled values in red dashed outline. A table lists each value's MDP gain G(v), coalition bid, live-range size and policy-iteration rounds. It also shows every sealed-bid auction round (winners green, losers red) and the perfect elimination ordering. |
| Target Code | PG-RISC assembly that you can step through. Spill loads and stores are tagged red, caller-save code amber, φ copies violet and forwarded loads green. Hover a line to see the IR it came from. |
| Run & Metrics | The output of the reference interpreter. It also compares all four allocators on cycles, instructions, loads and stores, spill memory operations, register utilisation, code size and realised gain, with bar charts. The best allocator is highlighted green. |
| Grammar | The LL(1) grammar (41 nonterminals, 94 productions), its FIRST and FOLLOW sets, and the predictive-table check. The only conflict is the dangling else. |
break/continue placement and missing returns, and gives every symbol a unique IR name.&&, || and !.The GUI compares four allocators: PGARA, Static-Prior PGARA (no profile), loop-depth priority (Chow–Hennessy style) and linear scan (Poletto–Sarkar). The experiment harness adds profiled-frequency priority and Chaitin–Briggs with static and with profile-weighted spill costs.
int data[100]; // global array
int sum(int a[], int n) { // array parameters are passed by reference
int s = 0;
for (int i = 0; i < n; i++) s += a[i];
return s;
}
int main() {
int n = input(); // reads the next number from the input box
for (int i = 0; i < n; i++) data[i] = i * i;
if (n > 0 && sum(data, n) % 2 == 0) print(1); else print(0);
return 0;
}
| Feature | Supported forms |
|---|---|
| Types | int scalars, int arrays, void functions |
| Control flow | if/else, while, for, break, continue, return |
| Operators | + - * / %, < <= > >= == !=, `&& |
| Assignment | = += -= *= ++ -- |
| Input and output | input() and print(expr) |
| Member | Registration No. | Role |
|---|---|---|
| Shreyans Chowdry | 24BDS0114 | Core pipeline design, lexical and syntax analysis, AST construction, intermediate code generation, web GUI; in the allocator: transition matrices, block frequencies, φ-web coalitions |
| Samrender Singh Saini | 24BCE2865 | Semantic analysis, scope resolution and symbol table management; in the allocator: interference graph, MCS order, sealed-bid auction and binding |
| Karthikeya Jami | 24BCE2136 | SSA, optimisation engine and PG-RISC code generation; in the allocator: residency MDP, policy iteration and gains |
| Abhishek Kumar | 24BCE0585 | Runtime environment, simulator, test suite and benchmarking; in the allocator: best response, coalition repair, baselines and ablations |
| Nishanth Kumar | 24BAI0194 | Documentation and interface testing support |
The guide folder holds PGARA-Project-Guide.pdf, a plain-language explanation of the project written for Draft 1; numbers in it predate the revised evaluation, which is in the manuscript.