Decidability of Entailments in Separation Logic with Arrays
Daisuke Kimura (Toho Univ.)
joint work with Makoto Tatsuta (NII)
Workshop on Mathematical Logic and its Application JSPS Core-to-Core Program 16-17 Sep. 2016 Kyoto University
Decidability of Entailments in Separation Logic with Arrays Daisuke - - PowerPoint PPT Presentation
Decidability of Entailments in Separation Logic with Arrays Daisuke Kimura (Toho Univ.) joint work with Makoto Tatsuta (NII) Workshop on Mathematical Logic and its Application JSPS Core-to-Core Program 16-17 Sep. 2016 Kyoto University
Daisuke Kimura (Toho Univ.)
joint work with Makoto Tatsuta (NII)
Workshop on Mathematical Logic and its Application JSPS Core-to-Core Program 16-17 Sep. 2016 Kyoto University
Separation Logic
On-going our project
decision procedure for entailment problem in SL
Terms
Pure expressions
Spatial expressions
(Empty heap)
(Points-to predicate)
(Array predicate)
(Separating conjunction) Symbolic Heaps
Stores
Heaps
(n is the number of t → (t1, . . . , tn)) Heap model
A heap model means a state of memory For example, assume that
This heap model (s, h) means the following memory state
(10,20) (11,15) The value of x is 5
def
def
def
def
def
Dom(h) = ∅
def
def
def
Dom(h) = { s(t), . . . , s(t + m) } Intuitively, Array(t, m) means there is an array starting from t of length m + 1
def
Entailments of SLARRAY:
i(Πi ∧ Σi)
The above entailment is said to be valid if
implies
holds for any (s, h)
Validity of entailments of SLARRAY is decidable
Approach Translating entailments into Presburger formulas Idea: Sorted separating conjunction ⊛
def
and h = h1 + h2 and max Dom(h1) < min Dom(h2) for some h1, h2 For example,
is valid
is invalid
where t < Σ means that t is less than the first address of Σ
Upper case (m′ = 0) Lower case (m′ > 0)
Upper case (m = 0) Lower case (m > 0)
1st case (m = m′) 2nd case (m < m′) 3rd case (m > m′)
1st case (m = m′) 2nd case (m < m′) 3rd case (m > m′)
1st case (m = m′) 2nd case (m < m′) 3rd case (m > m′)
Our translation mkPb(Π, Σ ; {(Πi, Σi)}i) is defined by using the observations
i(Πi ∧ Σi)
def
def
def
def
(Σ′ is not emp)
def
def
(Σ is not emp) (Sorted(Σ) means that the addresses in Σ is sorted)
(→→-case)
def
(→Array-case)
def
(where (Π′, t′ → (
def
(
(ArrayArray-case)
def
j∈J n = m j ∧ jJ n < m j ∧ t + n < Σ, Σ ;
j∈J m′ = m j ∧ jJ m′ < m j
(where m′ is mmin(J) )
Suppose that Σ and Σi has the form σ1 ⊛ . . . ⊛ σn
i Πi ∧ Σi
Suppose that Σ and Σi has the form σ1 ⊛ . . . ⊛ σn
i Πi ∧ Σi
We have the next theorem by applying the following fact:
i∈I σi |= Π′ ∧ ∗ j∈J σ′ j
i∈I σp(i) |=
j∈J σ′ p′(j))
presburger formula
(because of permutation) Possible Improvement (next task)
can be reduced to
Brotherston,Gorogiannis and Kanovich (2016,preprint)
facebook INFER (managed by Peter O’Hearn)
Conclusion
Future work