Automatic Inference of Access Permissions

Access permissions are used in several program verification approaches such as those based on separation logic or implicit dynamic frames to simplify framing and to provide a basis for reasoning about concurrent code. However, access permissions increase the annotation overhead because programmers need to specify for each program component which permissions it requires or provides. We present a new static analysis based on abstract interpretation to infer access permissions automatically. Our analysis computes a symbolic approximation of the permissions owned for each heap location at each program point and infers a constraint system over these symbolic permissions that reflects the permission requirements of each heap access in the program. The constraint system is solved using linear programming. Our analysis is parametric in the permission system and supports, for instance, fractional and counting permissions. Experimental results demonstrate that our analysis is fast and is able to infer almost all access permissions for our case studies.

[1]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[2]  K. Rustan M. Leino,et al.  A Basis for Verifying Multi-threaded Programs , 2009, ESOP.

[3]  Gavin M. Bierman,et al.  Separation logic and abstraction , 2005, POPL '05.

[4]  Bernhard Beckert,et al.  Formal Verification of Object-Oriented Software - International Conference, FoVeOOS 2010, Paris, France, June 28-30, 2010, Revised Selected Papers , 2011, FoVeOOS.

[5]  Manuel Fähndrich,et al.  Static Contract Checking with Abstract Interpretation , 2010, FoVeOOS.

[6]  George B. Dantzig,et al.  Linear programming and extensions , 1965 .

[7]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[8]  Peter W. O'Hearn,et al.  Permission accounting in separation logic , 2005, POPL '05.

[9]  Peter W. O'Hearn,et al.  Compositional Shape Analysis by Means of Bi-Abduction , 2011, JACM.

[10]  Pietro Ferrara,et al.  A fast and precise analysis for data race detection , 2008 .

[11]  Frank Piessens,et al.  VeriCool: An Automatic Verifier for a Concurrent Object-Oriented Language , 2008, FMOODS.

[12]  José Nuno Oliveira,et al.  FME 2001: Formal Methods for Increasing Software Productivity , 2001, Lecture Notes in Computer Science.

[13]  Hirotoshi Yasuoka,et al.  Polymorphic Fractional Capabilities , 2009, SAS.

[14]  Shmuel Sagiv,et al.  TVLA: A System for Implementing Static Analyses , 2000, SAS.

[15]  K. Rustan M. Leino,et al.  Loop Invariants on Demand , 2005, APLAS.

[16]  永田 守男,et al.  Verifying Properties of Parallel Programs : An Axiomatic Approach , 1976 .

[17]  Jan Smans,et al.  Deadlock-Free Channels and Locks , 2010, ESOP.

[18]  Fausto Spoto,et al.  Static Analysis for JML's assignable Clauses , 2003 .

[19]  K. Rustan M. Leino,et al.  Houdini, an Annotation Assistant for ESC/Java , 2001, FME.

[20]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[21]  Frank Piessens,et al.  VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java , 2011, NASA Formal Methods.

[22]  Néstor Cataño,et al.  CHASE: A Static Checker for JML's Assignable Clause , 2002, VMCAI.

[23]  John Tang Boyland,et al.  Checking Interference with Fractional Permissions , 2003, SAS.

[24]  Jan Smans,et al.  Verification of Concurrent Programs with Chalice , 2009, FOSAD.

[25]  Viktor Vafeiadis,et al.  Bi-abductive Resource Invariant Synthesis , 2009, APLAS.

[26]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 1999, POPL '99.

[27]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[28]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.

[29]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[30]  Xavier Rival,et al.  Trace Partitioning in Abstract Interpretation Based Static Analyzers , 2005, ESOP.

[31]  Frank Piessens,et al.  Implicit Dynamic Frames: Combining Dynamic Frames and Separation Logic , 2009, ECOOP.

[32]  Alan J. Hu,et al.  Automatic Inference of Frame Axioms Using Static Analysis , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

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