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 条
  • [1] Continuation Semantics for Concurrency Applied to Parallel Rewriting of Multisets
    Ciobanu, Gabriel
    Todoran, Eneia Nicolae
    12TH INTERNATIONAL SYMPOSIUM ON SYMBOLIC AND NUMERIC ALGORITHMS FOR SCIENTIFIC COMPUTING (SYNASC 2010), 2011, : 387 - 391
  • [2] Programming Language Semantics using K - true concurrency through term graph rewriting-
    Serbanuta, Traian Florin
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2013, (110): : 2 - 3
  • [3] Extending a C-like Language for Portable SIMD Programming
    Leissa, Roland
    Hack, Sebastian
    Wald, Ingo
    ACM SIGPLAN NOTICES, 2012, 47 (08) : 65 - 74
  • [4] The Problem of Programming Language Concurrency Semantics
    Batty, Mark
    Memarian, Kayvan
    Nienhuis, Kyndylan
    Pichon-Pharabod, Jean
    Sewell, Peter
    PROGRAMMING LANGUAGES AND SYSTEMS, 2015, 9032 : 283 - 307
  • [5] Cg: A system for programming graphics hardware in a C-like language
    Mark, WR
    Glanville, RS
    Akeley, K
    Kilgard, MJ
    ACM TRANSACTIONS ON GRAPHICS, 2003, 22 (03): : 896 - 907
  • [7] Students’ perspective on the first programming language: C-like or Pascal-like languages?
    Stelios Xinogalos
    Tomáš Pitner
    Mirjana Ivanović
    Miloš Savić
    Education and Information Technologies, 2018, 23 : 287 - 302
  • [8] Rewriting logic semantics: From language specifications to formal analysis tools
    Meseguer, J
    Rosu, G
    AUTOMATED REASONING, PROCEEDINGS, 2004, 3097 : 1 - 44
  • [9] Students' perspective on the first programming language: C-like or Pascal-like languages?
    Xinogalos, Stelios
    Pitner, Tomas
    Ivanovic, Mirjana
    Savic, Milos
    EDUCATION AND INFORMATION TECHNOLOGIES, 2018, 23 (01) : 287 - 302
  • [10] Real-time extensions to a C-like hardware description language
    Todman, T
    Luk, W
    FCCM 2003: 11TH ANNUAL IEEE SYMPOSIUM ON FIELD-PROGRAMMABLE CUSTOM COMPUTING MACHINES, PROCEEDINGS, 2003, : 302 - 304