To demonstrate derivation of monadic programs, we present a specification of sorting using the non-determinism monad, and derive pure quicksort on lists and state-monadic quicksort on arrays. In the derivation one may switch between point-free and pointwise styles, and deploy techniques familiar to functional programmers such as pattern matching and induction on structures or on sizes. Derivation of stateful programs resembles reasoning backwards from the postcondition.


翻译:为了展示蒙拿迪程序衍生,我们提出了一个使用非确定性山岳来分类的规格,并且从列表和阵列上产生纯等离子体,并在阵列上产生纯等离子体。 在引出时,我们可以在点和点风格之间转换,并运用功能程序员熟悉的技术,如结构或大小上的模式匹配和感应。 典型程序的推理类似于后条件的倒推理。

0
下载
关闭预览

相关内容

专知会员服务
161+阅读 · 2021年3月6日
专知会员服务
82+阅读 · 2020年9月28日
专知会员服务
19+阅读 · 2020年9月6日
专知会员服务
61+阅读 · 2020年3月19日
RL 真经
CreateAMind
6+阅读 · 2018年12月28日
已删除
将门创投
3+阅读 · 2018年8月21日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
4+阅读 · 2018年4月30日
VIP会员
最新内容
探秘Palantir:驱动美情报的科技巨头
专知会员服务
2+阅读 · 今天3:14
《美国海军军事海运司令部 2026年手册》
专知会员服务
2+阅读 · 今天3:05
《人工智能使能系统可靠性框架》
专知会员服务
5+阅读 · 今天2:28
2026“人工智能+”行业发展蓝皮书(附下载)
专知会员服务
13+阅读 · 4月26日
《强化学习数学基础》
专知会员服务
9+阅读 · 4月26日
“Maven计划”的发展演变之“Maven智能系统”应用
相关VIP内容
相关资讯
RL 真经
CreateAMind
6+阅读 · 2018年12月28日
已删除
将门创投
3+阅读 · 2018年8月21日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员