A Development Platform for Embedded Domain-Specific Languages
The use of domain-specific languages (DSLs) is a promising approach to helping programmers write an efficient program for high-performance computing. The programmers would feel difficulties in writing such a program by hand with only low-level abstractions, such as arrays and loops, provided by a general-purpose language. This chapter presents our new implementation technique for domain-specific languages. Since existing techniques are not satisfactory, we developed our technique called deep reification. This chapter also presents Bytespresso, which is our prototype system to use deep reification. Several Java-embedded DSLs implemented with Bytespresso are presented to assess the effectiveness of deep reification and Bytespresso. Program fragments written in these DSLs are embedded in Java, but they are dynamically off-loaded to native hardware to obtain good execution performance. Since they are embedded in Java, the syntax of Java is reused by those DSLs, and hence the development costs of these DSLs are reduced.
I would like to thank Maximilian Scherr and Toshiyuki Takahashi for their various contributions to this work. This is partly supported by JST/DFG SPPEXA ExaStencil project. We deeply thank Christian Lengauer, Sebastian Kuckuk, Christian Schmitt, Matthias Bolten, Frank Hannig, and Harald Köstler. We also thank Shuichi Chiba at Fujitsu Ltd. for the experiment on FX10.
- 2.Chiba, S., Zhuang, Y., Scherr, M.: Deeply reifying running code for constructing a domain-specific language. In: Proceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools, PPPJ ’16, pp. 1:1–1:12. ACM, New York (2016)Google Scholar
- 3.Fowler, M.: Fluentinterface (2005). https://www.martinfowler.com/bliki/FluentInterface.html Google Scholar
- 5.Jovanovic, V., Shaikhha, A., Stucki, S., Nikolaev, V., Koch, C., Odersky, M.: Yin-yang: concealing the deep embedding of DSLs. In: Proceedings of the 2014 International Conference on Generative Programming: Concepts and Experiences, GPCE 2014, pp. 73–82. ACM, New York (2014)Google Scholar
- 7.Nakamaru, T., Ichikawa, K., Yamazaki, T., Chiba, S.: Silverchain: A fluent API generator. In: Proceedings of the 16th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, GPCE 2017, pp. 199–211. ACM, New York (2017)Google Scholar
- 8..NET Foundation: The .net compiler platform “roslyn” (2014). https://github.com/dotnet/roslyn
- 9.Nyland, L., Harris, M., Prins, J.: Fast n-body simulation with CUDA. In: Nguyen, H. (ed.) GPU Gems 3, chap. 31, pp. 677–695. Addison-Wesley, Boston (2007)Google Scholar
- 12.Rompf, T., Odersky, M.: Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs. In: Proceedings of the Ninth International Conference on Generative Programming and Component Engineering, GPCE ’10, pp. 127–136. ACM, New York (2010)Google Scholar
- 13.Rompf, T., Sujeeth, A.K., Brown, K.J., Lee, H., Chafi, H., Olukotun, K.: Surgical precision JIT compilers. In: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’14, pp. 41–52. ACM, New York (2014)Google Scholar
- 14.The Eclipse Foundation: Eclipse IDE (2001). http://www.eclipse.org