Skip to main content

Compile-Time Type Prediction and Type Checking for Common Lisp Programs

  • Chapter
Intelligent Systems
  • 65 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bauer, A.M. and Saal, H.J. (1974). Does APL really need run-time checking? Software — Practice and Experience 4: 129–138.

    Article  Google Scholar 

  2. Beer, R. D. (1987). Preliminary report on a practical type inference system for Common Lisp. LISP Pointers 1(2): 5–11.

    Article  Google Scholar 

  3. 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).

    Google Scholar 

  4. 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).

    Google Scholar 

  5. 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).

    Google Scholar 

  6. 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).

    Google Scholar 

  7. Budd, T.A. (1988). An APL Compiler. Springer-Verlag.

    Google Scholar 

  8. 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).

    Google Scholar 

  9. 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.

    Google Scholar 

  10. Kaplan, M.A. and Ullman, J.D. (1980). A scheme for the automatic inference of variable types. J. A CM 27(1): 128–145.

    MathSciNet  MATH  Google Scholar 

  11. 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).

    Google Scholar 

  12. 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).

    Google Scholar 

  13. Milner, R. (1978). A theory of type polymorphism in programming. J. of Computer and System Sciences 17: 348–375.

    Article  MathSciNet  MATH  Google Scholar 

  14. Moon, D.A. (1985). Architecture of the Symbolics 3600. Proceedings of the 12th International Symposium on Computer Architecture (pp. 76–83).

    Google Scholar 

  15. 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).

    Google Scholar 

  16. Shivers, O. (1990). Data-flow analysis and type recovery in Scheme. Technical report CMU-CS-90-115, Carnegie Mellon University.

    Google Scholar 

  17. Steele, G.L. (1984). Common Lisp: The Language. Digital Press.

    Google Scholar 

  18. Steele, G.L. (1990). Common Lisp: The Language. Second Edition. Digital Press.

    Google Scholar 

  19. 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).

    Google Scholar 

  20. Suzuki, N. (1981). Inferring types in Smalltalk. In Conference Record of the Eighth Annual ACM Symposium on Principles of Programming Languages (pp. 187–199).

    Google Scholar 

  21. Tennenbaum, A.M. (1974). Type determination in very high level languages. NSO-3, Courant Institute of Math. Sciences, New York Univ.

    Google Scholar 

  22. van Roggen W. 1987. Lisp implementations. LISP Pointers 1350–52

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics