Recursive processing of directed acyclic graphs