Datalog-Based Program Analysis with BES and RWL

This paper describes two techniques for Datalog query evaluation and their application to object-oriented program analysis. The first technique transforms Datalog programs into an implicit Boolean Equation System (Bes) that can then be solved by using linear-time complexity algorithms that are available in existing, general purpose verification toolboxes such as Cadp. In order to improve scalability and to enable analyses involving advanced meta-programming features, we develop a second methodology that transforms Datalog programs into rewriting logic (Rwl) theories. This method takes advantage of the preeminent features and facilities that are available within the high-performance system Maude, which provides a very efficient implementation of Rwl. We provide evidence of the practicality of both approaches by reporting on some experiments with a number of real-world Datalog-based analyses.

[1]  Dave Thomas,et al.  ECOOP 2006 - Object-Oriented Programming , 2006 .

[2]  Xin Zheng,et al.  Demand-driven alias analysis for C , 2008, POPL '08.

[3]  Elnar Hajiyev,et al.  codeQuest: Scalable Source Code Queries with Datalog , 2006, ECOOP.

[4]  María Alpuente,et al.  Using Datalog and Boolean Equation Systems for Program Analysis , 2009, FMICS.

[5]  Pierre Lescanne,et al.  Algebraic and Logic Programming , 1988, Lecture Notes in Computer Science.

[6]  Benjamin Livshits,et al.  Reflection Analysis for Java , 2005, APLAS.

[7]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[8]  Massimo Marchiori Logic Programs as term Rewriting Systems , 1994, ALP.

[9]  Radu Mateescu,et al.  A Model Checking Language for Concurrent Value-Passing Systems , 2008, FM.

[10]  Robin Milner,et al.  On Observing Nondeterminism and Concurrency , 1980, ICALP.

[11]  Radu Mateescu,et al.  Distributed On-the-Fly Model Checking and Test Case Generation , 2006, SPIN.

[12]  Jürgen Giesl,et al.  Automated Termination Analysis for Logic Programs by Term Rewriting , 2006, LOPSTR.

[13]  Martin Wirsing,et al.  Extraction of Structured Programs from Specification Proofs , 1999, WADT.

[14]  Kaisa Sere,et al.  FM 2008: Formal Methods, 15th International Symposium on Formal Methods, Turku, Finland, May 26-30, 2008, Proceedings , 2008, FM.

[15]  Narciso Martí-Oliet,et al.  All About Maude - A High-Performance Logical Framework, How to Specify, Program and Verify Systems in Rewriting Logic , 2007, All About Maude.

[16]  Scott A. Smolka,et al.  Simple Linear-Time Algorithms for Minimal Fixed Points (Extended Abstract) , 1998, ICALP.

[17]  Monica S. Lam,et al.  Using Datalog with Binary Decision Diagrams for Program Analysis , 2005, APLAS.

[18]  Jaco van de Pol,et al.  Equivalence Checking for Infinite Systems Using Parameterized Boolean Equation Systems , 2007, CONCUR.

[19]  Yanhong A. Liu,et al.  From datalog rules to efficient programs with time and space guarantees , 2009, TOPL.

[20]  David Maier,et al.  Magic sets and other strange ways to implement logic programs (extended abstract) , 1985, PODS '86.

[21]  Radu Mateescu,et al.  CADP 2006: A Toolbox for the Construction and Analysis of Distributed Processes , 2007, CAV.

[22]  Christophe Joubert,et al.  Evaluation Strategies for Datalog-based Points-To Analysis , 2011, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[23]  María Alpuente,et al.  Defining Datalog in Rewriting Logic , 2009, LOPSTR.

[24]  Jan van Leeuwen,et al.  Formal models and semantics , 1990 .

[25]  MeseguerJosé Conditional rewriting logic as a unified model of concurrency , 1992 .

[26]  José Meseguer,et al.  Membership algebra as a logical framework for equational specification , 1997, WADT.

[27]  John Whaley,et al.  Joeq: a virtual machine and compiler infrastructure , 2003, IVME '03.

[28]  Jeffrey D. Uuman Principles of database and knowledge- base systems , 1989 .

[29]  Advances in Data Base Theory , 1984, Springer US.

[30]  Jeffrey D. Ullman,et al.  Optimizing joins in a map-reduce environment , 2010, EDBT '10.

[31]  Andreas Podelski,et al.  ACSAR: Software Model Checking with Transfinite Refinement , 2007, SPIN.

[32]  Grigore Rosu,et al.  Rewriting-Based Techniques for Runtime Verification , 2005, Automated Software Engineering.

[33]  Henrik Reif Andersen Model Checking and Boolean Graphs , 1992, ESOP.

[34]  Kim G. Larsen,et al.  On Modal Refinement and Consistency , 2007, CONCUR.

[35]  Michael Hanus,et al.  The Integration of Functions into Logic Programming: From Theory to Practice , 1994, J. Log. Program..

[36]  Anne Elisabeth Haxthausen,et al.  Theoretical Aspects of Computing - ICTAC 2008, 5th International Colloquium, Istanbul, Turkey, September 1-3, 2008. Proceedings , 2008, ICTAC.

[37]  Jeffrey D. Ullman,et al.  Principles of Database and Knowledge-Base Systems, Volume II , 1988, Principles of computer science series.

[38]  Thomas W. Reps,et al.  Solving Demand Versions of Interprocedural Analysis Problems , 1994, CC.

[39]  Laurent Vieille,et al.  Recursive Axioms in Deductive Databases: The Query/Subquery Approach , 1986, Expert Database Conf..

[40]  Raghu Ramakrishnan,et al.  Review - Magic Sets and Other Strange Ways to Implement Logic Programs , 1999, ACM SIGMOD Digit. Rev..

[41]  Matthias Jarke,et al.  Logic Programming and Databases , 1984, Expert Database Workshop.

[42]  Torbjörn Ekman,et al.  .QL: Object-Oriented Queries Made Easy , 2007, GTTSE.

[43]  Christophe Joubert,et al.  Implementing Datalog in Maude , 2009 .

[44]  Uday S. Reddy,et al.  Transformation of Logic Programs into Functional Programs , 1984, SLP.

[45]  João Saraiva,et al.  Generative and Transformational Techniques in Software Engineering II , 2007, Lecture Notes in Computer Science.

[46]  Radu Mateescu,et al.  Local Model-Checking of an Alternation-Free Value-Based Modal Mu-Calculus , 1998 .