skip to main content
10.1145/1007996.1008015acmconferencesArticle/Chapter ViewAbstractPublication PagesiticseConference Proceedingsconference-collections
Article

Embedding instructive assertions in program design

Published: 28 June 2004 Publication History

Abstract

Computer programs are operational schemes. Many programmers design, describe, and justify their programs while solely thinking "operationally". Yet, an operational perspective is insufficient. For many years, the important role of an assertional perspective is advocated. However, this perspective is debated [5]. Many are deterred from employing it, possibly because it is displayed with formal notations and mathematical logic. The objective of this paper is to offer the elaboration of this perspective through a natural, informal embedment of assertions in the design process. The essential, revealing, and instructive role of informal, yet concise and accurate assertions is motivated and elaborated; first through three stimulating illustrations, and then with a general instructional approach.

References

[1]
Astrachan O., Berry G., Cox L., & Mitchener G., Design patterns: An essential component of CS curricula, Proc of the 29th SIGCSE Technical Symposium on CS Education, (1998), 153--160.
[2]
Bruce, K.B., Drysdale, R.L.C., Keleman, C., & Tucker, A., Why Math?, Comm of the ACM, 46, (2003), 41--44.
[3]
Cormen T.H., Leiserson, C.E., and Rivest, R.L., Introduction to Algorithms, MIT Press, (1990).
[4]
Dijkstra, E.W. A Discipline of Programming, Prentice-Hall, (1976).
[5]
E. W. Dijkstra et al. A debate on teaching computing science, Communications of the ACM, 32 (1989), 1397--1414.
[6]
Gries, D. The Science of Programming, Springer-Verlag, (1981).
[7]
R. Floyd. Assigning meaning to programs, Mathematical Aspects of Computer Science, XIX American Mathematical Society (1967), 19--32.
[8]
Henderson, P.B., Baldwin, D., Dasigi, V., Dupras, M., Fritz, J., Ginat, D., Goelman, D., Hamer, J., Hitchner, L., Lloyd, W., Marion, B., Riedesel, C., & Walker, H., Striving for mathematical thinking. SIGCSE Bulletin, 33, (2001), 114--124.
[9]
Linn M.C. & Clancy M.J., The case for case studies of programming problems, Comm of the ACM, 35, (1992), 121--132.
[10]
Linn M.C. & Clancy M.J., Patterns and pedagogy, Proc of the 30th SIGCSE Technical Symposium on CS Education, (1999), 37--42.
[11]
McLoughlin, H. & Hely, K., Teaching formal programming to first year computer science students, Proc of the 27th SIGCSE Technical Symposium on CS Education, (1996), 155--159.

Cited By

View all

Recommendations

Reviews

Anany Levitin

This paper advocates the systematic use of an "assertion perspective" in algorithm/program design. This means the embedding of informal, but mathematically rigorous assertions that pinpoint important properties of the problem at hand, and lead to an efficient algorithmic solution. According to the paper, this use of assertions (less formal than the one advocated by formal program verification proponents) should complement an "operational perspective" commonly practiced by students and programmers. The paper provides examples of assertions for four specific problems. In addition, it contains six-stage guidelines for embedding assertions in various stages of algorithm and program design. These guidelines are quite general. The goal of the first stage, for example, is to search for "core assertion patterns that concisely encapsulate relationships between the task elements. These relationships should yield the concept underlying the algorithmic solution." The usefulness of the assertion perspective for specifying algorithms, proving their correctness and investigating efficiency, is well known. Therefore, any effort encouraging assertion utilization should be welcomed. It is less clear, however, how helpful the assertion perspective is for algorithm design. This is well illustrated by the last example in the paper: checking the possibility of converting one given permutation to another, given permutation by repeated repositioning of adjacent element pairs. The problem is solved by checking the parities of the number of inversions in the permutations given. It is difficult to argue that the assertion perspective is particularly helpful for discovering this crucial insight. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ITiCSE '04: Proceedings of the 9th annual SIGCSE conference on Innovation and technology in computer science education
June 2004
296 pages
ISBN:1581138369
DOI:10.1145/1007996
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 28 June 2004

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. assertions
  2. design perspectives
  3. pedagogy

Qualifiers

  • Article

Conference

ITiCSE04
Sponsor:

Acceptance Rates

Overall Acceptance Rate 552 of 1,613 submissions, 34%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)0
Reflects downloads up to 31 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media