一句话:提出基于构造拓扑的程序语义,利用非确定性/部分性及空间模式匹配,在精确实数计算中实现可计算的离散决策。
许多安全关键系统用浮点表示输入输出,但其行为规格使用实数;精确实数算术可使计算严格匹配规格,却使离散决策变得不可计算:在 R 等连通空间上无法实现完全、确定的判定。本文提出基于构造拓扑的程序语言语义,并给出允许非确定性或部分性的变体;结果表明,非确定性或部分性任一即可在连通空间上支持可计算决策。作者进一步引入空间模式匹配,将函数式编程的模式匹配推广到空间,模式不必是可判定谓词,且可重叠或不穷尽,分别对应非确定性与部分性。非确定性和/或部分性还给出构造近似判定过程的形式逻辑。最后,他们扩展精确实数算术语言 Marshall 并实现若干程序。
Though many safety-critical software systems use floating point to represent real-world input and output, the mathematical specifications of these systems' behaviors use real numbers. Significant deviations from those specifications can cause errors and jeopardize safety. To ensure system safety, some programming systems offer exact real arithmetic, which often enables a program's computation to match its mathematical specification exactly. However, exact real arithmetic complicates decision-making: in these systems, it is impossible to compute (total and deterministic) discrete decisions based on connected spaces such as R. We present programming-language semantics based on constructive topology with variants allowing nondeterminism and/or partiality. Either nondeterminism or partiality suffices to allow computable decision making on connected spaces such as R. We then introduce pattern matching on spaces, a language construct for creating programs on spaces, generalizing pattern matching in functional programming, where patterns need not represent decidable predicates and also may overlap or be inexhaustive, giving rise to nondeterminism or partiality, respectively. Nondeterminism and/or partiality also yield formal logics for constructing approximate decision procedures. We extended the Marshall language for exact real arithmetic with these constructs and implemented some programs with it.