论文标题

从建设性类型理论中的证明中提取有效的精确数量计算

Extracting efficient exact real number computation from proofs in constructive type theory

论文作者

Konečný, Michal, Park, Sewon, Thies, Holger

论文摘要

精确的真实计算是浮点算术的替代方法,在没有引入舍入错误的情况下,精确执行实数的操作。在证明实现的正确性时,人们只能专注于问题的数学属性,而无需考虑代表实数的微妙之处。我们在相关类型理论中提出了对实数的新公理化,目的是从建设性证明中提取认证的精确计算程序。我们的形式化不同于类似的方法,因为我们以概念上的方式与某些成熟的真实计算的实现相似。可以直接提取对实施中的原始操作,从而在此类实施中提取相应的操作,从而产生更有效的程序。我们特别关注部分和非确定计算的形式化,这对于确切的实际计算至关重要。 我们通过可计算分析的标准可实现解释来证明形式化的健全性,并展示了如何将我们的理论与真实的经典形式化联系起来。我们通过在COQ证明助手中实施我们的理论来证明我们的理论的可行性。从示例中,我们自动提取了使用确切的真实计算框架Aern的Haskell程序,以有效地对实数执行精确操作。在实验中,就运行时间和内存使用而言,提取的程序的行为与AERN中的本机实现相似。

Exact real computation is an alternative to floating-point arithmetic where operations on real numbers are performed exactly, without the introduction of rounding errors. When proving the correctness of an implementation, one can focus solely on the mathematical properties of the problem without thinking about the subtleties of representing real numbers. We propose a new axiomatization of the real numbers in a dependent type theory with the goal of extracting certified exact real computation programs from constructive proofs. Our formalization differs from similar approaches, in that we formalize the reals in a conceptually similar way as some mature implementations of exact real computation. Primitive operations on reals can be extracted directly to the corresponding operations in such an implementation, producing more efficient programs. We particularly focus on the formalization of partial and nondeterministic computation, which is essential in exact real computation. We prove the soundness of our formalization with regards of the standard realizability interpretation from computable analysis and show how to relate our theory to a classical formalization of the reals. We demonstrate the feasibility of our theory by implementing it in the Coq proof assistant and present several natural examples. From the examples we have automatically extracted Haskell programs that use the exact real computation framework AERN for efficiently performing exact operations on real numbers. In experiments, the extracted programs behave similarly to native implementations in AERN in terms of running time and memory usage.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源