Generating dot for programs