![Page 1: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/1.jpg)
Adjunct Elimination in Context Logic for Trees
Cristiano CalcagnoThomas Dinsdale-Young
Philippa GardnerImperial College, London
![Page 2: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/2.jpg)
Context Logic
• Ambient Logic (Cardelli, Gordon) is a logic for reasoning about static properties of node-labelled, unranked trees (e.g. Firewalls, XML data)
• Separation Logic (O’Hearn, Reynolds, Yang) is a logic for local reasoning about dynamic heap update
• Context Logic evolved from these two as a logic for local reasoning about dynamic tree update– Talks both about trees and contexts into which they
may be placed
![Page 3: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/3.jpg)
![Page 4: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/4.jpg)
u[P]
![Page 5: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/5.jpg)
![Page 6: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/6.jpg)
P1 | P2
![Page 7: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/7.jpg)
![Page 8: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/8.jpg)
K(P)
![Page 9: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/9.jpg)
![Page 10: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/10.jpg)
K P
![Page 11: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/11.jpg)
![Page 12: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/12.jpg)
P1 P2
![Page 13: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/13.jpg)
Adjoints
• The adjoints allow us to reason hypothetically about an extended object
• They are essential for expressing weakest preconditions
• But for closed formulae, the adjoints add no expressive power to Separation Logic (Lozes) and Ambient Logic (Lozes, and later Dawar, Gardner, Ghelli)
![Page 14: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/14.jpg)
Adjunct Elimination
• Intuition:– adjoints make us reason about trees that are
bigger than the ones we are actually interested in
– we would expect that any property expressed in terms of these hypothetical trees could be expressed without them
• In Context Logic for Trees, one of the adjoints () can also be eliminated, but the other () cannot (Dinsdale-Young)
![Page 15: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/15.jpg)
Non-eliminability of
• Trees can be split arbitrarily into a context and subtree• Using , we can fill the context hole and then split it as a
tree• We cannot split an arbitrary subtree (or subcontext) from
a context
![Page 16: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/16.jpg)
Counterexample
• The formula 0 True(u[0])– Expresses “putting the
empty tree into the context hole gives a tree that has a leaf u”
– Distinguishes ci from di for all i
• There is no formula without adjoints that can express this property
u
u
u
u
u
u
u
v
i times
ci di
![Page 17: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/17.jpg)
Context Logic with Composition
• Adding context composition “fixes” the counterexample – we can now split contexts
• Not yet proved adjunct elimination
• Still can’t split contexts in the same way as trees
![Page 18: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/18.jpg)
![Page 19: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/19.jpg)
![Page 20: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/20.jpg)
![Page 21: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/21.jpg)
![Page 22: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/22.jpg)
![Page 23: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/23.jpg)
Multi-holed Context Logic for Trees
![Page 24: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/24.jpg)
Ehrenfeucht-Fraïssé Games
• We prove adjunct elimination using ranked games– Played between Spoiler and Duplicator– On two tree contexts– Moves correspond with logical connectives– Rank determines which moves may be played and ensures
termination
• Spoiler’s aim is to demonstrate a difference between the two trees. Duplicator’s aim is to prevent this.
• The games are sound and complete: Spoiler has a winning strategy if and only if the trees can be distinguished by a formula of the game rank (of which there are finitely many)
![Page 25: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/25.jpg)
Games
• Spoiler starts each round by choosing a move to play (providing that the rank and rules allow it) and one of the context-environment pairs
• The rules for the move determine what happens
((c, σ), (c', σ'), (n, s, L))
tree contextenvironment
rank
non-adjunct moves
adjunct moves node
labels
![Page 26: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/26.jpg)
Game Moves
![Page 27: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/27.jpg)
CMP move
![Page 28: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/28.jpg)
CMP move
![Page 29: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/29.jpg)
CMP move
![Page 30: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/30.jpg)
CMP move
![Page 31: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/31.jpg)
CMP move
![Page 32: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/32.jpg)
CMP move
![Page 33: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/33.jpg)
Game Moves
![Page 34: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/34.jpg)
RIG move
![Page 35: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/35.jpg)
RIG move
![Page 36: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/36.jpg)
RIG move
![Page 37: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/37.jpg)
RIG move
![Page 38: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/38.jpg)
RIG move
![Page 39: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/39.jpg)
RIG move
![Page 40: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/40.jpg)
RIG move
![Page 41: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/41.jpg)
RIG move
![Page 42: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/42.jpg)
Adjunct Elimination
• We prove that whenever Spoiler has a winning strategy using adjunct moves he also has one without using adjunct moves
• By soundness and completeness of games, this implies adjunct elimination
![Page 43: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/43.jpg)
Key Result
• We need to show:If Duplicator can win when Spoiler plays no
adjunct moves then Duplicator can also win when Spoiler plays adjunct moves
• We show how Duplicator responds to one adjunct move (LEF or RIG)
• The result follows by induction
![Page 44: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/44.jpg)
![Page 45: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/45.jpg)
![Page 46: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/46.jpg)
![Page 47: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/47.jpg)
![Page 48: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/48.jpg)
![Page 49: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/49.jpg)
![Page 50: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/50.jpg)
Key Result
![Page 51: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/51.jpg)
Proof
• The proof is by induction on n
• We look at the cases for which move Spoiler plays on the composite game
• Some cases have sub-cases
• Example: CMP move
![Page 52: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/52.jpg)
![Page 53: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/53.jpg)
CMP move (case 1)
![Page 54: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/54.jpg)
CMP move (case 2)
![Page 55: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/55.jpg)
CMP move (case 3)
![Page 56: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/56.jpg)
CMP move (case 4)
![Page 57: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/57.jpg)
CMP move (case 1)
![Page 58: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/58.jpg)
CMP move (case 1)
![Page 59: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/59.jpg)
CMP move (case 1)
![Page 60: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/60.jpg)
CMP move (case 1)
![Page 61: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/61.jpg)
CMP move (case 1)
![Page 62: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/62.jpg)
CMP move (case 1)
![Page 63: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/63.jpg)
CMP move (case 1)
![Page 64: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/64.jpg)
Related and Further Work
• Without adjuncts, Context Logic formulae can be expressed by regular forest grammars
• Heuter and Bojańczyk have studied similar classes of regular languages that correspond to definability in First-Order Logic
• Automata may give a decision procedure for multi-holed Context Logic with adjoints
• Multi-holed Context Logic may prove useful for concurrent tree update
• Calcagno, Gardner and Zarfaty have shown that adjunct elimination does not hold on open formulae (i.e. with propositional variables)
![Page 65: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/65.jpg)
Conclusions
• Adjunct elimination does not hold for single-holed Context Logic for trees
• Multi-holed Context Logic is a natural extension of the single-holed logic
• Adjunct elimination does hold for this logic
![Page 66: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/66.jpg)
As the poet said, ‘Only God can make a tree’ –probably because it’s so hard to figure out how to get the bark on.
– Woody Allen
![Page 67: Adjunct Elimination in Context Logic for Trees](https://reader036.vdocuments.net/reader036/viewer/2022081519/56813b7c550346895da490f8/html5/thumbnails/67.jpg)
Satisfaction Relation