TY - GEN
T1 - Shape analysis with inductive recursion synthesis
AU - Guo, Bolei
AU - Vachharajani, Neil
AU - August, David I.
PY - 2007
Y1 - 2007
N2 - Separation logic with recursively defined predicates allows for concise yet precise description of the shapes of data structures. However, most uses of separation logic for program analysis rely on pre-defined recursive predicates, limiting the class of programs analyzable to those that manipulate only a priori data structures. This paper describes a general algorithm based on inductive program synthesis that automatically infers recursive shape invariants, yielding a shape analysis based on separation logic that can be applied to any program. A key strength of separation logic is that it facilitates, via explicit expression of structural separation, local reasoning about heap where the effects of altering one part of a data structure are analyzed in isolation from the rest. The interaction between local reasoning and the global invariants given by recursive predicates is a difficult area, especially in the presence of complex internal sharing in the data structures. Existing approaches, using logic rules specifically designed for the list predicate to unfold and fold linked-lists, again require a priori knowledge about the shapes of the data structures and do not easily generalize to more complex data structures. We introduce a notion of "truncation points" in a recursive predicate, which gives rise to generic algorithms for unfolding and folding arbitrary data structures.
AB - Separation logic with recursively defined predicates allows for concise yet precise description of the shapes of data structures. However, most uses of separation logic for program analysis rely on pre-defined recursive predicates, limiting the class of programs analyzable to those that manipulate only a priori data structures. This paper describes a general algorithm based on inductive program synthesis that automatically infers recursive shape invariants, yielding a shape analysis based on separation logic that can be applied to any program. A key strength of separation logic is that it facilitates, via explicit expression of structural separation, local reasoning about heap where the effects of altering one part of a data structure are analyzed in isolation from the rest. The interaction between local reasoning and the global invariants given by recursive predicates is a difficult area, especially in the presence of complex internal sharing in the data structures. Existing approaches, using logic rules specifically designed for the list predicate to unfold and fold linked-lists, again require a priori knowledge about the shapes of the data structures and do not easily generalize to more complex data structures. We introduce a notion of "truncation points" in a recursive predicate, which gives rise to generic algorithms for unfolding and folding arbitrary data structures.
KW - Artificial intelligence
KW - Inductive recursion synthesis
KW - Loop invariant inference
KW - Separation logic
KW - Shape analysis
UR - http://www.scopus.com/inward/record.url?scp=35448950882&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=35448950882&partnerID=8YFLogxK
U2 - 10.1145/1250734.1250764
DO - 10.1145/1250734.1250764
M3 - Conference contribution
AN - SCOPUS:35448950882
SN - 1595936335
SN - 9781595936332
T3 - Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI)
SP - 256
EP - 265
BT - PLDI'07
T2 - PLDI'07: 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation
Y2 - 10 June 2007 through 13 June 2007
ER -