Precision Tuning the Rust Memory-Safe Programming Language

Authors Gabriele Magnani , Lev Denisov , Daniele Cattaneo , Giovanni Agosta , Stefano Cherubin



PDF
Thumbnail PDF

File

OASIcs.PARMA-DITAM.2024.4.pdf
  • Filesize: 1.48 MB
  • 12 pages

Document Identifiers

Author Details

Gabriele Magnani
  • DEIB - Politecnico di Milano, Italy
Lev Denisov
  • DEIB - Politecnico di Milano, Italy
Daniele Cattaneo
  • DEIB - Politecnico di Milano, Italy
Giovanni Agosta
  • DEIB - Politecnico di Milano, Italy
Stefano Cherubin
  • NTNU - Norwegian University of Science and Technology, Trondheim, Norway

Cite AsGet BibTex

Gabriele Magnani, Lev Denisov, Daniele Cattaneo, Giovanni Agosta, and Stefano Cherubin. Precision Tuning the Rust Memory-Safe Programming Language. In 15th Workshop on Parallel Programming and Run-Time Management Techniques for Many-Core Architectures and 13th Workshop on Design Tools and Architectures for Multicore Embedded Computing Platforms (PARMA-DITAM 2024). Open Access Series in Informatics (OASIcs), Volume 116, pp. 4:1-4:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/OASIcs.PARMA-DITAM.2024.4

Abstract

Precision tuning is an increasingly common approach for exploiting the tradeoff between energy efficiency or speedup, and accuracy. Its effectiveness is particularly strong whenever the maximum performance must be extracted from a computing system, such as embedded platforms. In these contexts, current engineering practice sees a dominance of memory-unsafe programming languages such as C and C++. However, the unsafe nature of these languages has come under great scrutiny as it leads to significant software vulnerabilities. Hence, safer programming languages which prevent memory-related bugs by design have been proposed as a replacement. Amongst these safer programming languages, one of the most popular has been Rust. In this work we adapt a state-of-the-art precision tuning tool, TAFFO, to operate on Rust code. By porting the PolyBench/C benchmark suite to Rust, we show that the effectiveness of the precision tuning is not affected by the use of a safer programming language, and moreover the safety properties of the language can be successfully preserved. Specifically, using TAFFO and Rust we achieved up to a 15× speedup over the base Rust code, thanks to the use of precision tuning.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Compilers
  • Software and its engineering → Software safety
  • Software and its engineering → Software performance
  • Computer systems organization → Embedded software
Keywords
  • Approximate Computing
  • Memory Safety
  • Precision Tuning

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Daniele Cattaneo, Michele Chiari, Giovanni Agosta, and Stefano Cherubin. TAFFO: The compiler-based precision tuner. SoftwareX, 20:101238, 2022. URL: https://doi.org/10.1016/j.softx.2022.101238.
  2. Daniele Cattaneo, Michele Chiari, Nicola Fossati, Stefano Cherubin, and Giovanni Agosta. Architecture-aware precision tuning with multiple number representation systems. In 2021 58th ACM/IEEE Design Automation Conference (DAC), pages 673-678, 2021. URL: https://doi.org/10.1109/DAC18074.2021.9586303.
  3. Stefano Cherubin and Giovanni Agosta. Tools for reduced precision computation: a survey. ACM Computing Surveys, 53(2), April 2020. URL: https://doi.org/10.1145/3381039.
  4. Stefano Cherubin, Daniele Cattaneo, Michele Chiari, and Agosta Giovanni. Dynamic precision autotuning with TAFFO. ACM Transaction on Architecture and Code Optimization, 17(2), May 2020. URL: https://doi.org/10.1145/3388785.
  5. David G. Clarke, John M. Potter, and James Noble. Ownership types for flexible alias protection. SIGPLAN Not., 33(10):48-64, October 1998. URL: https://doi.org/10.1145/286942.286947.
  6. MITRE Corporation. The common weakness enumeration (CWE) initiative, 2021. URL: http://cwe.mitre.org/.
  7. Christian DeLozier, Richard Eisenberg, Santosh Nagarakatte, Peter-Michael Osera, Milo M.K. Martin, and Steve Zdancewic. Ironclad C++: A library-augmented type-safe subset of C++. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA '13, pages 287-304, New York, NY, USA, 2013. Association for Computing Machinery. URL: https://doi.org/10.1145/2509136.2509550.
  8. Kelsey R. Fulton, Anna Chan, Daniel Votipka, Michael Hicks, and Michelle L. Mazurek. Benefits and drawbacks of adopting a secure programming language: Rust as a case study. In Seventeenth Symposium on Usable Privacy and Security (SOUPS 2021), pages 597-616. USENIX Association, August 2021. URL: https://www.usenix.org/conference/soups2021/presentation/fulton.
  9. Chris Lattner and Vikram Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In Proceedings of the International Symposium on Code Generation and Optimization: Feedback-Directed and Runtime Optimization, CGO '04, page 75. IEEE Computer Society, 2004. Google Scholar
  10. National Security Agency (NSA). The national security agency (nsa) cybersecurity information sheet, 2022. URL: https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI_SOFTWARE_MEMORY_SAFETY.PDF.
  11. StackOverflow. 2023 developer survey. https://survey.stackoverflow.co/2023/#section-admired-and-desired-programming-scripting-and-markup-languages. Accessed: 2023-12-01.
  12. Phillip Stanley-Marbell, Armin Alaghi, Michael Carbin, Eva Darulova, Lara Dolecek, Andreas Gerstlauer, Ghayoor Gillani, Djordje Jevdjic, Thierry Moreau, Mattia Cacciotti, Alexandros Daglis, Natalie Enright Jerger, Babak Falsafi, Sasa Misailovic, Adrian Sampson, and Damien Zufferey. Exploiting errors for efficiency. ACM Computing Surveys, 53:1-39, July 2020. URL: https://doi.org/10.1145/3394898.
  13. Jesse A. Tov and Riccardo Pucella. Practical affine types. SIGPLAN Not., 46(1):447-458, January 2011. URL: https://doi.org/10.1145/1925844.1926436.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail