Clog: A Declarative Language for C Static Code Checkers

Research output: Chapter in Book/Report/Conference proceedingPaper in conference proceedingpeer-review

Abstract

We present Clog, a declarative language for describing static code checkers for C. Unlike other extensible state-of-the-art checker frameworks, Clog enables powerful interprocedural checkers without exposing the underlying program representation: Clog checkers consist of Datalog-style recursive rules that access the program under analysis via syntactic pattern matching and control flow edges only. We have implemented Clog on top of Clang, using a custom Datalog evaluation strategy that piggy-backs on Clang’s AST matching facilities while working around Clang’s limitations to achieve our design goal of representation independence. Our experiments demonstrate that Clog can concisely express a wide variety of checkers for different security vulnerabilities, with performance that is similar to Clang’s own analyses and highly competitive on real-world programs.

Original languageEnglish
Title of host publicationCC 2024 - Proceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction
EditorsGabriel Rodriguez, P. Sadayappan, Aravind Sukumaran-Rajam
PublisherAssociation for Computing Machinery (ACM)
Pages186-197
Number of pages12
ISBN (Electronic)9798400705076
DOIs
Publication statusPublished - 2024 Feb 17
Event33rd ACM SIGPLAN International Conference on Compiler Construction, CC 2024 - Edinburgh, United Kingdom
Duration: 2024 Mar 22024 Mar 3

Conference

Conference33rd ACM SIGPLAN International Conference on Compiler Construction, CC 2024
Country/TerritoryUnited Kingdom
CityEdinburgh
Period2024/03/022024/03/03

Subject classification (UKÄ)

  • Software Engineering

Free keywords

  • C
  • Datalog
  • Static Analysis Frameworks
  • Syntactic Patterns

Fingerprint

Dive into the research topics of 'Clog: A Declarative Language for C Static Code Checkers'. Together they form a unique fingerprint.

Cite this