import FST
bits = ['0','1']
flipFST = ([0,1,2],bits,bits,delta,2,out) where
delta q '0' = 1
delta q '1' = 0
out 0 = "0"
out 1 = "1"
out 2 = ""
data ABCD = A | B | C | D
nodup0FST = ([A,B,C,D],bits,bits,delta,A,out) where
delta A '0' = C
delta A '1' = B
delta B '0' = C
delta B '1' = B
delta C '0' = D
delta C '1' = B
delta D '0' = D
delta D '1' = B
out A = ""
out B = "1"
out C = "0"
out D = ""
nodup1FST = flipFST `composeFST` nodup0FST `composeFST` flipFST