Separation logic is an extension of Hoare logic for reasoning about mutable heap structure. To represent separation logic in the first-order logic, there are several choices to determine what are constants, what are predicates and quantifiers, and whether the commands are taken as atomic or composite. This paper shall give a translation of separation logic into a guarded fragment of the first-order logic, such that the translation is faithful, that is, the translation translates a consistent statement (boolean expression, assertion or specification) of separation logic into a consistent formula in the fragment of the first-order logic. By the decidability of the satisfiability problem of the guarded first-order logic, if the commands are taken as atomic in the first-order logic then the guarded first-order logic translated from separation logic is decidable, if the commands are taken as atomic/composite in the first-order logic then the first-order logic translated from separation logic is undecidable.
展开▼