Revert "bf.hs: clarified parameter names in optimize"

This reverts commit 42b0eb9666d4bca0fa92dc15b029570deb88a377.
Revert "Revert "bf.hs: clarified parameter names in optimize""

This reverts commit 070ccf3498ddbe4bca1639269f54558a23d9a02e.
Revert "bf.ml: update the parser: change the result type to a command array instead of a command list"

This reverts commit 62a8511179acc8316a1a0ebadd90b1a0feb3ca13.
bf.ml: restore parser based on lists, and implement the optimizer