Second-order programs with preconditions

  • Authors:
  • Markus Aderhold

  • Affiliations:
  • Technische Universität Darmstadt, Germany

  • Venue:
  • Verification, induction termination analysis
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the implementation of procedures, developers often assume that the input satisfies certain properties; for example, binary search assumes the array to be sorted. Such requirements on the input can be formally expressed as preconditions of procedures. If a second-order procedure p (e.g., map or foldl) is called with a first-order procedure f that has a precondition, the question arises whether p will call f only with arguments that satisfy the precondition of f. In this paper, we propose a method to statically analyze if all procedure calls in a given second-order program satisfy the respective preconditions. In particular, we consider indirect calls of procedures that are passed as an argument to a second-order procedure.