We give a domain-theoretic semantics to a statistical programming language, using the plain old category of dcpos, in contrast to some more sophisticated recent proposals. Remarkably, our monad of minimal valuations is commutative, which allows for program transformations that permute the order of independent random draws, as one would expect. A similar property is not known for Jones and Plotkin' s monad of continuous valuations. Instead of working with true real numbers, we work with exact real arithmetic, providing a bridge towards possible implementations. (Implementations by themselves are not addressed here.) Rather remarkably, we show that restricting ourselves to minimal valuations does not restrict us much: all measures on the real line can be modeled by minimal valuations on the domain $\mathbf{I}\mathbb{R}_\bot$ of exact real arithmetic. We give three operational semantics for our language, and we show that they are all adequate with respect to the denotational semantics. We also explore quite a few examples in order to demonstrate that our semantics computes exactly as one would expect, and in order to debunk the myth that a semantics based on continuous maps would not be expressive enough to encode measures with non-compact support using only measures with compact support, or to encode measures via non-continuous density functions, for instance. Our examples also include some useful, non-trivial cases of distributions on higher-order objects.
翻译:我们给统计编程语言提供了一种域论语义, 与最近一些更复杂的建议相反, 我们使用平坦的古老的 dcpos 类, 与最近一些更复杂的建议相反。 值得注意的是, 我们的最小值的修道院是通俗的, 从而可以按照人们的预期, 使独立随机抽取的顺序精确。 Jones 和 Plotkin 连续估值的修道院没有类似的属性。 我们用真实的数字来工作, 我们使用精确真实的算术来工作, 为可能的执行提供一座桥梁。 ( 执行本身没有在这里讨论。 ) 相反, 我们表明, 将自己限制在最低值上, 并不会限制我们多少: 真正线上的所有措施都可以通过最小值的 $\ mathb{ I ⁇ mathb{R ⁇ boot$ 来模拟程序转换。 我们用我们的语言给出三种操作性精细的语义语义语义, 并且我们证明它们都足够用非直观的语义性言语义学。 我们还探索了几个例子, 来证明我们的语义学解释性言语义学的精准, 将不直观的言语义性言语义性言语义表达的表达的原理, 只能用一个不精确的不精确的语义性言行, 、 使用一种不直言语义的言行的言语义性言语义性言语法的言语法, 。