Programs with multiphase control-flow are programs where the execution passes through several (possibly implicit) phases. Proving termination of such programs (or inferring corresponding runtime bounds) is often challenging since it requires reasoning on these phases separately. In this paper we discuss techniques for proving termination of such programs, in particular: (1) using multiphase ranking functions, where we will discuss theoretical aspects of such ranking functions for several kinds of program representations; and (2) using control-flow refinement, in particular partial evaluation of Constrained Horn Clauses, to simplify the control-flow allowing, among other things, to prove termination with simpler ranking functions.
翻译:多阶段控制流程方案是执行过程经过若干(可能隐含的)阶段的方案。证明终止这类方案(或推断相应的运行时间界限)往往具有挑战性,因为它要求分别对这些阶段进行推理。在本文件中,我们讨论了证明终止此类方案的技术,特别是:(1) 使用多阶段排序功能,我们将在其中讨论若干类型的方案表述中这类排序功能的理论方面;(2) 使用控制流程改进,特别是部分评价受约束的《非洲之角条款》,以简化控制流程,除其他外,允许以更简单的排序功能证明终止。