MEĐUREPREZENTACIJE IZVORNOG KODA RUSTC KOMPAJLERA
DOI:
https://doi.org/10.24867/33BE08BajatKljučne reči:
rustc, kompajler, međureprezentacijeApstrakt
Ovaj rad istražuje arhitekturu prednjeg kraja (engl. frontend) Rust kompajlera (rustc), sa fokusom na ključnu ulogu koju međureprezentacije izvornog koda igraju u procesu prevođenja. Analizirane su faze od leksičke analize i parsiranja do generisanja Apstraktnog Sintaksnog Stabla (ASS), preko Međureprezentacije Visokog Nivoa (MVN/HIR), Tipizirane MVN (TMVN/THIR), do Međureprezentacije Srednjeg Nivoa (MSN/MIR). Rad objašnjava kako svaka od ovih reprezentacija omogućava ključne funkcionalnosti Rust jezika, uključujući proveru tipova, dijagnostiku grešaka, inkrementalno kompajliranje, proveru pozajmljivanja (borrow checking) i pripremu za dalju optimizaciju i generaciju koda u LLVM-u. Cilj je da se prikaže kako generisanje infrastrukture doprinosi garancijama memorijske bezbednosti i visokim performansama Rust programskog jezika.
Reference
[1] MSRC, “A proactive approach to more secure code | MSRC Blog | Microsoft Security Re-
sponse Center,” Microsoft.com, Jul. 16, 2019. https://msrc.microsoft.com/blog/2019/07/
a-proactive-approach-to-more-secure-code/ (pristupljeno u septembru 2024.)
[2] “Parsing” Rochester.edu, 2024. https://www.cs.rochester.edu/u/nelson/courses/csc_
173/grammars/parsing.html#:~:text=Recursive%2Ddescent%20parsing%20is%20one,
non%2Dterminal%20with%20a%20procedure (pristupljeno u septembru 2024.)
[3] A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman, Compilers: Principles, Techniques, and Tools, 2nd ed. Boston, MA, USA: Addison-Wesley, 2006.
[4] “Getting Started - Rust Compiler Development Guide,” Rust-lang.org, 2024. https:
//rustc-dev-guide.rust-lang.org/getting-started.html (pristupljeno u Septembru 2024.)
[5] “Introduction - The Rust Reference,” Rust-lang.org, 2015. https://doc.rust-lang.org/
reference/introduction.html (pristupljeno u septembru 2024.)
[6] “Meet Safe and Unsafe - The Rustonomicon,” Rust-lang.org, 2024. https://doc.rust-lang.
org/nomicon/meet-safe-and-unsafe.html (pristupljeno u septembru 2024)
[7] “What are editions? - The Rust Edition Guide,” Rust-lang.org, 2024. https://doc.rust-lang.
org/edition-guide/editions/ (pristupljeno u oktobru 2024.)
[8] “The Unstable Book - The Rust Unstable Book,” Rust-lang.org, 2024. https://doc.rust-lang.
org/unstable-book/index.html (pristupljeno u oktobru 2024.)
[9] Li, Chenghao, et al. “Demystifying Compiler Unstable Feature Usage and Impacts in the Rust Ecosys-
tem.” 26 Oct. 2023. arXiv, (pristupljeno u oktobru 2024.)
[10] Bugden W, Alahmar A. Rust: The programming language for safety and performance. arXiv preprint arXiv:2206.05503. 2022 Jun 11.
[11] P. Mainardi, “The Rising Threat of Software Supply Chain Attacks: Managing Dependencies of Open Source projects,” Linuxfoundation.eu, Aug. 15, 2023. https://linuxfoundation.eu/newsroom/
the-rising-threat-of-software-supply-chain-attacks-managing-dependencies-of-open-source-p
(pristupljeno u oktobru 2024.)
[12] “The Architecture of Open Source Applications (Volume 1)LLVM,” Aosabook.org, 2024. https:
//aosabook.org/en/v1/llvm.html (pristupljeno u novembru 2024.)
[13] “The LLVM Compiler Infrastructure Project,” Llvm.org, 2024. https://llvm.org/ (pristupljeno u novembru 2024.)