Miranda: a non-strict functional language with polymorphic types
Proc. of a conference on Functional programming languages and computer architecture
Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
Common LISP: the language
Projections for strictness analysis
Proc. of a conference on Functional programming languages and computer architecture
The semantics of program dependence
PLDI '89 Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation
Program transformation in the presence of errors
POPL '90 Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Binding time analysis: a new PERspective
PEPM '91 Proceedings of the 1991 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Type inclusion constraints and type inference
FPCA '93 Proceedings of the conference on Functional programming languages and computer architecture
Soft typing with conditional types
POPL '94 Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Communications of the ACM
Program optimization and exception handling
POPL '81 Proceedings of the 8th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Principal type-schemes for functional programs
POPL '82 Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
An ideal model for recursive polymorphic types
POPL '84 Proceedings of the 11th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Formal Verification of Compiler Transformations for Speculative Real-Time Execution
Automatica (Journal of IFAC)
Hi-index | 0.00 |
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 limits severely the scope of program optimization, even for correct programs. However, error behavior preservation is desirable for debugging, and error behavior must be preserved in any language that permits user-generated errors (i.e., exceptions).This article presents a technique for expressing general program transformations for languages that possess a rich collection of distinguishable error values. This is accomplished by defining a higher-order function called Safe, which can be used to annotate those portions of a program that are guaranteed not to produce errors. It is shown that this facilitates the expression of very general program transformations, effectively 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.Using the semantic properties of Safe, it is possible to provide some useful sufficient conditions for establishing the correctness of transformations in the presence of errors. In particular, a Substitutability theorem is proven, which can be used to justify “in-context” optimizations: transformations that alter the meanings of subexpressions without changing the meaning of the whole program. Finally, the effectiveness of the technique is demonstrated by some examples of its use in an optimizing compiler.