Substitutions

"SUB" grammars perform simultaneous rewriting of symbols in the work string. For instance,

SUB
S --> A B B A B B A
A B --> a B
B A --> B b
A A --> c c
A B A --> A d A
B B A --> B e A
B B --> f B
produces string "afeafeb" in one single " parallel derivation".

The string "ABBABBA" is rewritten "afeafeb" as shown Fig.14.


Fig.14 A substitution in a "SUB" grammar

Substitutions may be used for designing a general category of unidimensional cellular automata and some multidimensional ones.

If substitutions are performed on strings of terminal symbols, each step may produce an interesting sound-object sequence. For this reason, it is possible to instruct BP2 to play all substitutions in the "Improvize" mode. The option is given in the "Settings" dialog. See an application in "-gr.koto3".