Anglican is a probabilistic programming system designed to interoperate with Clojure and other JVM languages. We introduce the programming language Anglican, outline our design choices, and discuss in depth the implementation of the Anglican language and runtime, including macro-based compilation, extended CPS-based evaluation model, and functional representations for probabilistic paradigms, such as a distribution, a random process, and an inference algorithm. We show that a probabilistic functional language can be implemented efficiently and integrated tightly with a conventional functional language with only moderate computational overhead. We also demonstrate how advanced probabilistic modeling concepts are mapped naturally to the functional foundation.
翻译:英国圣公会是一个概率性编程系统,旨在与克洛日尔和其他JVM语言进行互动。我们引入了编程语言英国圣公会,概述了我们的设计选择,深入讨论了英国圣公会语言的实施和运行时间,包括宏观汇编、扩展的CPS评价模式,以及概率性模式(如分布、随机过程和推论算法)的功能代表。我们表明,可以高效地使用概率性功能性语言,并与常规功能性语言紧密结合,只有中等的计算间接费用。我们还展示了如何将先进的概率模型概念自然地映射到功能基础。