struct definition generation