Rewriting Semantics and Analysis of Concurrency Features for a C-like Language

被引:1
|
作者
Serrbanuta, Traian Florin [1 ]
机构
[1] Univ Bucharest, Dept Comp Sci, Bucharest, Romania
关键词
Runtime verification; tools; datarace; deadlock; Peterson's mutual exclusion algoriithm;
D O I
10.1016/j.entcs.2014.05.009
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
This paper shows how one can easily transform K definitions of programming languages into runtime verification tools. To increase the confidence that these runtime verification tools can be used for testing real-world programs, the paper uses KERNELC, a subset of the C programming language containing functions, memory allocation, pointer arithmetic, and input/output, which can be used to execute and test real C programs. KERNELC is extended with threads and synchronization constructs, and two concurrent semantics are derived from its sequential semantics. The first semantics, defining a sequentially consistent memory model, can be easily transformed into a runtime verification tool for checking datarace and deadlock freeness. The second semantics defines in a relatively minimal fashion a relaxed memory model based on the x86-TSO memory model. By exploring the executions of an implementation of Peterson's mutual exclusion algorithm for both definitions, it is shown that the algorithm guarantees mutual exclusion for the sequentially consistent model, but cannot guarantee it for the relaxed model, but also that by allowing fence operations in the language, the algorithm can be fixed and proven correct for the TSO model, too.
引用
收藏
页码:167 / 182
页数:16
相关论文
共 50 条
  • [11] C-LIKE ASSEMBLER FOR DSP - NOT
    MICHAEL, J
    DR DOBBS JOURNAL, 1993, 18 (07): : 12 - &
  • [12] A Rewriting Semantics for a Software Architecture Description Language
    Rademaker, Alexandre
    Braga, Christiano
    Sztajnberg, Alexandre
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 130 : 345 - 377
  • [13] Rewriting Logic Semantics of a Plan Execution Language
    Dowek, Gilles
    Munoz, Cesar
    Rocha, Camilo
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2010, (18): : 77 - 91
  • [14] A Symbolic Rewriting Semantics of the COMPASS Modeling Language
    Alturki, Musab A.
    2017 IEEE 18TH INTERNATIONAL CONFERENCE ON INFORMATION REUSE AND INTEGRATION (IEEE IRI 2017), 2017, : 283 - 290
  • [15] An operational semantics for C/C++11 concurrency
    Nienhuis K.
    Memarian K.
    Sewell P.
    2016, Association for Computing Machinery, 2 Penn Plaza, Suite 701, New York, NY 10121-0701, United States (51): : 111 - 128
  • [16] An Operational Semantics for C/C++11 Concurrency
    Nienhuis, Kyndylan
    Memarian, Kayvan
    Sewell, Peter
    ACM SIGPLAN NOTICES, 2016, 51 (10) : 111 - 128
  • [17] CONCURRENCY FEATURES FOR THE TRELLIS OWL LANGUAGE
    MOSS, JEB
    KOHLER, WH
    LECTURE NOTES IN COMPUTER SCIENCE, 1987, 276 : 171 - 180
  • [18] SI - A C-LIKE SCRIPT INTERPRETER
    STEVENS, A
    DR DOBBS JOURNAL, 1989, 14 (05): : 117 - &
  • [19] Theoretical analysis of excitation energies and transition parameters of C-like ions
    Indu Khatri
    Arun Goyal
    The European Physical Journal D, 2022, 76
  • [20] An algebraic semantics for an abstract language with intra-object-concurrency
    Gehrke, T
    EURO-PAR '98 PARALLEL PROCESSING, 1998, 1470 : 733 - 737