arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2203.00652cs.PL
收藏

解析随机性:解析器与随机生成器的统一与区别

Parsing Randomness: Unifying and Differentiating Parsers and Random Generators

Harrison Goldstein, Benjamin C. Pierce

摘要:

“生成器是随机性的解析器。“这种关于随机数据结构生成器的观点在程序设计语言社区中已经很好地建立了民间传说,但它显然从未被正式化,也没有深入探讨其后果。我们提出了免费的发电机,统一的解析和生成使用一个共同的结构,使两个概念之间的关系精确。自由生成器很自然地证明了一个大类的生成器可以被分解成一个解析器加上一个选择序列的分布。此外,自由生成器支持导数的概念,类似于熟悉的形式语言的Brzozowski导数,允许分析工具“预览”特定生成器选择的效果。这反过来又产生了一种新的算法,用于生成满足用户指定的先决条件的数据结构。

英文摘要:

"A generator is a parser of randomness." This perspective on generators for random data structures is well established as folklore in the programming languages community, but it has apparently never been formalized, nor have its consequences been deeply explored. We present free generators, which unify parsing and generation using a common structure that makes the relationship between the two concepts precise. Free generators lead naturally to a proof that a large class of generators can be factored into a parser plus a distribution over choice sequences. Further, free generators support a notion of derivative, analogous to familiar Brzozowski derivatives of formal languages, that allows analysis tools to "preview" the effect of a particular generator choice. This, in turn, gives rise to a novel algorithm for generating data structures satisfying user-specified preconditions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑