正几乎必然终止——复杂性与证明规则
Positive Almost-Sure Termination -- Complexity and Proof Rules
AI总结:
本文研究正几乎必然终止(PAST)的递归论复杂度,证明其为Π^1_1完全,给出将概率终止归约为非概率终止的有效方法,并提出基于超限序数(最高至ω_1^CK)的可靠完备证明规则,表明现有排序上鞅技术不足以推理PAST。
摘要:
我们研究在具有有理变量、有界非确定性选择和离散概率选择的命令式编程语言中,正几乎必然终止($\mathsf{PAST}$)的递归论复杂度。一个程序正几乎必然终止,如果对于每个调度器,该程序几乎必然终止,并且终止的期望运行时间是有限的。我们证明,对于我们的语言,$\mathsf{PAST}$ 是(浅面)共解析集的完全问题($Π^1_1$-完全)。这与相关的几乎必然终止($\mathsf{AST}$)和有界终止($\mathsf{BAST}$)概念形成对比,后两者都是算术的(分别为 $Π^0_2$ 和 $Σ^0_2$ 完全)。我们的上界意味着一种有效过程,可将概率终止的推理归约为在有界非确定性模型中非概率公平终止的推理,以及在无界非确定性模型中简单程序终止的推理。我们的下界表明相反的情况:对于每个具有无界非确定性选择的程序,存在一个具有有界选择的有效可计算概率程序,使得原始程序终止当且仅当变换后的程序是 $\mathsf{PAST}$。我们证明每个程序都有一个有效可计算的正规形式,其中每个概率选择要么立即继续执行,要么立即终止执行,每种情况的概率均为 $1/2$。对于正规形式程序,我们为 $\mathsf{PAST}$ 提供了一个可靠且完备的证明规则。我们的证明规则使用超限序数。我们证明,关于 $\mathsf{PAST}$ 的推理需要高达 $ω^{CK}_1$ 的超限序数;因此,基于将程序状态映射到实数的排序上鞅的现有概率终止技术不足以推理 $\mathsf{PAST}$。
英文摘要:
We study the recursion-theoretic complexity of Positive Almost-Sure Termination ($\mathsf{PAST}$) in an imperative programming language with rational variables, bounded nondeterministic choice, and discrete probabilistic choice. A program terminates positive almost-surely if, for every scheduler, the program terminates almost-surely and the expected runtime to termination is finite. We show that $\mathsf{PAST}$ for our language is complete for the (lightface) co-analytic sets ($Π^1_1$-complete). This is in contrast to the related notions of Almost-Sure Termination ($\mathsf{AST}$) and Bounded Termination ($\mathsf{BAST}$), both of which are arithmetical ($Π^0_2$ and $Σ^0_2$ complete respectively). Our upper bound implies an effective procedure to reduce reasoning about probabilistic termination to non-probabilistic fair termination in a model with bounded nondeterminism, and to simple program termination in models with unbounded nondeterminism. Our lower bound shows the opposite: for every program with unbounded nondeterministic choice, there is an effectively computable probabilistic program with bounded choice such that the original program is terminating $iff$ the transformed program is $\mathsf{PAST}$. We show that every program has an effectively computable normal form, in which each probabilistic choice either continues or terminates execution immediately, each with probability $1/2$. For normal form programs, we provide a sound and complete proof rule for $\mathsf{PAST}$. Our proof rule uses transfinite ordinals. We show that reasoning about $\mathsf{PAST}$ requires transfinite ordinals up to $ω^{CK}_1$; thus, existing techniques for probabilistic termination based on ranking supermartingales that map program states to reals do not suffice to reason about $\mathsf{PAST}$.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。