Hostname: page-component-cc8bf7c57-hbs24 Total loading time: 0 Render date: 2024-12-12T02:08:51.310Z Has data issue: false hasContentIssue false

How to design co-programs

Published online by Cambridge University Press:  02 July 2021

JEREMY GIBBONS*
Affiliation:
Department of Computer Science, University of Oxford, Oxford, UK (e-mail: jeremy.gibbons@cs.ox.ac.uk)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

The observation that program structure follows data structure is a key lesson in introductory programming: good hints for possible program designs can be found by considering the structure of the data concerned. In particular, this lesson is a core message of the influential textbook “How to Design Programs” by Felleisen, Findler, Flatt, and Krishnamurthi. However, that book discusses using only the structure of input data for guiding program design, typically leading towards structurally recursive programs. We argue that novice programmers should also be taught to consider the structure of output data, leading them also towards structurally corecursive programs.

Video Abstract

Type
Education Matters
Copyright
© The Author(s) 2021. Published by Cambridge University Press

References

Bird, R. & Gibbons, J. (2003) Arithmetic coding with folds and unfolds. In Advanced Functional Programming 4, Jeuring, J. & Peyton Jones, S. (eds). Lecture Notes in Computer Science, vol. 2638. Springer-Verlag, pp. 126.CrossRefGoogle Scholar
Bloch, S., Clements, J., Felleisen, M., Findler, R., Fisler, K., Flatt, M., Proulx, V. & Krishnamurthi, S. (1995–2007) TeachScheme! https://teach-scheme.org/ Google Scholar
Bloch, S., Clements, J., Felleisen, M., Findler, R., Fisler, K., Flatt, M., Proulx, V. & Krishnamurthi, S. (2009–2012) Program by Design. https://programbydesign.org/ Google Scholar
Brooks, F. P. Jr (1975) The Mythical Man-Month: Essays on Software Engineering. Addison-Wesley.CrossRefGoogle Scholar
Felleisen, M., Findler, R. B., Flatt, M. & Krishnamurthi, S. (2001) How to Design Programs, 1st edn. MIT Press. https://htdp.org/2003-09-26/Book/ Google Scholar
Felleisen, M., Findler, R. B., Flatt, M. & Krishnamurthi, S. (2004) The structure and interpretation of the computer science curriculum. J. Funct. Program. 14(4), 365378.CrossRefGoogle Scholar
Felleisen, M., Findler, R. B., Flatt, M. & Krishnamurthi, S. (2018) How to Design Programs, 2nd edn. MIT Press. https://htdp.org/2018-01-06/Book/ Google Scholar
Gibbons, J. (2007) Metamorphisms: Streaming representation-changers. Science of Computer Programming 65(2), 108139.CrossRefGoogle Scholar
Gibbons, J. (2019) Coding with asymmetric numeral systems. In Mathematics of Program Construction, Hutton, G. (ed), Lecture Notes in Computer Science, vol. 11825. Springer-Verlag, pp. 444465.CrossRefGoogle Scholar
Hoare, C. A. R. (1972) Notes on data structuring. In Structured Programming, Dahl, O.-J., Dijkstra, E. W. & Hoare, C. A. R. (eds). APIC Studies in Data Processing. Academic Press, pp. 83174.Google Scholar
Jackson, M. A. (1975) Principles of Program Design. Academic Press.Google Scholar
Jackson, M. A. (2002) JSP in perspective. In Software Pioneers: Contributions to Software Engineering, Broy, M. & Denert, E. (eds). Springer-Verlag, pp. 480–493. Available at: http://mcs.open.ac.uk/mj665/JSPPers1.pdf Google Scholar
Meijer, E., Fokkinga, M. & Paterson, R. (1991) Functional programming with bananas, lenses, envelopes and barbed wire. In Functional Programming Languages and Computer Architecture, Hughes, J. (ed), Lecture Notes in Computer Science, vol. 523. Springer-Verlag, pp. 124144.CrossRefGoogle Scholar
Ramsey, N. (2014) On teaching “How to Design Programs”: Observations from a newcomer. In International Conference on Functional Programming. Association for Computing Machinery, p. 153166.CrossRefGoogle Scholar
Raymond, E. S. (1999) The Cathedral and the Bazaar. O’Reilly Media.CrossRefGoogle Scholar
Swierstra, D. & de Moor, O. (1993) Virtual data structures. IFIP TC2/WG2.1 State-of-the-Art Report on Formal Program Development, Möller, B., Partsch, H. and Schuman, S. (eds), Lecture Notes in Computer Science, vol. 755. Springer-Verlag, pp. 355371.CrossRefGoogle Scholar
Wadler, P. (1990) Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science 73, 231248.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.