A Development Platform for Embedded Domain-Specific Languages

  • Shigeru ChibaEmail author
  • YungYu Zhuang
  • Thanh-Chung Dao


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.


  1. 1.
    Boehm, H.J., Weiser, M.: Garbage collection in an uncooperative environment. Softw. Pract. Exp. 18(9), 807–820 (1988)CrossRefGoogle Scholar
  2. 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. 3.
  4. 4.
    Himeno, R.: Himeno benchmark (2001). Google Scholar
  5. 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
  6. 6.
    Kuckuk, S., Haase, G., Vasco, D.A., Köstler, H.: Towards generating efficient flow solvers with the ExaStencils approach. Concurr. Comput. Pract. Exp. 29(17), 4062:1–4062:17 (2017)CrossRefGoogle Scholar
  7. 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. 8.
    .NET Foundation: The .net compiler platform “roslyn” (2014).
  9. 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
  10. 10.
    Quinlan, D., Schordan, M., Miller, B., Kowarschik, M.: Parallel object-oriented framework optimization. Concurr. Comput. Pract. Exp. 16(2–3), 293–302 (2004)CrossRefGoogle Scholar
  11. 11.
    Rompf, T., Amin, N., Moors, A., Haller, P., Odersky, M.: Scala-virtualized: linguistic reuse for deep embeddings. Higher-Order Symb. Comput. 25(1), 165–207 (2012)CrossRefGoogle Scholar
  12. 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. 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. 14.
    The Eclipse Foundation: Eclipse IDE (2001).

Copyright information

© Springer Nature Singapore Pte Ltd. 2019

Authors and Affiliations

  1. 1.The University of TokyoBunkyo-kuJapan
  2. 2.National Central UniversityTaoyuan CityTaiwan (R.O.C.)
  3. 3.School of Information and Communication TechnologyHanoi University of Science and TechnologyHanoiVietnam

Personalised recommendations