scispace - formally typeset
Open Access

An Executable Formal Semantics of C with Applications: Technical Report

TLDR
In this paper, the authors present an executable formal semantics of C. The semantics yields an interpreter, debugger, state space search tool, and model checker, which is shown capable of automatically finding program errors, both statically and at runtime.
Abstract
This paper describes an executable formal semantics of C. Being executable, the semantics has been thoroughly tested against the GCC torture test suite and successfully passes 770 of 776 test programs. It is the most complete and thoroughly tested formal definition of C to date. The semantics yields an interpreter, debugger, state space search tool, and model checker “for free”. The semantics is shown capable of automatically finding program errors, both statically and at runtime. It is also used to enumerate nondeterministic behavior.

read more

Citations
More filters
Posted Content

Formalisation of a frame stack semantics for a Java-like language.

TL;DR: This work presents a Coq formalisation of the small-step operational semantics of Jafun, a small Java-like language with classes, and makes a mechanised proof that the operational semantics for the untyped version of the semantics agrees with the one for the typed one.
Proceedings ArticleDOI

Semantics-based memory leak detection for C programs

TL;DR: Results and testing time show that the semantics-based method can detect memory leak flaws in C programs effectively and can be matched and detected automatically by execution.
Book ChapterDOI

Towards Formal Verification of Orchestration Computations Using the ${\mathbb K}$ Framework

TL;DR: A semantics-based approach for formally verifying Orc orchestrations using the \({\mathbb K}\) framework, which is not directly based on the interleaving semantics given by Orc’s SOS specification but utilizes various facilities to arrive at a clean, minimal and elegant semantic specification.

Reachability Logic in K

TL;DR: This paper presents a language-independent proof system for reachability properties of programs written in non-deterministic (concurrent) languages, referred to as reachability logic, which derives partial-correctness properties with either all-path or one-path semantics.
Book ChapterDOI

Model Checking Parameterized by the Semantics in Maude

TL;DR: Two metalevel transformations for relating counterexamples and semantics when dealing with the semantics of concurrent languages are presented, hence allowing users to model check real code while easing the interpretation of the countereXamples.
References
More filters
Book

Advanced Compiler Design and Implementation

TL;DR: Advanced Compiler Design and Implementation by Steven Muchnick Preface to Advanced Topics

The C programming language

TL;DR: This ebook is the first authorized digital version of Kernighan and Ritchie's 1988 classic, The C Programming Language (2nd Ed.), and is a "must-have" reference for every serious programmer's digital library.
Book

The C Programming Language

TL;DR: The C Programming Language (2nd Ed.) as discussed by the authors is the first authorized digital version of Kernighan and Ritchie's 1988 classic, The C Programming Languages (1st Ed.).
Journal ArticleDOI

Conditional rewriting logic as a unified model of concurrency

TL;DR: Maude as discussed by the authors is a programming language whose modules are rewriting logic theories, which is defined and given denotational and operational semantics, and it provides a simple unification of concurrent programming with functional and object-oriented programming and supports high level declarative programming of concurrent systems.
Book ChapterDOI

CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs

TL;DR: The structure of CIL is described, with a focus on how it disambiguates those features of C that were found to be most confusing for program analysis and transformation, allowing a complete project to be viewed as a single compilation unit.
Related Papers (5)