see also palasm, galasm, wincupl etc (eg https://github.com/daveho/GALasm ) On logic minimization, heres Hamish's minimo.imp There's also a package somewhere called 'reduce'.