Computing preconditions and postconditions of while loops

  • Authors:
  • Olfa Mraihi;Wided Ghardallou;Asma Louhichi;Lamia Labed Jilani;Khaled Bsaies;Ali Mili

  • Affiliations:
  • Institut Superieur de Gestion, Tunis, Tunisia;Faculte des Sciences de Tunis, El Manar, Tunisia;Faculte des Sciences de Tunis, El Manar, Tunisia;Institut Superieur de Gestion, Tunis, Tunisia;Faculte des Sciences de Tunis, El Manar, Tunisia;NJIT, Newark NJ

  • Venue:
  • ICTAC'11 Proceedings of the 8th international conference on Theoretical aspects of computing
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Weakest preconditions were introduced by Dijkstra as a tool to define the semantics of programming constructs, and thereby as a means to prove the correctness of programs; the dual concept of strongest postcondition was introduced subsequently as an alternative means for the same ends. In this paper, we present and discuss a method to compute weakest preconditions and strongest postconditions of while loops in a C-like programming language; to this effect, we use the concept of invariant relation. Whereas the task of computing weakest preconditions and strongest postconditions of while loops is usually approached by limiting the number of iterations and applying successive sequential compositions, invariant relations afford us a crisper, closed form solution.