Since its birth as a new scientific body of knowledge in the late 1950s, computer programming has become a fundamental skill needed in many other disciplines. However, programming is not easy, it is prone to errors and code re-use is key for productivity. This calls for high-quality documentation in software libraries, which is quite often not the case. Taking a few Haskell functions available from the Hackage repository as case-studies, and comparing their descriptions with similar functions in other languages, this paper shows how clarity and good conceptual design can be achieved by following a so-called easy-hard-split formal strategy that is quite general and productive, even if used informally. This strategy is easy to use in functional programming and can be applied to both program analysis and synthesis.


翻译:自 20 世纪 50 年代末作为一门新兴科学知识体系诞生以来,计算机编程已成为许多其他学科所需的一项基本技能。然而,编程并非易事,它容易出错,而代码复用是提高生产力的关键。这要求软件库具备高质量的文档,但实际情况往往并非如此。本文以 Hackage 代码库中提供的若干 Haskell 函数作为案例研究,通过比较其与其他语言中类似函数的描述,展示了如何通过遵循一种所谓“易难分离”的形式化策略来实现清晰性与良好的概念设计。该策略具有相当的通用性和高效性,即使非正式使用亦能奏效。此策略易于在函数式编程中应用,并可同时适用于程序分析与程序综合。

0
下载
关闭预览

相关内容

Haskell 是一种纯函数式编程语言,于 1990 年在编程语言 Miranda 的基础上标准化,并且以 λ 演算为基础发展而来。
【ETHZ博士论文】机器学习代码: 安全性与可靠性
专知会员服务
19+阅读 · 2024年10月25日
【经典书】时间序列和预测的介绍,428页pdf
专知会员服务
94+阅读 · 2022年5月14日
专知会员服务
55+阅读 · 2021年7月21日
【干货书】C++实战编程指南,附549页pdf与Slides
专知会员服务
84+阅读 · 2021年4月23日
【Manning新书】高级算法与数据结构,769页pdf
从 one-hot 到 BERT,带你一步步理解 BERT
数说工作室
21+阅读 · 2019年6月25日
我跑了ERNIE和BERT两个模型,结果出乎意料......
PaperWeekly
21+阅读 · 2019年6月24日
手把手教你用Python实现“坦克大战”,附详细代码!
机器学习算法与Python学习
12+阅读 · 2019年6月8日
考考你的眼力+细心度!
程序猿
11+阅读 · 2019年1月15日
这可能是学习Python最好的免费在线电子书
程序猿
56+阅读 · 2018年5月17日
福利 | 当Python遇上大数据与机器学习,入门so easy!
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月16日
Arxiv
0+阅读 · 2月11日
Arxiv
0+阅读 · 1月31日
VIP会员
相关VIP内容
【ETHZ博士论文】机器学习代码: 安全性与可靠性
专知会员服务
19+阅读 · 2024年10月25日
【经典书】时间序列和预测的介绍,428页pdf
专知会员服务
94+阅读 · 2022年5月14日
专知会员服务
55+阅读 · 2021年7月21日
【干货书】C++实战编程指南,附549页pdf与Slides
专知会员服务
84+阅读 · 2021年4月23日
相关资讯
【Manning新书】高级算法与数据结构,769页pdf
从 one-hot 到 BERT,带你一步步理解 BERT
数说工作室
21+阅读 · 2019年6月25日
我跑了ERNIE和BERT两个模型,结果出乎意料......
PaperWeekly
21+阅读 · 2019年6月24日
手把手教你用Python实现“坦克大战”,附详细代码!
机器学习算法与Python学习
12+阅读 · 2019年6月8日
考考你的眼力+细心度!
程序猿
11+阅读 · 2019年1月15日
这可能是学习Python最好的免费在线电子书
程序猿
56+阅读 · 2018年5月17日
福利 | 当Python遇上大数据与机器学习,入门so easy!
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员