Transforming acyclic programs

Annalisa Bossi, Sandro Etalle
1994 ACM Transactions on Programming Languages and Systems  
An Unfold/Fold transformation system is a source-to-source rewriting methodology devised to improve the e ciency of a program. Any such transformation should preserve the main properties of the initial program: among them, termination. To this end, in the eld of logic programming, the class of acyclic programs plays an important role, as it is closely related to the one of terminating programs. The two classes coincide when negation is not allowed in the bodies of the clauses. In this paper it
more » ... . In this paper it is proven that the Unfold/Fold transformation system de ned by T amaki and Sato preserves the acyclicity of the initial program. As corollaries, it follows that when the transformation is applied to an acyclic program, then nite failure set for de nite programs is preserved in the case of normal programs, all major declarative and operational semantics are preserved as well. These results cannot be extended to the class of left terminating programs without modifying the de nition of the transformation. Theorem 2.7 Bez93] Let P be a de nite program, then P is terminating i P is acyclic.
doi:10.1145/183432.183434 fatcat:2jhmghvhqvbatilesgsjevrw7e