A Conversion Framework of the Continuous Modeling Languages Based on ANTLR4

  • Zhen Chen,
  • Lin Zhang ,
  • Xiaohang Wang,
  • Pengfei Gu,
  • Fei Ye
  • a,b,c,d,e  Beihang University, 37-Xueyuan Road-Haidian, Beijing, 100191, China
Cite as
Chen Z., Zhang L., Wang X., Gu P., Ye F. (2021). a Conversion Framework of the Continuous Modeling Languages Based on ANTLR4. Proceedings of the 33rd European Modeling & Simulation Symposium (EMSS 2021), pp. 66-74. DOI: https://doi.org/10.46354/i3m.2021.emss.010

Abstract

Based on the needs of production and life, the modeling and simulation of the continuous system have a very wide range of requirements and applications. Various continuous modeling languages play an important role in the modeling and simulation of such systems. However, the same models built in different languages have to be rebuilt each time, which causes the problem of poor reusability of models between different languages. This paper proposes a conversion framework of the continuous system modeling language based on ANTLR4. And the Modelica to X language conversion experiment using this framework is implemented, whose results achieve high accuracy in syntax check. This framework indicates the method to complete the conversion between different modeling languages so that the same model can be reloaded between different modeling languages, which prevents modeling and simulation personnel from repeatedly modeling the same model, and this makes it easier for the new modeling and simulation language to build a model library. 

References

  1. Alon, U. , R Sadaka, Levy, O. , & Yahav, E. . (2019). Structural language models of code.
  2. Amodio, M. , Chaudhuri, S. , & Reps, T. . (2017). Neural Attribute Machines for Program Generation.
  3. Cellier, F. E. , & Elmqvist, H. . (1993). Automated formula manipulation supports object-oriented continuous-system modeling. Control Systems IEEE, 13(2), 28-38.
  4. Parr. The definitive antlr4 reference (2013)| forum - heise online. Heise Zeitschriften Verlag.
  5. Dixun Zhang. (2017). Code conversion technology from domain programming language SIMC to SIMD (Master's thesis, Jilin University).
  6. Feng, Z. , Guo, D. , Tang, D. , Duan, N. , Feng, X. , & Gong, M. , et al. (2020). Codebert: a pre-trained model for programming and natural languages.
  7. Lachaux, M. A., Roziere, B., Chanussot, L., & Lample, G. (2020). Unsupervised translation of programming languages. arXiv preprint arXiv:2006.03511.
  8. Fritzson, P. (2014). Principles of object-oriented modeling and simulation with Modelica 3.3: a cyber-physical approach. John Wiley & Sons.
  9. Jinghe Wen. (2005). The application of grammar-guided translation in automatic assembly program construction (Doctoral dissertation).
  10. Nguyen, A. T., Nguyen, T. T., & Nguyen, T. N. (2013, August). Lexical statistical machine translation for language migration. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering (pp. 651-654).
  11. Terekhov, A. A. , & Verhoef, C. . (2000). The realities of language conversions. IEEE Software, 17(6), p.111-124.
  12. Modelica Association. (2017).Modelica Specification Version3.4. Retrieved from https://www.modelica.org/association