arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1808.08989cs.SEcs.PL
收藏

程序设计的系统方法

A Systematic Approach to Programming

Maurice Chandoo

摘要:

我们展示了如何在任何命令式或函数式程序设计语言中系统地实现算法。该方法是基于这样的前提下,它是很容易写下来的算法如何进行一个具体的输入。这些信息--我们称之为执行跟踪--被用作导出所需程序的起点。与测试驱动开发相反,程序直接从测试用例构建,而不是单独编写。程序的操作、控制流和引导控制流的谓词是分开计算的,这使程序员不必同时考虑它们。我们证明了两个例子的方法,并讨论其效用。此外,我们提供了一个正式的框架,比较它与其他方法。

英文摘要:

We show how to systematically implement an algorithm in any imperative or functional programming language. The method is based on the premise that it is easy to write down how an algorithm proceeds on a concrete input. This information---which we call execution trace---is used as a starting point to derive the desired program. In contrast to test-driven development the program is directly constructed from the test cases instead of written separately. The program's operations, control flow and predicates guiding the control flow are worked out separately, which saves the programmer from having to think about them simultaneously. We demonstrate the method for two examples and discuss its utility. Additionally, we provide a formal framework to compare it with other approaches.

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

↑