transforming cycle rewriting into string rewritingsabel/slides/slides-rta15.pdf · 1 transforming...
TRANSCRIPT
![Page 1: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/1.jpg)
1
Transforming Cycle Rewritinginto String Rewriting
David Sabel1 and Hans Zantema2,3
1Goethe University Frankfurt, Germany
2TU Eindhoven, The Netherlands3Radboud University Nijmegen, The Netherlands
RTA 2015, Warsaw, Poland
![Page 2: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/2.jpg)
Cycle Rewriting
A cycle is a string in whichthe start and end are connected.
b a b c b a b b b a c c ba
bcb
ab
c
c a b
b
Cycle rewriting ◦→applies string rewrite rules to cycles, e.g. R ={cba → aabbcc}
ba
bcb
ab
c
c a b
bb
a
bcb
ab
c
c a b
b
◦→R
b
cc
b
baa
b
ab
cc
a b bb
cc
b
baa
b
ab
cc
a b b
◦→R
bc
cb
b
aabc
cb
ba
a
c a b b
2/18
![Page 3: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/3.jpg)
Cycle Rewriting
A cycle is a string in whichthe start and end are connected.
b a b c b a b b b a c c ba
bcb
ab
c
c a b
b
Cycle rewriting ◦→applies string rewrite rules to cycles, e.g. R ={cba → aabbcc}
ba
bcb
ab
c
c a b
b
ba
bcb
ab
c
c a b
b
◦→R
b
cc
b
baa
b
ab
cc
a b bb
cc
b
baa
b
ab
cc
a b b
◦→R
bc
cb
b
aabc
cb
ba
a
c a b b
2/18
![Page 4: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/4.jpg)
Cycle Rewriting
A cycle is a string in whichthe start and end are connected.
b a b c b a b b b a c c ba
bcb
ab
c
c a b
b
Cycle rewriting ◦→applies string rewrite rules to cycles, e.g. R ={cba → aabbcc}
ba
bcb
ab
c
c a b
b
ba
bcb
ab
c
c a b
b
◦→R
b
cc
b
baa
b
ab
cc
a b bb
cc
b
baa
b
ab
cc
a b b
◦→R
bc
cb
b
aabc
cb
ba
a
c a b b
2/18
![Page 5: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/5.jpg)
Cycle Rewriting
A cycle is a string in whichthe start and end are connected.
b a b c b a b b b a c c ba
bcb
ab
c
c a b
b
Cycle rewriting ◦→applies string rewrite rules to cycles, e.g. R ={cba → aabbcc}
ba
bcb
ab
c
c a b
b
ba
bcb
ab
c
c a b
b
◦→R
b
cc
b
baa
b
ab
cc
a b b
b
cc
b
baa
b
ab
cc
a b b
◦→R
bc
cb
b
aabc
cb
ba
a
c a b b
2/18
![Page 6: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/6.jpg)
Cycle Rewriting
A cycle is a string in whichthe start and end are connected.
b a b c b a b b b a c c ba
bcb
ab
c
c a b
b
Cycle rewriting ◦→applies string rewrite rules to cycles, e.g. R ={cba → aabbcc}
ba
bcb
ab
c
c a b
b
ba
bcb
ab
c
c a b
b
◦→R
b
cc
b
baa
b
ab
cc
a b b
b
cc
b
baa
b
ab
cc
a b b
◦→R
bc
cb
b
aabc
cb
ba
a
c a b b
2/18
![Page 7: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/7.jpg)
Cycle Rewriting
A cycle is a string in whichthe start and end are connected.
b a b c b a b b b a c c ba
bcb
ab
c
c a b
b
Cycle rewriting ◦→applies string rewrite rules to cycles, e.g. R ={cba → aabbcc}
ba
bcb
ab
c
c a b
b
ba
bcb
ab
c
c a b
b
◦→R
b
cc
b
baa
b
ab
cc
a b b
b
cc
b
baa
b
ab
cc
a b b
◦→R
bc
cb
b
aabc
cb
ba
a
c a b b
2/18
![Page 8: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/8.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
T: thinking philosopherF: fork
L: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 9: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/9.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
F
TFT
FT
F TF
T
T: thinking philosopherF: forkL: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 10: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/10.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
F
TFT
FT
F TF
T
T: thinking philosopherF: forkL: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 11: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/11.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
F
TL
FT
F TF
T
T: thinking philosopherF: forkL: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 12: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/12.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
F
TL
FT
F TF
T
T: thinking philosopherF: forkL: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 13: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/13.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
FTE
TF T
F
T
T: thinking philosopherF: forkL: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 14: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/14.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
FTE
TF T
F
T
T: thinking philosopherF: forkL: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 15: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/15.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
F
TFT
FT
F TF
T
T: thinking philosopherF: forkL: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 16: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/16.jpg)
Applications of Cycle Rewriting
Termination analysis for graph transformation systems[Bruggink,Konig,Zantema 2014, IFIP TCS]
Some systems are naturally cycle rewrite systems:
F
TFT
FT
F TF
T
T: thinking philosopherF: forkL: philosopher has left forkE: eating philosopher
Rewrite rules:
T F → L (pick up left fork)
F L → E (pick up right fork and eat)
E → F T F (stop eating and put down forks)
3/18
![Page 17: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/17.jpg)
Cycle Rewriting (Formally)
Let Σ be an alphabet, R be an SRS over Σ
u ∼ v = strings u, v ∈ Σ∗ represent the same cycle:
u ∼ v iff ∃w1, w2 : u = w1w2 and v = w2w1
cycle [u] = equivalence class of string u w.r.t. ∼
cycle rewrite relation ◦→R ⊆ (Σ/∼× Σ/∼) of R:
[u] ◦→R [v] iff ∃w ∈ Σ∗ : u ∼ `w, (`→ r) ∈ R, and rw ∼ v
4/18
![Page 18: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/18.jpg)
Cycle Termination
◦→R is non-terminating iff there exists an infinite sequence
[u0] ◦→R [u1] ◦→R [u2] ◦→R · · ·
Otherwise, ◦→R is terminating.
Cycle-termination is different from string-termination:
for R = {ab→ ba}
→R is terminating, but
◦→R is non-terminating
But non-termination of →R implies non-termination of ◦→R
5/18
![Page 19: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/19.jpg)
Cycle Termination
◦→R is non-terminating iff there exists an infinite sequence
[u0] ◦→R [u1] ◦→R [u2] ◦→R · · ·
Otherwise, ◦→R is terminating.
Cycle-termination is different from string-termination:
for R = {ab→ ba}
→R is terminating, but
◦→R is non-terminating
But non-termination of →R implies non-termination of ◦→R
5/18
![Page 20: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/20.jpg)
Previous Work [Zantema,Konig,Bruggink 2014,RTA-TLCA]
Termination techniques
arctic and tropical matrix interpretations based on type-graphs
implemented in torpacyc, iteratively removes rewrite rules usingrelative termination
technique can only remove rules which are applied at mostpolynomially often in any derivation
Complexity
Transformation φ on SRSs R (“string rewriting → cycle rewriting”) s.t.
→R is string-terminating ⇐⇒ ◦→φ(R) is cycle-terminating
Consequences:
proving cycle-termination is at least as hard as string-termination
proving cycle-termination is undecidable
6/18
![Page 21: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/21.jpg)
Previous Work [Zantema,Konig,Bruggink 2014,RTA-TLCA]
Termination techniques
arctic and tropical matrix interpretations based on type-graphs
implemented in torpacyc, iteratively removes rewrite rules usingrelative termination
technique can only remove rules which are applied at mostpolynomially often in any derivation
Complexity
Transformation φ on SRSs R (“string rewriting → cycle rewriting”) s.t.
→R is string-terminating ⇐⇒ ◦→φ(R) is cycle-terminating
Consequences:
proving cycle-termination is at least as hard as string-termination
proving cycle-termination is undecidable
6/18
![Page 22: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/22.jpg)
Our Contributions: Improved Termination Techniques
Transformational approach
1 reduce cycle-termination to string-termination
2 apply state-of-the-art ATPs to prove string-termination
required: transformation ψ : “cycle rewriting → string rewriting” which is
sound: →ψ(R) is string-terminating =⇒ ◦→R is cycle-terminating
complete: ◦→R is cycle-terminating =⇒ →ψ(R) is string-terminating
We provide three sound and complete transformations split, rotate, shift
Trace-decreasing matrix interpreations
following a suggestion of Johannes Waldmann
extend the matrix interpretations from[Zantema,Konig,Bruggink 2014,RTA]
7/18
![Page 23: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/23.jpg)
Our Contributions: Improved Termination Techniques
Transformational approach
1 reduce cycle-termination to string-termination
2 apply state-of-the-art ATPs to prove string-termination
required: transformation ψ : “cycle rewriting → string rewriting” which is
sound: →ψ(R) is string-terminating =⇒ ◦→R is cycle-terminating
complete: ◦→R is cycle-terminating =⇒ →ψ(R) is string-terminating
We provide three sound and complete transformations split, rotate, shift
Trace-decreasing matrix interpreations
following a suggestion of Johannes Waldmann
extend the matrix interpretations from[Zantema,Konig,Bruggink 2014,RTA]
7/18
![Page 24: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/24.jpg)
The Transformation Split: Idea
For a cycle rewrite step [u1] ◦→{`→r} [u2] and v1 ∈ [u1]
case 1: v1→{`→r} v2 where v2 ∈ [u2]
cd
cba
dc
b
a a c
d
ca
aaa
dc
b
a a c
d
c d a b c d c d c a a b c d a a a a c d c a a b
◦→{abcd→aaaa}
→{abcd→aaaa}
8/18
![Page 25: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/25.jpg)
The Transformation Split: Idea
For a cycle rewrite step [u1] ◦→{`→r} [u2] and v1 ∈ [u1]
case 1: v1→{`→r} v2 where v2 ∈ [u2]
cd
cba
dc
b
a a c
d
ca
aaa
dc
b
a a c
d
c d a b c d c d c a a b c d a a a a c d c a a b
◦→{abcd→aaaa}
→{abcd→aaaa}
8/18
![Page 26: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/26.jpg)
The Transformation Split: Idea
For a cycle rewrite step [u1] ◦→{`→r} [u2] and v1 ∈ [u1]
case 2: we can split ` = `A`B s.t.
prefix string rewrite step︷ ︸︸ ︷
v1 = `Bu`A→{`B→ε} u`A→{`A→r} ur where ur ∈ [u2]
︸ ︷︷ ︸suffix string rewrite step
cd
cba
dc
b
a a c
d
cd
cba
aa
a
a a c
d
c d a b c d c d c a a b a b c d c d c a a a a a
◦→{abcd→aaaa}
cdabcdcdcaab→{cd→ε} abcdcdcaab→{ab→aaaa} abcdcdaaaa
cd→εab→aaaa
8/18
![Page 27: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/27.jpg)
The Transformation Split: Idea
For a cycle rewrite step [u1] ◦→{`→r} [u2] and v1 ∈ [u1]
case 2: we can split ` = `A`B s.t.
prefix string rewrite step︷ ︸︸ ︷v1 = `Bu`A→{`B→ε} u`A→{`A→r} ur where ur ∈ [u2]︸ ︷︷ ︸
suffix string rewrite step
cd
cba
dc
b
a a c
d
cd
cba
aa
a
a a c
d
c d a b c d c d c a a b a b c d c d c a a a a a
◦→{abcd→aaaa}
cdabcdcdcaab→{cd→ε} abcdcdcaab→{ab→aaaa} abcdcdaaaa
cd→εab→aaaa
8/18
![Page 28: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/28.jpg)
The Transformation Split
Naive (but sound) transformation:
Add all rewrite rules (`→ r)
Add all splitting rules (`A→ r) and (`B → ε) for ` = `A`B
⇒ results in non-terminating SRSs in most of the cases(i.e. whenever r contains some prefix `A)
Requirements for a better transformation (and for completeness)
ensure that split rules are only applied to a prefix or a suffix, resp.⇒ surround the string by fresh begin symbol B and end symbol E
synchronize the application of the prefix and the suffix rewrite step⇒ use fresh symbols a for a ∈ Σ, and W, L and Ri,j
9/18
![Page 29: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/29.jpg)
The Transformation Split
Naive (but sound) transformation:
Add all rewrite rules (`→ r)
Add all splitting rules (`A→ r) and (`B → ε) for ` = `A`B
⇒ results in non-terminating SRSs in most of the cases(i.e. whenever r contains some prefix `A)
Requirements for a better transformation (and for completeness)
ensure that split rules are only applied to a prefix or a suffix, resp.⇒ surround the string by fresh begin symbol B and end symbol E
synchronize the application of the prefix and the suffix rewrite step⇒ use fresh symbols a for a ∈ Σ, and W, L and Ri,j
9/18
![Page 30: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/30.jpg)
The Transformation Split
Definition of the transformation split(.)
For an SRS R over alphabet Σ, the SRS split(R) overΣsplit = Σ ∪ Σ ∪ {B,E, L,W,Ri,j} is constructed as follows:
Let (`→ r) ∈ R be the ith rule of R:
add rule `→ r (for case 1)
for every splitting ` = `A`B with |`A| = j, add the rules:
B`B → WRi,j (prefix rewrite step)
Ri,j a → aRi,j (synchronize, shift Ri,j in front of the suffix)
Ri,j `AE→ LrE (suffix rewrite step)
add rules aL→ La for all a ∈ Σ (clean up)
add rule WL→ B (finish)
10/18
![Page 31: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/31.jpg)
Split is Sound and Complete
Theorem
The transformation split is sound and complete,i.e. →split(R) is string-terminating iff ◦→R is cycle-terminating.
Soundness follows by construction:
[u] ◦→R [v] =⇒ BuE→+split(R) Bv′E where v′ ∼ v
Completeness can be shown by
type introduction [Zantema 1994, JSC]
a mapping Φ :: Σ∗split → Σ∗ with
∀u :: T : u→split(R) u′ =⇒ [Φ(u)] ◦→∗R [Φ(u′)]
11/18
![Page 32: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/32.jpg)
Trace-Decreasing Matrix Interpretations
Md := all d× d matrices A over IN s.t. A11 > 0
for A,B ∈Md,
A > B ⇐⇒ A11 > B11 ∧ ∀i, j : Aij ≥ BijA ≥ B ⇐⇒ ∀i, j : Aij ≥ Bij
a matrix interpretation 〈·〉 : Σ→Md is extended to strings as
〈ε〉 = I and 〈ua〉 = 〈u〉 × 〈a〉 for all u ∈ Σ∗, a ∈ Σ
where I is the identity matrix, × is matrix multiplication
12/18
![Page 33: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/33.jpg)
Trace-Decreasing Matrix Interpretations
Md := all d× d matrices A over IN s.t. A11 > 0
for A,B ∈Md,
A > B ⇐⇒ A11 > B11 ∧ ∀i, j : Aij ≥ BijA ≥ B ⇐⇒ ∀i, j : Aij ≥ Bij
a matrix interpretation 〈·〉 : Σ→Md is extended to strings as
〈ε〉 = I and 〈ua〉 = 〈u〉 × 〈a〉 for all u ∈ Σ∗, a ∈ Σ
where I is the identity matrix, × is matrix multiplication
12/18
![Page 34: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/34.jpg)
Trace-Decreasing Matrix Interpretations
Theorem
Let R′ ⊆ R be SRSs over Σ and let 〈·〉 : Σ→Md such that
◦→R′ is terminating,
〈`〉 ≥ 〈r〉 for all (`→ r) ∈ R′, and
〈`〉 > 〈r〉 for all (`→ r) ∈ R \R′.Then ◦→R is terminating.
Proof: The main observations are
trace(〈a〉 × 〈u〉) = trace(〈u〉 × 〈a〉) and thustrace(〈u〉) = trace(〈v〉) if u ∼ v>,≥ are stable w.r.t ×, and thus 〈`〉 > 〈r〉 =⇒ 〈`w〉 > 〈rw〉[u] ◦→R′ [v] =⇒ trace(〈u〉) ≥ trace(〈v〉), and
[u] ◦→R\R′ [v] =⇒ trace(〈u〉) > trace(〈v〉)
13/18
![Page 35: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/35.jpg)
Trace-Decreasing Matrix Interpretations
Theorem
Let R′ ⊆ R be SRSs over Σ and let 〈·〉 : Σ→Md such that
◦→R′ is terminating,
〈`〉 ≥ 〈r〉 for all (`→ r) ∈ R′, and
〈`〉 > 〈r〉 for all (`→ r) ∈ R \R′.Then ◦→R is terminating.
Proof: The main observations are
trace(〈a〉 × 〈u〉) = trace(〈u〉 × 〈a〉) and thustrace(〈u〉) = trace(〈v〉) if u ∼ v>,≥ are stable w.r.t ×, and thus 〈`〉 > 〈r〉 =⇒ 〈`w〉 > 〈rw〉[u] ◦→R′ [v] =⇒ trace(〈u〉) ≥ trace(〈v〉), and
[u] ◦→R\R′ [v] =⇒ trace(〈u〉) > trace(〈v〉)
13/18
![Page 36: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/36.jpg)
Improvements and Limitations
Trace-decreasing matrix interpretations
can remove rules which are applied exponentially often(improves [Zantema, Konig, Bruggink 2014,RTA])
impossible to remove rules which are applied more often
Example (adapted from [Hofbauer and Waldmann 2006,RTA])
R := φ({ab→ bca, cb→ bbc})= {RE → LE, aL→ La′, bL→ Lb′, cL→ Lc′, Ra′ → aR,
Rb′ → bR,Rc′ → cR, abL→ bcaR, cbL→ bbcR}
has cycle rewrite derivations where the number of ruleapplications is a tower of exponentials for each rule
impossible to prove cycle termination by trace-decreasingmatrix interpretations
but AProVE proves string termination of split(R)⇒ transformational approach succeeds
14/18
![Page 37: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/37.jpg)
Improvements and Limitations
Trace-decreasing matrix interpretations
can remove rules which are applied exponentially often(improves [Zantema, Konig, Bruggink 2014,RTA])
impossible to remove rules which are applied more often
Example (adapted from [Hofbauer and Waldmann 2006,RTA])
R := φ({ab→ bca, cb→ bbc})= {RE → LE, aL→ La′, bL→ Lb′, cL→ Lc′, Ra′ → aR,
Rb′ → bR,Rc′ → cR, abL→ bcaR, cbL→ bbcR}
has cycle rewrite derivations where the number of ruleapplications is a tower of exponentials for each rule
impossible to prove cycle termination by trace-decreasingmatrix interpretations
but AProVE proves string termination of split(R)⇒ transformational approach succeeds
14/18
![Page 38: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/38.jpg)
Improvements and Limitations
Trace-decreasing matrix interpretations
can remove rules which are applied exponentially often(improves [Zantema, Konig, Bruggink 2014,RTA])
impossible to remove rules which are applied more often
Example (adapted from [Hofbauer and Waldmann 2006,RTA])
R := φ({ab→ bca, cb→ bbc})= {RE → LE, aL→ La′, bL→ Lb′, cL→ Lc′, Ra′ → aR,
Rb′ → bR,Rc′ → cR, abL→ bcaR, cbL→ bbcR}
has cycle rewrite derivations where the number of ruleapplications is a tower of exponentials for each rule
impossible to prove cycle termination by trace-decreasingmatrix interpretations
but AProVE proves string termination of split(R)⇒ transformational approach succeeds
14/18
![Page 39: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/39.jpg)
Experiments
Techniques
torpacyc: trace decreasing matrix interpretations
transformations split, rotate, shift with AProVE and TTT2combination 1: first torpacyc then transformation split
combination 2: like combination 1, but first string-nonterminationcheck by AProVE, or TTT2, resp.
Tools and webinterface available via
http://www.ki.cs.uni-frankfurt.de/research/cycsrs
15/18
![Page 40: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/40.jpg)
Cycle Non-/Termination of TPDB/SRS-Standard
309
168
45
65
310
161
335
173
336
36torpacyc 2014
46torpacyc 2015
40split(AProVE)
30split(TTT2)
10rotate(AProVE)
6rotate(TTT2)
10shift(AProVE)
8shift(TTT2)
55comb1(AProVE)
55comb1(TTT2)
54comb2(AProVE)
54comb2(TTT2)
63any
cycle termination proved, cycle nontermination proved1315 problems, timeout 60sec, 916 problems remain open
16/18
![Page 41: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/41.jpg)
Cycle Non-/Termination of 50000 Random SRS
50000 randomly generated problems
of size 12 with |Σ| = 3
no obviously nonterminating problems
Results
rotate and shift show termination of 74 % of the problems
torpacyc and split show termination of 94 % of the problems
In total (combining all results):
No
4.7%
Maybe
1.1%
Yes
94.2%
17/18
![Page 42: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/42.jpg)
Conclusion & Future Work
Conclusion
new techniques to prove cycle termination
three sound and complete transformationsfrom cycle into string rewriting
transformation split seems to be useful in practice
trace-decreasing matrix interpretations
new techniques solve problems for which theearlier techniques failed
Future work
extend the benchmark problem set
specific methods for cycle non-termination
applications for cycle rewriting
18/18
![Page 43: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/43.jpg)
Conclusion & Future Work
Conclusion
new techniques to prove cycle termination
three sound and complete transformationsfrom cycle into string rewriting
transformation split seems to be useful in practice
trace-decreasing matrix interpretations
new techniques solve problems for which theearlier techniques failed
Future work
extend the benchmark problem set
specific methods for cycle non-termination
applications for cycle rewriting
18/18
![Page 44: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/44.jpg)
Conclusion & Future Work
Conclusion
new techniques to prove cycle termination
three sound and complete transformationsfrom cycle into string rewriting
transformation split seems to be useful in practice
trace-decreasing matrix interpretations
new techniques solve problems for which theearlier techniques failed
Future work
extend the benchmark problem set
specific methods for cycle non-termination
applications for cycle rewriting
18/18
![Page 45: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/45.jpg)
Conclusion & Future Work
Conclusion
new techniques to prove cycle termination
three sound and complete transformationsfrom cycle into string rewriting
transformation split seems to be useful in practice
trace-decreasing matrix interpretations
new techniques solve problems for which theearlier techniques failed
Future work
extend the benchmark problem set
specific methods for cycle non-termination
applications for cycle rewriting
18/18
![Page 46: Transforming Cycle Rewriting into String Rewritingsabel/slides/slides-rta15.pdf · 1 Transforming Cycle Rewriting into String Rewriting David Sabel1 and Hans Zantema2;3 1Goethe University](https://reader033.vdocuments.site/reader033/viewer/2022060221/5f0776c77e708231d41d1c57/html5/thumbnails/46.jpg)
Conclusion & Future Work
Conclusion
new techniques to prove cycle termination
three sound and complete transformationsfrom cycle into string rewriting
transformation split seems to be useful in practice
trace-decreasing matrix interpretations
new techniques solve problems for which theearlier techniques failed
Future work
extend the benchmark problem set
specific methods for cycle non-termination
applications for cycle rewriting
18/18