Abstract
Constructive logics can be used to write the specifications of programs as logic formulas to be proved. By using the Curry-Howard isomorphism, we can automatically extract executable code from constructive proofs. Normally, programs automatically generated are inefficent. They contains parts useless to compute the final result. In this paper, we show a technique to erase such useless parts from programs. Our technique is essentially an extension of another method, developed by S. Berardi, optimizing simply typed λ-terms. By using the notion of subtyping, we can overcome some intrinsecal limitations of the original method. We prove that optimized terms are equivalent to the original ones and we give an algorithm to find such optimizations
Preview
Unable to display preview. Download preview PDF.
References
M. Beeson, Foundations of Constructive Mathematics, Berlin, Springer-Verlag, 1985
S. Berardi, An Application of PER Models to Program Extraction, Technical Report, Turin University, 1992.
S. Berardi, Pruning Simply Typed λ-terms, Technical Report, Turin University, 1993.
L. Boerio, Extending Pruning Techniques to Polymorphic Second Order λ-Calculus, Proceedings of ESOP '94, Edinburgh, April 1994, LNCS 788, D. Sannella (ed.), Springer-Verlag, pp. 120–134.
C. Paulin-Mohring, Extracting F ω 's Programs from Proofs in the Calculus of Constructions, In: Association for Computing Machinery, editor, Sixteenth Annual ACM Symposium on Priciples of Programming Languages, 1989.
Y. Takayama, Extraction of Redundancy-free Programs from Constructive Natural Deduction Proofs, Journal of Symbolic Computation, 1991, 12, 29–69
A. S. Troelstra, Mathematical Investigation of Intuitionistic Arithmetic and Analysis, Lecture Notes in Mathematics, 344, Springer-Verlag, 1973
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Berardi, S., Boerio, L. (1995). Using subtyping in program optimization. In: Dezani-Ciancaglini, M., Plotkin, G. (eds) Typed Lambda Calculi and Applications. TLCA 1995. Lecture Notes in Computer Science, vol 902. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0014045
Download citation
DOI: https://doi.org/10.1007/BFb0014045
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-59048-4
Online ISBN: 978-3-540-49178-1
eBook Packages: Springer Book Archive