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

Studying program correctness in ProVIDE

Published:30 June 2003Publication History

ABSTRACT

In an attempt to better integrate discrete mathematics into the introductory CS curriculum, we implemented ProVIDE, an enhanced integrated development environment (IDE) for Java that enables students to analyze their computer programs (in terms of their correctness) while they are creating them [1]. The primary goal of the construction of ProVIDE is the seamless integration of analysis with the creation of computer programs. Because the concept of program correctness is generally taught as an activity independent of the programming process, most introductory CS students preceive it is unnecessary and even irrelevant. The concept of contracts, on the other hand, is generally taught as an integral part of the programming process. As such, most introductory CS students have little difficulty understanding the need to establish contracts via preconditions and postconditions.The approach we have taken with ProVIDE is a modified version of the "design by contract" methodology. Rather than asking the student programmer for both a precondition and postcondition for each of his/her methods, ProVIDE asks the student to simply supply a postcondition. ProVIDE then helps the student construct the appropriate precondition by leading him/her through an axiomatic proof of the correctness of the method. Thus, the proof of correctness of the method is a side-effect of the student's need to construct an appropriate precondition.In this demonstration, we will show some examples of method precondition construction (including loop invariant construction) within ProVIDE, including the following squaring algorithms that uses only additions (which highlights the construction of a loop invariant for a single loop) and only increments and decrements (which highlights the construction of loop invariants for both sequential and nested loops), respectively.

References

  1. Gegg-Harrison, T. S., Bunce, G. R., Ganetzky, R. D., Olson, C. M., and Wilson, J. D. Studying Program Correctness by Constructing Contracts. Proceedings of the 8th Annual Conference on Innovation and Technology in Computer Science Education, Thessaloniki, Greece, June--July 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  1. Studying program correctness in ProVIDE

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ITiCSE '03: Proceedings of the 8th annual conference on Innovation and technology in computer science education
      June 2003
      291 pages
      ISBN:1581136722
      DOI:10.1145/961511
      • cover image ACM SIGCSE Bulletin
        ACM SIGCSE Bulletin  Volume 35, Issue 3
        Proceedings of the 8th annual conference on Innovation and technology in computer science education
        September 2003
        277 pages
        ISSN:0097-8418
        DOI:10.1145/961290
        Issue’s Table of Contents

      Copyright © 2003 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 30 June 2003

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate552of1,613submissions,34%

      Upcoming Conference

      ITiCSE 2024

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader