Addition of GetInstSet(modules,cfg) function