Add function to transform program description into graph