module Main where
import System.Environment (getArgs)
import DFA
import FST
import JFF
import HW43


-- |HW43test fst1 fst2 fst3:
--  Checks if fst2(fst1(w)) = fst3(w) for all input strings w
main = do 
  [filename1, filename2, filename3] <- getArgs
  fst1JFF <- readFile filename1
  fst2JFF <- readFile filename2
  fst3JFF <- readFile filename3
  let (Just fst1) = readFST fst1JFF
  let (Just fst2) = readFST fst2JFF
  let (Just fst3) = readFST fst3JFF
  print (isEmpty (diffFST (composeFST fst2 fst1) fst3))
