Unless you argue that there are only 2^32 possible values for n here and so all I have done is defined a very large finite context free grammar. But in this case you may as well say that everything is a finite state machine.

I think this means that the "Impure" criterion for parameters will have be rethought.

Code: Select all

```
/*
A set of CF3 rules to generate the language
{XYZ, XXYYZZ, XXXYYYZZZ, ...}
*/
startshape S
//CF::Impure=1
shape S{ X(0)[a -.3] }
shape X(natural n)
rule 10{
CIRCLE[sat 1 b 1]
X(n+1)[x 1 r -5..5]
arrow[ b -1 a 1 x .3]
}
rule 1{
CIRCLE[sat 1 b 1]
arrow[ r -90 b -1 a 1 y -.3]
Y(n+1,n+1)[ y -1 r 190]
}
shape Y(natural n,natural m){
if (n>0){
SQUARE[r 45 sat 1 b .8 h 120]
Y(n--1,m)[x 1 r -5..5]
if (n>1) arrow[ b -1 a 1 x .3]
else arrow[ r 90 b -1 a 1 y .3]
}
else {
Z(m)[x -1 y 1 r 170]
}
}
shape Z(natural n) {
if (n>0){
TRIANGLE[sat 1 b 1 h 240]
Z(n--1)[x 1 r -5..5]
if (n>1) arrow[ b -1 a 1 x .3]
}
}
shape arrow{
SQUARE[[s .25 .15 x .5 z 99]]
TRIANGLE[s .3 r -90 x .3 z 99]
}
```