add tree and graph definition source