ABSTRACT
Utilizing parallel systems to their full potential can be challenging for general-purpose developers. A solution to this problem is to create high-level abstractions using Domain-Specific Languages (DSL). We create a stream-processing DSL for Rust, a growing programming language focusing on performance and safety. To that end, we explore Rust’s macros as a high-level abstraction tool to support an existing DSL language named SPar and perform source-to-source code transformations in the abstract syntax tree. We aim to assess the Rust source-to-source code transformations toolset and its implications. We highlight that Rust macros are powerful tools for performing source-to-source code transformations for abstracting structured stream processing. In addition, execution time and programmability results are comparable to other solutions.
- Gabriella Andrade, Dalvan Griebler, Rodrigo Santos, Marco Danelutto, and Luiz Gustavo Fernandes. 2021. Assessing Coding Metrics for Parallel Programming of Stream Processing Programs on Multi-cores. In 47th Euromicro Conference on Software Engineering and Advanced Applications (SEAA)(SEAA’21). IEEE, Pavia, Italy, na.Google Scholar
- Gabriella Andrade, Dalvan Griebler, Rodrigo Santos, and Luiz Gustavo Fernandes. 2023. A parallel programming assessment for stream processing applications on multi-core systems. Computer Standards & Interfaces 84 (March 2023), 103691. https://doi.org/10.1016/j.csi.2022.103691Google ScholarDigital Library
- Henrique C. M. Andrade, Buğra Gedik, and Deepak S. Turaga. 2014. Fundamentals of Stream Processing: Application Design, Systems, and Analytics. Cambridge University Press.Google ScholarDigital Library
- Barry Boehm, C Abts, A Brown, S Chulani, Brad Clark, Ellis Horowitz, Raymond Madachy, D.J. Reifer, and Bert Steece. 2000. Software Cost Estimation with Cocomo II.Google Scholar
- Gabriell Alves de Araujo, Dalvan Griebler, Marco Danelutto, and Luiz Gustavo Fernandes. 2020. Efficient NAS Parallel Benchmark Kernels with CUDA. In 28th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP)(PDP’20). IEEE, Västerås, Sweden, Sweden, 9–16. https://doi.org/10.1109/PDP50117.2020.00009Google ScholarCross Ref
- José Duarte and António Ravara. 2022. Taming stateful computations in Rust with typestates. Journal of Computer Languages 72 (2022), 101154. https://doi.org/10.1016/j.cola.2022.101154Google ScholarCross Ref
- Alessio Fino, Alessandro Margara, Gianpaolo Cugola, Marco Donadoni, and Edoardo Morassutto. 2021. RStream: Simple and Efficient Batch and Stream Processing at Scale. In 2021 IEEE International Conference on Big Data (Big Data). 2764–2774. https://doi.org/10.1109/BigData52589.2021.9671932Google ScholarCross Ref
- Martin Fowler. 2010. Domain-Specific Languages (Addison-Wesley Signature Series (Fowler)) (1 ed.). Addison-Wesley Professional. https://martinfowler.com/books/dsl.htmlGoogle Scholar
- Dalvan Griebler. 2016. Domain-Specific Language & Support Tool for High-Level Stream Parallelism. Ph. D. Dissertation. Faculdade de Informática - PPGCC - PUCRS, Porto Alegre, Brazil. http://tede2.pucrs.br/tede2/handle/tede/6776Google Scholar
- Dalvan Griebler, Marco Danelutto, Massimo Torquati, and Luiz Gustavo Fernandes. 2017. SPar: A DSL for High-Level and Productive Stream Parallelism. Parallel Processing Letters 27, 01 (March 2017), 1740005. https://doi.org/10.1142/S0129626417400059Google ScholarCross Ref
- Kyle Headley. 2018. A DSL embedded in Rust. IFL 2018: Proceedings of the 30th Symposium on Implementation and Application of Functional Languages, 119–126. https://doi.org/10.1145/3310232.3310241Google ScholarDigital Library
- Renato B. Hoffmann, Dalvan Griebler, Marco Danelutto, and Luiz G. Fernandes. 2020. Stream Parallelism Annotations for Multi-Core Frameworks. In XXIV Brazilian Symposium on Programming Languages (SBLP)(SBLP’20). ACM, Natal, Brazil, 48–55. https://doi.org/10.1145/3427081.3427088Google ScholarDigital Library
- Renato B. Hoffmann, Júnior Löff, Dalvan Griebler, and Luiz G. Fernandes. 2022. OpenMP as Runtime for Providing High-Level Stream Parallelism on Multi-Cores. Journal of Supercomputing 78, 6 (apr 2022), 7655–7676. https://doi.org/10.1007/s11227-021-04182-9Google ScholarDigital Library
- ISO/IEC-14882:2011. 2011. Information Technology - Programming Languages - C++. Technical Report. International Standard, Geneva, Switzerland.Google Scholar
- S. Klabnik and C. Nichols. 2023. The Rust Programming Language, 2nd Edition. No Starch Press. https://books.google.com.br/books?id=SE2GEAAAQBAJGoogle Scholar
- Júnior Löff, Renato Barreto Hoffmann, Dalvan Griebler, and Luiz G. Fernandes. 2021. High-Level Stream and Data Parallelism in C++ for Multi-Cores. In XXV Brazilian Symposium on Programming Languages (SBLP)(SBLP’21). ACM, Joinville, Brazil.Google ScholarDigital Library
- Timothy Mattson, Beverly Sanders, and Berna Massingill. 2004. Patterns for Parallel Programming (first ed.). Addison-Wesley Professional.Google ScholarDigital Library
- Marjan Mernik, Jan Heering, and Anthony M. Sloane. 2005. When and How to Develop Domain-Specific Languages. ACM Comput. Surv. 37, 4 (dec 2005), 316–344. https://doi.org/10.1145/1118890.1118892Google ScholarDigital Library
- Ricardo Pieper, Dalvan Griebler, and Luiz G. Fernandes. 2019. Structured Stream Parallelism for Rust. In XXIII Brazilian Symposium on Programming Languages (SBLP)(SBLP’19). ACM, Salvador, Brazil, 54–61. https://doi.org/10.1145/3355378.3355384Google ScholarDigital Library
- Ricardo Pieper, Júnior Löff, Renato Berreto Hoffmann, Dalvan Griebler, and Luiz Gustavo Fernandes. 2021. High-level and Efficient Structured Stream Parallelism for Rust on Multi-cores. Journal of Computer Languages na, na (July 2021), na.Google ScholarCross Ref
- Ricardo Luis Pieper. 2020. High-level Programming Abstractions for Distributed Stream Processing. Master’s Thesis. School of Technology - PPGCC - PUCRS, Porto Alegre, Brazil.Google Scholar
- Rayon. 2019. Rayon. https://github.com/rayon-rs/rayon Accessed on 27.03.2021.Google Scholar
- Dinei André Rockenbach. 2020. High-Level Programming Abstractions for Stream Parallelism on GPUs. Master’s Thesis. School of Technology - PPGCC - PUCRS, Porto Alegre, Brazil.Google Scholar
- Arash Sahebolamri, Thomas Gilray, and Kristopher Micinski. 2022. Seamless Deductive Inference via Macros. In Proceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction (Seoul, South Korea) (CC 2022). Association for Computing Machinery, New York, NY, USA, 77–88. https://doi.org/10.1145/3497776.3517779Google ScholarDigital Library
- Stefan Sydow, Mohannad Nabelsee, Sabine Glesner, and Paula Herber. 2020. Towards Profile-Guided Optimization for Safe and Efficient Parallel Stream Processing in Rust. In 2020 IEEE 32nd International Symposium on Computer Architecture and High Performance Computing (SBAC-PAD). 289–296. https://doi.org/10.1109/SBAC-PAD49847.2020.00047Google ScholarCross Ref
- William Thies, Michal Karczmarek, and Sama Amarasinghe. 2017. StreamIt: A Language for Streaming Applications. In International Conference on Compiler Construction. 179–196.Google Scholar
- Tokio. 2019. Tokio - The asynchronous runtime for the Rust programming language. https://tokio.rs Accessed on 27.03.2021.Google Scholar
Recommendations
Source-Level Compiler Optimizations for High-Level Synthesis
SEEDA-CECNSM '16: Proceedings of the SouthEast European Design Automation, Computer Engineering, Computer Networks and Social Media ConferenceWith high-level synthesis becoming the preferred method for hardware design, tools that operate on high-level programming languages and optimize hardware output are crucial for successful synthesis. In high-level synthesis, conventional programming ...
Source-to-Source Compilation via Submodules
ELS2016: Proceedings of the 9th European Lisp Symposium on European Lisp SymposiumRacket's macro system enables language extension and definition primarily for programs that are run on the Racket virtual machine, but macro facilities are also useful for implementing languages and compilers that target different platforms. Even when ...
Mixing source and bytecode: a case for compilation by normalization
Language extensions increase programmer productivity by providing concise, often domain-specific syntax, and support for static verification of correctness, security, and style constraints. Language extensions can often be realized through translation ...
Comments