add function of generating promela