See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/318959731 Slides: Decidability and Complexity of Tree Share Formulas Presentation · December 2016 CITATIONS READS 0 16 3 authors , including: Bach Xuan Le Anthony Widjaja Lin National University of Singapore University of Oxford 9 PUBLICATIONS 25 CITATIONS 56 PUBLICATIONS 556 CITATIONS SEE PROFILE SEE PROFILE Some of the authors of this publication are also working on these related projects: Tree Share Structure in Program Verification View project All content following this page was uploaded by Bach Xuan Le on 07 August 2017. The user has requested enhancement of the downloaded file.
Decidability and Complexity of Tree Share Formulas Decidability and Complexity of Tree Share Formulas Xuan Bach Le 1 Aquinas Hobor 1 Anthony W. Lin 2 1 National University of Singapore 2 University of Oxford December 14, 2016 1 / 30
Decidability and Complexity of Tree Share Formulas Introduction tree ( x ,τ ) ∧ WRITE ( τ ) ∥ tree ( x ,τ 1 ) ∧ READ ( τ 1 ) tree ( x ,τ 2 ) ∧ READ ( τ 2 ) tree ( x ,τ ) ∧ WRITE ( τ ) 2 / 30
Decidability and Complexity of Tree Share Formulas Introduction Shares Shares are embedded into separation logic to reason about resource accounting: τ 1 ⊕ τ 2 τ 1 τ 2 ↦ val ⇔ ↦ val ⋆ addr ↦ val addr addr 3 / 30
Decidability and Complexity of Tree Share Formulas Introduction Shares Shares are embedded into separation logic to reason about resource accounting: τ 1 ⊕ τ 2 τ 1 τ 2 ↦ val ⇔ ↦ val ⋆ addr ↦ val addr addr Allow resources to be split and shared in large scale: def = tree ( ℓ,τ ) ( ℓ = null ∧ emp ) ∨ ∃ ℓ l ,ℓ r . ( ℓ ↦ ( ℓ l ,ℓ r ) ⋆ tree ( ℓ l ,τ ) ⋆ tree ( ℓ r ,τ )) τ tree ( ℓ,τ 1 ⊕ τ 2 ) ⇔ tree ( ℓ,τ 1 ) ⋆ tree ( ℓ,τ 2 ) 3 / 30
Decidability and Complexity of Tree Share Formulas Introduction Shares Shares are embedded into separation logic to reason about resource accounting: τ 1 ⊕ τ 2 τ 1 τ 2 ↦ val ⇔ ↦ val ⋆ addr ↦ val addr addr Allow resources to be split and shared in large scale: def = tree ( ℓ,τ ) ( ℓ = null ∧ emp ) ∨ ∃ ℓ l ,ℓ r . ( ℓ ↦ ( ℓ l ,ℓ r ) ⋆ tree ( ℓ l ,τ ) ⋆ tree ( ℓ r ,τ )) τ tree ( ℓ,τ 1 ⊕ τ 2 ) ⇔ tree ( ℓ,τ 1 ) ⋆ tree ( ℓ,τ 2 ) Share policies to reason about permissions for single writer and multiple readers: READ ( τ ) Split- WRITE ( τ ) Write- ∃ τ 1 ,τ 2 . τ 1 ⊕ τ 2 = τ ∧ Read READ ( τ ) Read READ ( τ 1 ) ∧ READ ( τ 2 ) 3 / 30
Decidability and Complexity of Tree Share Formulas Introduction Shares Shares enable resource reasoning in concurrent programming 4 / 30
Decidability and Complexity of Tree Share Formulas Introduction Shares Shares enable resource reasoning in concurrent programming Rational numbers [Boyland (2003)]: disjointness problem makes tree split equivalence false: ¬( tree ( ℓ,τ 1 ⊕ τ 2 ) ⇐ tree ( ℓ,τ 1 ) ⋆ tree ( ℓ,τ 2 )) 4 / 30
Decidability and Complexity of Tree Share Formulas Introduction Shares Shares enable resource reasoning in concurrent programming Rational numbers [Boyland (2003)]: disjointness problem makes tree split equivalence false: ¬( tree ( ℓ,τ 1 ⊕ τ 2 ) ⇐ tree ( ℓ,τ 1 ) ⋆ tree ( ℓ,τ 2 )) Subsets of natural numbers [Parkinson (2005)] Finite sets: recursion depth is finite Infinite sets: intersections may not be in the model 4 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Definition A tree share τ ∈ T is a boolean binary tree equipped with the reduction rules R 1 and R 2 (their inverses are E 1 , E 2 resp.): def = ○ ∣ ● ∣ τ τ R 1 ∶ ● ● ↦ ● R 2 ∶ ○ ○ ↦ ○ τ The tree domain T contains canonical trees which are irreducible with respect to the reduction rules. 5 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Definition A tree share τ ∈ T is a boolean binary tree equipped with the reduction rules R 1 and R 2 (their inverses are E 1 , E 2 resp.): def = τ ○ ∣ ● ∣ τ R 1 ∶ ● ● ↦ ● R 2 ∶ ○ ○ ↦ ○ τ The tree domain T contains canonical trees which are irreducible with respect to the reduction rules. R i R i ↦ ● ↦ ● ○ ○ ○ ● ● ○ ○ ○ 5 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Definition A tree share τ ∈ T is a boolean binary tree equipped with the reduction rules R 1 and R 2 (their inverses are E 1 , E 2 resp.): def = τ ○ ∣ ● ∣ τ R 1 ∶ ● ● ↦ ● R 2 ∶ ○ ○ ↦ ○ τ The tree domain T contains canonical trees which are irreducible with respect to the reduction rules. R i R i ↦ ● ↦ ● ○ ○ ○ ● ● ○ ○ ○ ○ is the empty tree, and ● the full tree. 5 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Definition A tree share τ ∈ T is a boolean binary tree equipped with the reduction rules R 1 and R 2 (their inverses are E 1 , E 2 resp.): def = τ ○ ∣ ● ∣ τ R 1 ∶ ● ● ↦ ● R 2 ∶ ○ ○ ↦ ○ τ The tree domain T contains canonical trees which are irreducible with respect to the reduction rules. R i R i ↦ ● ↦ ● ○ ○ ○ ● ● ○ ○ ○ ○ is the empty tree, and ● the full tree. def def = τ ≠ ○ = τ = ● READ ( τ ) WRITE ( τ ) 5 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators The complement � : 6 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators The complement � : ¬ ↦ ○ 3 ● 3 ● 1 ○ 2 ○ 1 ● 2 6 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators The complement � : ¬ ↦ ○ 3 ● 3 ● 1 ○ 2 ○ 1 ● 2 The Boolean function union ⊔ and intersection ⊓ operator: 6 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators The complement � : ¬ ↦ ○ 3 ● 3 ● 1 ○ 2 ○ 1 ● 2 The Boolean function union ⊔ and intersection ⊓ operator: E i R i ∨ ⊔ ↦ ⊔ ↦ ↦ ● ● ○ ○ ● ○ ● ○ ● ● 1 ● 2 ○ 3 ● 4 ○ 1 ● 2 ○ 3 ○ 4 ● 1 ● 2 ○ 3 ● 4 6 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators The complement � : ¬ ↦ ○ 3 ● 3 ● 1 ○ 2 ○ 1 ● 2 The Boolean function union ⊔ and intersection ⊓ operator: E i R i ∨ ⊔ ↦ ⊔ ↦ ↦ ● ● ○ ○ ● ○ ● ○ ● ● 1 ● 2 ○ 3 ● 4 ○ 1 ● 2 ○ 3 ○ 4 ● 1 ● 2 ○ 3 ● 4 E i R i ∧ ⊓ ↦ ⊓ ↦ ↦ ● ○ ○ ○ ● ○ ● ○ ● ● 1 ● 2 ○ 3 ● 4 ○ 1 ● 2 ○ 3 ○ 4 ○ 1 ● 2 ○ 3 ○ 4 6 / 30
Decidability and Complexity of Tree Share Formulas Introduction Properties of ⊔ , ⊓ and � M = (⊔ , ⊓ , � , ● , ○) forms a Boolean Algebra [Dockins et al. (2009)]: ( associativity ) B 1 a . ( τ 1 ⊓ τ 2 ) ⊓ τ 3 = τ 1 ⊓ ( τ 2 ⊓ τ 3 ) B 1 b . ( τ 1 ⊔ τ 2 ) ⊔ τ 3 = τ 1 ⊔ ( τ 2 ⊔ τ 3 ) ( commutativity ) B 2 a . τ 1 ⊓ τ 2 = τ 2 ⊓ τ 1 B 2 b . τ 1 ⊔ τ 2 = τ 2 ⊔ τ 1 ( distributivity ) B 3 a . τ 1 ⊓ ( τ 2 ⊔ τ 3 ) = ( τ 1 ⊓ τ 2 ) ⊔ ( τ 1 ⊓ τ 3 ) B 3 b . τ 1 ⊔ ( τ 2 ⊓ τ 3 ) = ( τ 1 ⊔ τ 2 ) ⊓ ( τ 1 ⊔ τ 3 ) ( absorption ) B 4 a . τ 1 ⊓ ( τ 1 ⊔ τ 2 ) = τ 1 B 4 b . τ 1 ⊔ ( τ 1 ⊓ τ 2 ) = τ 1 ( identity ) B 5 a . τ ⊓ ● = τ B 5 b . τ ⊔ ○ = τ ( complement ) B 6 a . τ ⊓ τ = ○ B 6 b . τ ⊔ τ = ● 7 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators(cont.) The partial join function ⊕ : 8 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators(cont.) The partial join function ⊕ : def τ 1 ⊕ τ 2 = τ 3 = τ 1 ⊔ τ 2 = τ 3 ∧ τ 1 ⊓ τ 2 = ○ 8 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators(cont.) The partial join function ⊕ : def τ 1 ⊕ τ 2 = τ 3 = τ 1 ⊔ τ 2 = τ 3 ∧ τ 1 ⊓ τ 2 = ○ E i R i ⊕ ⊕ ○ ↦ ⊕ ↦ ↦ ● ● ○ ● ○ ● ○ ○ ● ● 1 ○ 2 ○ 3 ● 4 ○ 1 ○ 2 ● 3 ○ 4 ● 1 ○ 2 ● 3 ● 4 8 / 30
Decidability and Complexity of Tree Share Formulas Introduction Properties of ⊕ O = ( T , ⊕) for fractional permission in Separation Logic [Dockins et al. (2009)]: ( functionality ) J 1 . τ 1 ⊕ τ 2 = τ 3 ⇒ τ 1 ⊕ τ 2 = τ ′ 3 ⇒ τ 3 = τ ′ 3 ( commutativity ) J 2 . τ 1 ⊕ τ 2 = τ 2 ⊕ τ 1 ( associativity ) J 3 . τ 1 ⊕ ( τ 2 ⊕ τ 3 ) = ( τ 1 ⊕ τ 2 ) ⊕ τ 3 ( cancellation ) J 4 . τ 1 ⊕ τ 2 = τ 3 ⇒ τ ′ 1 ⊕ τ 2 = τ 3 ⇒ τ 1 = τ ′ 1 ( unit ) J 5 . ∃ u . ∀ τ. τ ⊕ u = τ ( disjointness ) J 6 . τ 1 ⊕ τ 1 = τ 2 ⇒ τ 1 = τ 2 bc c ac a b d ad bd J 7 . a ⊕ b = z ∧ c ⊕ d = z ⇒ ∃ ac , ad , bc , bd . ( cross split ) ac ⊕ ad = a ∧ bc ⊕ bd = b ∧ ac ⊕ bc = c ∧ ad ⊕ bd = d ( infinite split ) J 8 . τ ≠ ○ ⇒ ∃ τ 1 ,τ 2 . τ 1 ≠ ○ ∧ τ 2 ≠ ○ ∧ τ 1 ⊕ τ 2 = τ 9 / 30
Decidability and Complexity of Tree Share Formulas Introduction Tree Share Operators(cont.) The injection bowtie function ⋈ replaces ● with tree: 10 / 30
Recommend
More recommend