Adding definition of Dmax in constants and semantic modifications for the generation...