generate func def
lazy generate monitor code
update DScriptGenerator