skip to main content
article
Open Access

Should your specification language be typed

Published:01 May 1999Publication History
Skip Abstract Section

Abstract

Most specification languages have a type system. Type systems are hard to get right, and getting them wrong can lead to inconsistencies. Set theory can serve as the basis for a specification language without types. This possibility, which has been widely overlooked, offers many advantages. Untyped set theory is simple and is more flexible than any simple typed formalism. Polymorphism, overloading, and subtyping can make a type system more powerful, but at the cost of increased somplexity, and such refinements can never attain the flexibility of having no types at all. Typed formalisms have advantages, too, stemming from the power of mechanical type checking. While types serve little purpose in hand proofs, they do help with mechanized proofs. In the absence of verificaiton, type checking can catch errors in specifications. It may be possible to have the best of both worlds by adding typing annotations to an untyped specification language.

We consider only specification languages, not programming languages.

References

  1. APT, K. R. AND OLDEROG, E.-R. 1990. Verification of Sequential and Concurrent Programs. Texts and Monographs in Computer Science. Springer-Verlag, New York, Berlin, Heidelberg, London, Paris, Tokyo, Hong Kong, Barcelona. Google ScholarGoogle Scholar
  2. BARRAS, B., BOUTIN, S., CORNES, C., COURANT, J., FILLIBTRE, J.-C., GIMINEZ, E., HERBELIN, H., HUET, G., MUQOZ, C., MUaTHY, C., PAaENT, C., PAULIN-MOHRING, C., SAOBI, A., AND WERNER, B. 1997. The Coq proof assistant reference manual : Version 6.1. Technical Report RT-0203 (May), INRIA-Rocquencourt. Version 5.8.Google ScholarGoogle Scholar
  3. BOYER, R. S. AND MOOaE, J. S. 1988. A Computational Logic Handbook. Academic Press. Google ScholarGoogle Scholar
  4. CHANDY, K. M. AND MISRA, J. 1988. Parallel Program Design. Addison-Wesley, Reading, Massachusetts. Google ScholarGoogle Scholar
  5. CONSTABLE, R. L., ALLEN, S. F., BROMLEY, H. M., CLEAVELAND, W. R., CaEMEa, J. F., HAaPEa, R. W., HOWE, D. J., KNOBLOCK, T. B., MENDLER, N. P., PANAGADEN, P., SASAKI, J. T., AND SMITH, S. F. 1986. Implementing Mathematics with the Nuprl Proof Development System. Prentice-Hall. Google ScholarGoogle Scholar
  6. COQUAND, T. 1990. Metamathematical investigations of a calculus of constructions. In P. ODIFREDDI (Ed.), Logic and Computer Science, pp. 91-122. Academic Press.Google ScholarGoogle Scholar
  7. DE BRUIJN, N. G. 1995. On the roles of types in mathematics. In P. DE GROOTE (Ed.), The Curry-Howard isomorphism, pp. 27-54. Academia.Google ScholarGoogle Scholar
  8. DUMMETT, M. 1977. Elements of Intuitionism. Oxford University Press.Google ScholarGoogle Scholar
  9. ENGBERG, W., GRONNING, P., AND LAMPORT, L. 1992. Mechanical verification of concurrent systems with TLA. In G. v. BOCHMANN AND D. K. PROBST (Eds.), Proceedings of the Fourth International Conference on Computer Aided Verification, Volume 663 of Lecture Notes in Computer Science, Berlin, pp. 44-55. Springer-Verlag. Proceedings of the Fourth International Conference, CAV'92. Google ScholarGoogle Scholar
  10. FARMER, W. M. 1990. A partial functions version of church's simple theory of types. Journal of Symbolic Logic 55, 3, 1269-1291.Google ScholarGoogle Scholar
  11. FISHER, K. AND MITCHELL, J. C. 1995. The development of type systems for object-oriented languages. Theory and Practice of Object Systems 1, 3, 189-220. Google ScholarGoogle Scholar
  12. FITZGERALD, J. S., LARSEN, P. G., BROOKES, T. M., AND GREEN, M. A. 1995. Developing a security-critical system using formal and conventional methods. In M. HINCHEY AND J. P. BOWEN (Eds.), Applications of Formal Methods, pp. 333-356. Prentice-Hall.Google ScholarGoogle Scholar
  13. GARLAND, S. J. AND GUTTAG, J. V. 1989. An overview of LP, the Larch Prover. In N. DER- SHOWITZ (Ed.), Proceedings of the Third International Conference on Rewriting Techniques and Applications, Volume 355 of Lecture Notes on Computer Science, pp. 137-151. Springer-Verlag. Google ScholarGoogle Scholar
  14. G(SDEL, K. 1983. Russell's mathematical logic. In P. BENACERRAF AND H. PUTNAM (Eds.), Philosophy of Mathematics: Selected Readings (2nd ed.). Cambridge University Press. First published in 1944.Google ScholarGoogle Scholar
  15. GORDON, M. J. C. AND MELHAM, T. F. 1993. Introduction to HOL: A Theorem Proving Environment for Higher Order Logic. Cambridge University Press. Google ScholarGoogle Scholar
  16. GRIES, D. 1981. The Science of Programming. Springer-Verlag. Google ScholarGoogle Scholar
  17. GRIES, D. AND SCHNEIDER, F. B. 1993. A Logical Approach to Discrete Math. Springer-Verlag, New York. Google ScholarGoogle Scholar
  18. GUNTER, C. A. AND SCOTT, D. S. 1990. Semantic domains. In J. VAN LEEUWEN (Ed.), Handbook of Theoretical Computer Science: Volume B: Formal Models and Semantics, pp. 633-674. Elsevier. Google ScholarGoogle Scholar
  19. GUTTAG, J. V. AND HORNING, J. J. 1978. The algebraic specification of abstract data types. Acta Informatica 10, 27-52.Google ScholarGoogle Scholar
  20. HALMOS, P. R. 1960. Naive Set Theory. Van Nostrand.Google ScholarGoogle Scholar
  21. HEHNER, E. C. R. 1984. Predicative programming. Commun. ACM 27, 2 (Feb.), 134-151. Google ScholarGoogle Scholar
  22. HUDAK, P., JONES, S. P., AND WADLER, P. 1992. Report on the programming language Haskell: A non-strict, purely functional language. SIGPLAN Notices 27, 5 (May). Version 1.2. Google ScholarGoogle Scholar
  23. HUET, G. 1997. Re: types and extremism. Email to Leslie Lamport. Internet message sent on April 25, 1997 23:11:37 MET DST, number [email protected].Google ScholarGoogle Scholar
  24. KAUFMANN, M. AND MOORE, J. S. 1996. ACL2: An industrial strength version of Nqthm. In Proceedings of the Eleventh Annual Conference on Computer Assurance (COMPASS-96), pp. 23-34. IEEE Computer Society Press.Google ScholarGoogle Scholar
  25. LAM, S. S. AND SHANKAR, A. U. 1984. Protocol verification via projections. IEEE Transactions on Software Engineering SE-10, 4 (July), 325-342.Google ScholarGoogle Scholar
  26. LEISENRING, A. C. 1969. Mathematical Logic and Hilbert's c-Symbol. Gordon and Breach, New York.Google ScholarGoogle Scholar
  27. MANNA, Z. AND PNUELI, A. 1991. The Temporal Logic of Reactive and Concurrent Systems. Springer-Verlag, New York. Google ScholarGoogle Scholar
  28. MELHAM, T. F. 1989. Automating recursive type definitions in higher order logic. In G. BIRTWISTLE AND P. t. SUBRAHMANYAM (Eds.), Current Trends in Hardware Verification and Automated Theorem Proving, pp. 341-386. Springer. Google ScholarGoogle Scholar
  29. MILNER, R. 1978. A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17, 348-375.Google ScholarGoogle Scholar
  30. MITCHELL, J. C. 1991. Type inference with simple subtypes. Journal of Functional Programruing 1, 3 (July), 245-285.Google ScholarGoogle Scholar
  31. NELSON, G. (Ed.) 1991. Systems Programming with Modula-3. Series in Innovative Technology. Prentice-Hall, Inc., Englewood Cliffs, New Jersey. Google ScholarGoogle Scholar
  32. OWRE, S. 1998. PVS 2.1 patches (2.417). Email to [email protected]. Internet message sent on Sat, Feb 7, 1998 02:53:40 -0800, number [email protected].Google ScholarGoogle Scholar
  33. OWRE, S., RUSHBY, J., SHANKAR, N., AND VON HENKE, F. 1995. Formal verification for faulttolerant architectures: Prolegomena to the design of PVS. IEEE Transactions on Software Engineering 21, 2 (Feb.), 107-125. Google ScholarGoogle Scholar
  34. PAULSON, L. C. 1985. Verifying the unification algorithm in LCF. Science of Computer Programruing 5, 143-170. Google ScholarGoogle Scholar
  35. PAULSON, L. C. 1993. Set theory for verification: I. From foundations to functions. Journal of Automated Reasoning 11, 3, 353-389. Google ScholarGoogle Scholar
  36. PAULSON, L. C. 1994a. A fixedpoint approach to implementing (co)inductive definitions. In A. BUNDY (Ed.), 12th International Conference on Automated Deduction, LNAI 814, pp. 148- 161. Springer. Google ScholarGoogle Scholar
  37. PAULSON~ L. C. 1994b. Isabelle: A Generic Theorem Prover. Springer. LNCS 828.Google ScholarGoogle Scholar
  38. PAULSON~ L. C. 1995. Set theory for verification: II. Induction and recursion. Journal of Automated Reasoning 15, 2, 167-215.Google ScholarGoogle Scholar
  39. PAULSON, L. C. 1996. ML for the Working Programmer (2nd ed.). Cambridge University Press. Google ScholarGoogle Scholar
  40. QUAIFE, A. 1992. Automated deduction in yon Neumann-Bernays-GSdel set theory. Journal of Automated Reasoning 8, 1, 91-147. Google ScholarGoogle Scholar
  41. SCOTT~ D. 1979. Identity and existence in intuitionistic logic. In M. P. FOURMAN (Ed.), Applications of Sheaves, pp. 660-696. Springer. Lecture Notes in Mathematics 753.Google ScholarGoogle Scholar
  42. THOMPSON~ S. 1991. Type Theory and Functional Programming. Addison-Wesley. Google ScholarGoogle Scholar
  43. WADLER~ P. AND BLOTT~ S. 1989. How to make ad-hoc polymorphism less ad hoc. In 16th Annual Symposium on Principles of Programming Languages, pp. 60-76. ACM Press. Google ScholarGoogle Scholar
  44. WHITEHEAD~ A. N. AND RUSSELL~ B. 1962. Principia Mathematica. Cambridge University Press. Paperback edition to *56, abridged from the 2nd edition (1927).Google ScholarGoogle Scholar
  45. WRIGHT~ A. I~. AND CARTWRIGHT~ R. 1997. A practical soft type system for Scheme. ACM Trans. on Programm. Lang. Syst. 19, 1 (Jan.), 87-152. Google ScholarGoogle Scholar

Index Terms

  1. Should your specification language be typed

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM Transactions on Programming Languages and Systems
            ACM Transactions on Programming Languages and Systems  Volume 21, Issue 3
            May 1999
            285 pages
            ISSN:0164-0925
            EISSN:1558-4593
            DOI:10.1145/319301
            Issue’s Table of Contents

            Copyright © 1999 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 May 1999
            Published in toplas Volume 21, Issue 3

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader