Using Datalog with Binary Decision Diagrams for Program Analysis

  • John Whaley
  • Dzintars Avots
  • Michael Carbin
  • Monica S. Lam
Conference paper

DOI: 10.1007/11575467_8

Part of the Lecture Notes in Computer Science book series (LNCS, volume 3780)
Cite this paper as:
Whaley J., Avots D., Carbin M., Lam M.S. (2005) Using Datalog with Binary Decision Diagrams for Program Analysis. In: Yi K. (eds) Programming Languages and Systems. APLAS 2005. Lecture Notes in Computer Science, vol 3780. Springer, Berlin, Heidelberg

Abstract

Many problems in program analysis can be expressed naturally and concisely in a declarative language like Datalog. This makes it easy to specify new analyses or extend or compose existing analyses. However, previous implementations of declarative languages perform poorly compared with traditional implementations. This paper describes bddbddb, a BDD-Based Deductive DataBase, which implements the declarative language Datalog with stratified negation, totally-ordered finite domains and comparison operators. bddbddb uses binary decision diagrams (BDDs) to efficiently represent large relations. BDD operations take time proportional to the size of the data structure, not the number of tuples in a relation, which leads to fast execution times. bddbddb is an effective tool for implementing a large class of program analyses. We show that a context-insensitive points-to analysis implemented with bddbddb is about twice as fast as a carefully hand-tuned version. The use of BDDs also allows us to solve heretofore unsolved problems, like context-sensitive pointer analysis for large programs.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • John Whaley
    • 1
  • Dzintars Avots
    • 1
  • Michael Carbin
    • 1
  • Monica S. Lam
    • 1
  1. 1.Computer Science DepartmentStanford UniversityStanfordUSA

Personalised recommendations