逐层-组合Monads
Layer by layer - Combining Monads
摘要:
我们开发了一种方法来增量地构造程序设计语言。我们的方法是分类的:语言的每一层都被描述为一个单子。我们的方法或者(i)具体地在两个单子之间建立一个分配律,即语言的层,然后为层的组成提供一个单子结构,或者(ii)精确地识别分配律存在的代数障碍,并给出一个最佳近似语言。运行的示例将涉及三个层:一个基本的命令式语言,首先通过添加非确定性和概率选择来丰富。第一个扩展可以无缝地工作,但是第二个遇到了一个障碍,这导致了一个结构上非常类似于概率网络规约语言ProbNetKAT的最佳近似语言。
英文摘要:
We develop a method to incrementally construct programming languages. Our approach is categorical: each layer of the language is described as a monad. Our method either (i) concretely builds a distributive law between two monads, i.e. layers of the language, which then provides a monad structure to the composition of layers, or (ii) identifies precisely the algebraic obstacles to the existence of a distributive law and gives a best approximant language. The running example will involve three layers: a basic imperative language enriched first by adding non-determinism and then probabilistic choice. The first extension works seamlessly, but the second encounters an obstacle, which results in a best approximant language structurally very similar to the probabilistic network specification language ProbNetKAT.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。