Abstract
This paper describes a system for both predicting and checking the types of Common Lisp programs at compile-time. The system is capable of deriving type declarations from constraints implicit in the code and identifying potential run-time type errors. These capabilities can be used to improve the efficiency of Common Lisp on general-purpose architectures without sacrificing safety or ease of use. The system operates by using the type constraints of primitive functions to propagate known information throughout a dataflow graph of the program.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bauer, A.M. and Saal, H.J. (1974). Does APL really need run-time checking? Software — Practice and Experience 4: 129–138.
Beer, R. D. (1987). Preliminary report on a practical type inference system for Common Lisp. LISP Pointers 1(2): 5–11.
Borning, A.H. and Ingalls, D.H.H. (1982). A type declaration and inference system for Smalltalk. In Conference Record of the Ninth Annual ACM Symposium on Principles of Programming Languages (pp. 133–141).
Brooks, R.A. and Gabriel, R.P. (1984). A critique of Common Lisp. In Proceedings of the 1984 Symposium on Lisp and Functional Programming (pp. 1–8).
Brooks, R.A., Gabriel, R.P. and Steele, G.L. Jr. (1982). An optimizing compiler for lexically scoped LISP. In Proceedings of the 1982 ACM Symposium on Compiler Construction (pp. 261–275).
Brooks, R.A., Posner, D.B., McDonald, J.L., White, J.L., Benson, E. and Gabriel, R.P. (1986). Design of an optimizing, dynamically retargetable compiler for Common Lisp. In Proceedings of the 1986 Symposium on Lisp and Functional Programming (pp. 67–85).
Budd, T.A. (1988). An APL Compiler. Springer-Verlag.
Cousot, P. and Cousot, R. (1977). Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth Annual ACM Symposium on Principles of Programming Languages (pp. 238–252).
Johnson, P.M. (1990). Type flow analysis for exploratory software development. Ph.D. Thesis and COINS Technical Report 90–64, University of Massachusetts at Amherst.
Kaplan, M.A. and Ullman, J.D. (1980). A scheme for the automatic inference of variable types. J. A CM 27(1): 128–145.
Kessler R. R., Peterson, J.C., Carr H., Duggan, G.P., Knell, J. and Krohnfeldt, J.J. (1986). EPIC — A retargetable, highly optimizing Lisp compiler. In Proceedings of the 1986 ACM Symposium on Compiler Construction (pp. 118–130).
Miller, T.C. (1979). Type checking in an imperfect world. In Conference Record of the Sixth Annual ACM Symposium on Principles of Programming Languages (pp. 237–243).
Milner, R. (1978). A theory of type polymorphism in programming. J. of Computer and System Sciences 17: 348–375.
Moon, D.A. (1985). Architecture of the Symbolics 3600. Proceedings of the 12th International Symposium on Computer Architecture (pp. 76–83).
Rees, J.A. and Adams, N.I. IV (1982). T: A dialect of Lisp or, LAMBDA: The ultimate software tool. In Proceedings of the 1982 Symposium on Lisp and Functional Programming (pp. 114–122).
Shivers, O. (1990). Data-flow analysis and type recovery in Scheme. Technical report CMU-CS-90-115, Carnegie Mellon University.
Steele, G.L. (1984). Common Lisp: The Language. Digital Press.
Steele, G.L. (1990). Common Lisp: The Language. Second Edition. Digital Press.
Steenkiste, P. and Hennessy, J. (1987). Tags and type checking in LISP: Hardware and software approaches. In Proceedings of the Second International Conference on Architectural Support for Programming Languages and Operating Systems (pp. 50–59).
Suzuki, N. (1981). Inferring types in Smalltalk. In Conference Record of the Eighth Annual ACM Symposium on Principles of Programming Languages (pp. 187–199).
Tennenbaum, A.M. (1974). Type determination in very high level languages. NSO-3, Courant Institute of Math. Sciences, New York Univ.
van Roggen W. 1987. Lisp implementations. LISP Pointers 1350–52
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1993 Springer Science+Business Media New York
About this chapter
Cite this chapter
Beer, R. (1993). Compile-Time Type Prediction and Type Checking for Common Lisp Programs. In: Sterling, L.S. (eds) Intelligent Systems. Springer, Boston, MA. https://doi.org/10.1007/978-1-4615-2836-4_8
Download citation
DOI: https://doi.org/10.1007/978-1-4615-2836-4_8
Publisher Name: Springer, Boston, MA
Print ISBN: 978-1-4613-6227-2
Online ISBN: 978-1-4615-2836-4
eBook Packages: Springer Book Archive