Open Access
An Executable Formal Semantics of C with Applications: Technical Report
Chucky Ellison,Grigore Rosu +1 more
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
Proceedings ArticleDOI
The Correctness-Security Gap in Compiler Optimization
TL;DR: This paper introduces the correctness-security gap, which arises when a compiler optimization preserves the functionality of but violates a security guarantee made by source code, and shows that several standard optimizations, which have been formally proved correct, in-habit this correctness- security gap.
Proceedings ArticleDOI
Semantics-based program verifiers for all languages
TL;DR: A language-independent verification framework that can be instantiated with an operational semantics to automatically generate a program verifier that can check automatically the full functional correctness of challenging heap-manipulating programs implementing operations on list and tree data structures, like AVL trees is presented.
Proceedings ArticleDOI
A trusted mechanised JavaScript specification
Martin Bodin,Arthur Charguéraud,Daniele Filaretti,Philippa Gardner,Sergio Maffeis,Daiva Naudziuniene,Alan Schmitt,G. D. P. Smith +7 more
TL;DR: This work presents JSCert, a formalisation of the current ECMA standard in the Coq proof assistant, and JSRef, a reference interpreter for JavaScript extracted from Coq to OCaml and demonstrates that modern techniques of mechanised specification can handle the complexity of JavaScript.
Proceedings ArticleDOI
Lem: reusable engineering of real-world semantics
TL;DR: Lem is introduced, a language for engineering reusable large-scale semantic models, which takes inspiration both from functional programming languages and from proof assistants, and Lem definitions are translatable into OCaml for testing, Coq, HOL4, and Isabelle/HOL for proof, and LaTeX and HTML for presentation.
Book ChapterDOI
An executable semantics for compcert c
TL;DR: This work explores one approach: building an equivalent executable semantics for the 'CompCert C' language that can be checked against test suites of code against.
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
José Meseguer,José Meseguer +1 more
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.