Чистая компиляция как парадигма программирования

Автор: Столяров А.В., Французов О.Г., Аникина А.С.

Журнал: Труды Института системного программирования РАН @trudy-isp-ran

Статья в выпуске: 2 т.30, 2018 года.

Бесплатный доступ

В научной литературе широко представлено исследование возможностей интерпретируемого выполнения компьютерных программ. При этом противоположный подход, основанный на элиминации любых проявлений интерпретируемости, насколько можно судить, никем всерьез не исследовался. В настоящей статье рассматривается подход, предполагающий отделение всего происходящего во время исполнения программы от инструментов, использующихся программистом при ее написании, и намечается путь к построению универсального (равно пригодного как для системных, так и для прикладных задач) языка программирования.

Парадигма программирования, компиляция, интерпретация, рефлексия

Короткий адрес: https://sciup.org/14916530

IDR: 14916530   |   DOI: 10.15514/ISPRAS-2018-30(2)-1

Pure compiled execution as a programming paradigm

Interpreted execution of computer programs, its capabilities and advantages is well-covered in the computer science literature. Its key feature is reflection: the ability to access and modify the source code at run time. At the same time, interpreted execution has its shortcomings: lower performance; higher code fragility caused by the possibility to change code during run time; more complicated static analysis; runtime-tied ecosystems. And in some cases like embedded systems, runtimes and interpreted code are impractical or impossible, and compiled code with zero dependencies is the only option. Pure compiled execution can be treated as a paradigm directly opposite to reflection-powered interpretation. If the primary trait of interpreted execution is reflection, then pure compilation should cleanly separate development time and run time. This implies no part of translator being available during run time, no requirements for runtime libraries availability, and, finally, no dependence on the implementation details like variable names. While interpretation is wildly popular, compiled execution can be a conscious choice not only for low-level applications, but other cases as well. The dichotomy between low-level languages and expressive reflection-enabled language is a false one. It should be possible to create an expressive purely compiled programming language, and such a language might be equally suitable both for system programming and application development.

Список литературы Чистая компиляция как парадигма программирования

  • Malenfant J., Jacques M., Demers F.-N. A Tutorial on Behavioral Reflection and its Implementation. Proceedings of Reflection 96, 1997, pp. 1-20. Available at: http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/malenfant.pdf
  • Smith B. C. Procedural Reflection in Programming Languages. Submitted in partial fulfillment of the requirements for the Degree of Doctor of Philosophy at the Massachusetts Institute of Technology, February 1982, 762 p. Available at: http://repository.readscheme.org/ftp/papers/bcsmith-thesis.pdf
  • McAllister N. Microsoft's Roslyn: Reinventing the compiler as we know it. IDG News Service, October 20, 2011 (online). Available at: https://www.infoworld.com/article/2621132/microsoft-net/microsoft-s-roslyn-reinventing-the-compiler-as-we-know-it.html
  • Limi A., Hathaway S. Monkey patch. Plone Foundation, Retrieved 2008-07-03 (online). Available at: http://web.archive.org/web/20080604220320/http://plone.org/documentation/glossary/monkeypatch
  • Installation -Jekyll. Retrieved 2017-09-01 (online). Available at: https://jekyllrb.com/docs/installation/
  • The Rust Language Tutorial (version 0.4). Retrieved 2017-04-30 (online). Available at: https://static.rust-lang.org/doc/0.4/tutorial.html
Еще