SOFTWARE MODEL CHECKING FOR MEMORY CONSISTENCY VERIFICATION

Capa

Citar

Texto integral

Acesso aberto Acesso aberto
Acesso é fechado Acesso está concedido
Acesso é fechado Somente assinantes

Resumo

Optimization transformations performed by a compiler may violate memory consistency requirements for a multithreaded program. This leads to errors, when the program behavior will differ from expected. The memory consistency requirements for a particular programming language are called the memory model. An example of an error of this class may be an incorrect change in the order of execution of instructions, which does not affect the behavior of a single- threaded program, but leads to unpredictable results in the multithreaded case. Such errors are often difficult to detect, as they occur rarely and depend significantly on the hardware and the state of the computer system. Although there are formal methods for verifying the consistency of shared memory usage, their scalability for industrial software remains a major challenge. To verify multithreaded programs, the MCC tool was previously proposed, which used a simple type of static analysis. In this article, we present a modification of the MCC tool, which implements a model verification method to verify the correctness of memory access consistency. The proposed method combines the methods of generating test programs and the method of static program analysis. The OTK tool is used to generate test programs. For static analysis, a modified version of the MCC tool is used, which checks all possible execution options for the generated test program, regardless of the specifics of a particular hardware. The tool was tested on an ARK industrial virtual machine and successfully identified two real errors in compiler optimizations.

Sobre autores

S. Andrianov

Ivannikov Institute for System Programming of the RAS

Email: andrianov@ispras.ru
ORCID ID: 0000-0002-6855-7919
Moscow, Russia

S. Zelenov

Ivannikov Institute for System Programming of the RAS

Email: zelenov@ispras.ru
ORCID ID: 0000-0003-0446-0541
Moscow, Russia

V. Mutilin

Ivannikov Institute for System Programming of the RAS; Moscow Institute of Physics and Technology (State University)

Email: mutilin@ispras.ru
Moscow, Russia; Moscow, Russia

A. Petrenko

Ivannikov Institute for System Programming of the RAS; M.V. Lomonosov Moscow State University; National Research University Higher School of Economics

Email: petrenko@ispras.ru
ORCID ID: 0000-0001-7411-3831
Moscow, Russia; Moscow, Russia; Moscow, Russia

Bibliografia

  1. Java Memory Model, § 17.4. 2013. https://docs.oracle.com/javase/specs/jls/se19/html/jls-17.html
  2. Andrianov P., Mutilin V. Static Memory Consistency Constraints Checking // System Informatics. 2023. Vol. 22. P. 1–10.
  3. Zelenov S., Zelenova S. Model-Based Testing of Optimizing Compilers // Testing of Software and Communicating Systems / ed. by Petrenko A., Veanes M., Tretmans J., Grieskamp W. Berlin, Heidelberg: Springer Berlin Heidelberg. 2007. P. 365–377.
  4. Beyer D., Henzinger T.A., Théoduloz G. Configurable software verification: concretizing the convergence of model checking and program analysis // Proceedings of CAV. Berlin, Heidelber: Springer-Verlag. 2007. P. 504–518.
  5. Beyer D., Keremoglu M. CPAchecker: A Tool for Configurable Software Verification // Computer Aided Verification. Springer Berlin Heidelberg, 2011. Vol. 6806 of Lecture Notes in Computer Science. P. 184–190.
  6. Wickerson J., Batty M., Sorensen T., Constantinides G. Automatically comparing memory consistency models. 2017. P. 190–204.
  7. Alglave J., Maranget L., Sarkar S., Sewell P. Fences in Weak Memory Models / ed. by Touili T., Cook B., Jackson P. // Computer Aided Verification. Berlin, Heidelberg: Springer Berlin Heidelberg. 2010. P. 258–272.
  8. Protsenko A. Architecture Independent Test Templates for Virtual Machines and Microprocessors // Informacionnye Tehnologii. 2024. Vol. 30. P. 579–584.

Arquivos suplementares

Arquivos suplementares
Ação
1. JATS XML

Declaração de direitos autorais © Russian Academy of Sciences, 2025

Согласие на обработку персональных данных

 

Используя сайт https://journals.rcsi.science, я (далее – «Пользователь» или «Субъект персональных данных») даю согласие на обработку персональных данных на этом сайте (текст Согласия) и на обработку персональных данных с помощью сервиса «Яндекс.Метрика» (текст Согласия).