modify the ast and add the new "dag" ast with its building function