Complete correctness result for translation to hierarchical DAGs