计算机科学 > 程序设计语言
[提交于 2012年3月11日]
标题:Discovering Algorithms with Matrix Code
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:In first-year programming courses it is often difficult to show students how an algorithm can be discovered. In this paper we present a program format that supports the development from specification to code in small and obvious steps; that is, a discovery process. The format, called Matrix Code, can be interpreted as a proof according to the Floyd-Hoare program verification method. The process consists of expressing the specification of a function body as an initial code matrix and then growing the matrix by adding rows and columns until the completed matrix is translated in a routine fashion to compilable code. As worked example we develop a Java program that generates the table of the first N prime numbers.
提交历史
来自:M. H. van Emden[v1] 2012年3月11日 星期日 00:12:56 UTC