Translating Xd-C programs to MSVL programs

08/25/2018
by   Meng Wang, et al.
0

C language is one of the most popular languages for software systems. In order to verify safety, reliability and security properties of such systems written in C, a tool UMC4M for runtime verification at code level based on Modeling, Simulation and Verification Language (MSVL) and its compiler MC is employed. To do so, a C program P has to be translated to an MSVL program M and the negation of a desired property Q is also translated to an MSVL program M', then "M and M" is compiled and executed armed with MC. Whether P violates Q is checked by evaluating whether there exists an acceptable execution of new MSVL program M and M". Therefore, how to translate a C program to an MSVL program is a critical issue. However, in general, C is of complicated structures with goto statement. In this paper, we confine the syntax of C in a suitable subset called Xd-C without loss of expressiveness. Further, we present a translation algorithm from an Xd-C program to an MSVL program based on translation algorithms for expressions and statements. Moreover, the equivalences between expressions and statements involved in Xd-C and MSVL programs are inductively proved. Subsequently, the equivalence between the original Xd-C program and the translated MSVL program is also proved. In addition, the proposed approach has been implemented by a tool called C2M. A benchmark of experiments including 13 real-world Xd-C programs is conducted. The results show that C2M works effectively.

READ FULL TEXT
research
08/25/2018

Translating C programs to MSVL programs

C language is one of the most popular languages in system programming an...
research
06/28/2022

Program Semantics and a Verification Technique for Knowledge-Based Multi-Agent Systems

We give a relational and a weakest precondition semantics for "knowledge...
research
05/13/2020

A Generating-Extension-Generator for Machine Code

The problem of "debloating" programs for security and performance purpos...
research
11/25/2019

Abstract Compilation for Verification of Numerical Accuracy Properties

Verification of numerical accuracy properties in modern software remains...
research
01/26/2023

User-Customizable Transpilation of Scripting Languages

A transpiler converts code from one programming language to another. Man...
research
06/26/2018

Indexing Operators to Extend the Reach of Symbolic Execution

Traditional program analysis analyses a program language, that is, all p...
research
05/08/2018

Robustness Testing of Intermediate Verifiers

Program verifiers are not exempt from the bugs that affect nearly every ...

Please sign up or login with your details

Forgot password? Click here to reset