Program transformation in the presence of errors

  • Authors:
  • Alexander Aiken;Edward L. Wimmers;John H. Williams

  • Affiliations:
  • IBM Almaden Research Center, 650 Harry Rd., San Jose, CA;IBM Almaden Research Center, 650 Harry Rd., San Jose, CA;IBM Almaden Research Center, 650 Harry Rd., San Jose, CA

  • Venue:
  • POPL '90 Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
  • Year:
  • 1989

Quantified Score

Hi-index 0.00

Visualization

Abstract

Language designers and implementors have avoided specifying and preserving the meaning of programs that produce errors. This is apparently because being forced to preserve error behavior severely limits the scope of program optimization, even for correct programs. However, preserving error behavior is desirable for debugging, and error behavior must be preserved in any language that permits user-generated exceptions.This paper presents a technique for preserving the power of general program transformations in the presence of a rich collection of distinguishable error values. This is accomplished by introducing an annotation, “Safe”, to mark occurrences of functions that cannot produce errors. Succinct and general algebraic laws can be expressed using Safe, giving program transformations in a language with many error values the same power and generality as program transformations in a language with only a single error value.