update fortran code generation, readable version
small debug in shape analysis