Modelirovanie i Analiz Informatsionnykh Sistem
RUS  ENG    JOURNALS   PEOPLE   ORGANISATIONS   CONFERENCES   SEMINARS   VIDEO LIBRARY   PACKAGE AMSBIB  
General information
Latest issue
Archive
Impact factor

Search papers
Search references

RSS
Latest issue
Current issues
Archive issues
What is RSS



Model. Anal. Inform. Sist.:
Year:
Volume:
Issue:
Page:
Find






Personal entry:
Login:
Password:
Save password
Enter
Forgotten password?
Register


Modelirovanie i Analiz Informatsionnykh Sistem, 2022, Volume 29, Number 3, Pages 246–264
DOI: https://doi.org/10.18255/1818-1015-2022-3-246-264
(Mi mais779)
 

This article is cited in 1 scientific paper (total in 1 paper)

Theory of computing

Transformation of C programming language memory model into object-oriented representation of EO language

A. I. Legalova, Y. G. Bugayenkob, N. K. Chuykina, M. V. Shipitsinc, Ya. I. Riabtseva, A. N. Kamenskiya

a National Research University Higher School of Economics, 20, Myasnitskaya str., Moscow 101000, Russia
b Huawei Russian Research Institute, 7-9, Smolenskaya sq., Moscow 121099, Russia
c ITMO University, 49 bldg. A, Kronverksky Pr., St. Petersburg 197101, Russia
Full-text PDF (652 kB) Citations (1)
References:
Abstract: The paper analyzes the possibilities of transforming C programming language constructs into objects of EO programming language. The key challenge of the method is the transpilation from a system programming language into a language of a higher level of abstraction, which doesn't allow direct manipulations with computer memory. Almost all application and domain-oriented programming languages disable such direct access to memory. Operations that need to be supported in this case include the use of dereferenced pointers, the imposition of data of different types in the same memory area, and different interpretation of the same data which is located in the same memory address space. A decision was made to create additional EO-objects that directly simulate the interaction with computer memory as in C language. These objects encapsulate unreliable data operations which use pointers. An abstract memory object was proposed for simulating the capabilities of C language to provide interaction with computer memory. The memory object is essentially an array of bytes. It is possible to write into memory and read from memory at a given index. The number of bytes read or written depends on which object is being used. The transformation of various C language constructs into EO code is considered at the level of the compilation unit. To study the variants and analyze the results a transpiler was developed that provides necessary transformations. It is implemented on the basis of Clang, which forms an abstract syntax tree. This tree is processed using LibTooling and LibASTMatchers libraries. As a result of compiling a C program, code in EO language is generated. The considered approach turns out to be appropriate for solving different problems. One of such problems is static code analysis. Such solutions make it possible to isolate low-level code fragments into separate program objects, focusing on their study and possible transformations into more reliable code.
Keywords: program transformation, procedural programming, object-oriented programming, transpilation, compilation, programming languages.
Received: 07.08.2022
Revised: 01.09.2022
Accepted: 02.09.2022
Document Type: Article
UDC: 004.4’4
MSC: 68N15, 68Q10, 68N20
Language: Russian
Citation: A. I. Legalov, Y. G. Bugayenko, N. K. Chuykin, M. V. Shipitsin, Ya. I. Riabtsev, A. N. Kamenskiy, “Transformation of C programming language memory model into object-oriented representation of EO language”, Model. Anal. Inform. Sist., 29:3 (2022), 246–264
Citation in format AMSBIB
\Bibitem{LegBugChu22}
\by A.~I.~Legalov, Y.~G.~Bugayenko, N.~K.~Chuykin, M.~V.~Shipitsin, Ya.~I.~Riabtsev, A.~N.~Kamenskiy
\paper Transformation of C programming language memory model into object-oriented representation of EO language
\jour Model. Anal. Inform. Sist.
\yr 2022
\vol 29
\issue 3
\pages 246--264
\mathnet{http://mi.mathnet.ru/mais779}
\crossref{https://doi.org/10.18255/1818-1015-2022-3-246-264}
Linking options:
  • https://www.mathnet.ru/eng/mais779
  • https://www.mathnet.ru/eng/mais/v29/i3/p246
  • This publication is cited in the following 1 articles:
    Citing articles in Google Scholar: Russian citations, English citations
    Related articles in Google Scholar: Russian articles, English articles
    Моделирование и анализ информационных систем
    Statistics & downloads:
    Abstract page:74
    Full-text PDF :19
    References:10
     
      Contact us:
     Terms of Use  Registration to the website  Logotypes © Steklov Mathematical Institute RAS, 2024