skip to main content
research-article

The geometry of types

Published:23 January 2013Publication History
Skip Abstract Section

Abstract

We show that time complexity analysis of higher-order functional programs can be effectively reduced to an arguably simpler (although computationally equivalent) verification problem, namely checking first-order inequalities for validity. This is done by giving an efficient inference algorithm for linear dependent types which, given a PCF term, produces in output both a linear dependent type and a cost expression for the term, together with a set of proof obligations. Actually, the output type judgement is derivable iff all proof obligations are valid. This, coupled with the already known relative completeness of linear dependent types, ensures that no information is lost, i.e., that there are no false positives or negatives. Moreover, the procedure reflects the difficulty of the original problem: simple PCF terms give rise to sets of proof obligations which are easy to solve. The latter can then be put in a format suitable for automatic or semi-automatic verification by external solvers. Ongoing experimental evaluation has produced encouraging results, which are briefly presented in the paper.

Skip Supplemental Material Section

Supplemental Material

r1d1_talk11.mp4

References

  1. Abramsky, S., Jagadeesan, R., Malacaria, P.: Full abstraction for PCF. I & C 163(2), 409--470 (2000) Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Amadio, R.M., Regis-Gianas, Y.: Certifying and reasoning on cost annotations of functional programs. CoRR abs/1110.2350 (2011)Google ScholarGoogle Scholar
  3. de Bakker, J.W.: Mathematical Theory of Program Correctness. Prentice-Hall (1980) Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Barthe, G., Grégoire, B., Riba, C.: Type-based termination with sized products. In: CSL 2008. LNCS, vol. 5213, pp. 493--507. Springer (2008) Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Benzinger, R.: Automated higher-order complexity analysis. Theor. Comput. Sci. 318(1-2), 79--103 (2004) Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bobot, F., Filliatre, J.C., Marché, C., Paskevich, A.: Why3: Shepherd your herd of provers. In: First InternationalWorkshop on Intermediate Verification Languages. pp. 53--64 (2011)Google ScholarGoogle Scholar
  7. Clarke, E.M.: Programming language constructs for which it is impossible to obtain good hoare axiom systems. J. ACM 26(1), 129--147 (1979) Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: The Maude 2.0 system. In: RTA 2003. LNCS, vol. 2706, pp. 76--87 (2003) Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cook, S.A.: Soundness and completeness of an axiom system for program verification. SIAM J. on Computing 7, 70--90 (1978)Google ScholarGoogle ScholarCross RefCross Ref
  10. Dal Lago, U.: Context semantics, linear logic and computational complexity. In: LICS 2006. pp. 169--178 (2006) Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Dal Lago, U., Gaboardi, M.: Linear dependent types and relative completeness. In: LICS 2011. pp. 133--142 (2011) Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Dal Lago, U., Petit, B.: The geometry of types (long version) (2012), available at http://arxiv.org/abs/1210.6857 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Dal Lago, U., Petit, B.: Linear dependent types in a call-by-value scenario. In: ACM PPDP 2012. pp. 115--126 (2012) Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Danos, V., Regnier, L.: Reversible, irreversible and optimal lambdamachines. Theor. Comput. Sci. 227(1-2), 79--97 (1999) Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Denney, E.: Refinement types for specification. In: IFIP-PROCOMET. pp. 148--166 (1998) Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Felleisen, M., Friedman, D.P.: Control operators, the SECD-machine and the _-calculus. Tech. Rep. 197, Computer Science Department, Indiana University (1986)Google ScholarGoogle Scholar
  17. Ghica, D.R.: Slot games: a quantitative model of computation. In: ACM POPL 2005. pp. 85--97 (2005) Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Ghica, D.R., Smith, A.: Geometry of synthesis III: resource management through type inference. In: ACM POPL 2011. pp. 345--356 (2011) Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Girard, J.Y., Scedrov, A., Scott, P.: Bounded linear logic. Theor. Comp. Sci. 97(1), 1--66 (1992) Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gulwani, S.: Speed: Symbolic complexity bound analysis. In: CAV. pp. 51--62 (2009) Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Hoffmann, J., Aehlig, K., Hofmann, M.: Multivariate Amortized Resource Analysis. In: ACM POPL 2011. pp. 357--370 (2011) Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Hughes, J., Pareto, L., Sabry, A.: Proving the correctness of reactive systems using sized types. In: ACM POPL 1996. pp. 410--423 (1996) Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Jost, S., Hammond, K., Loidl, H.W., Hofmann, M.: Static determination of quantitative resource usage for higher-order programs. In: ACM POPL 2010. Madrid, Spain (2010) Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Krivine, J.L.: A call-by-name lambda-calculus machine. Higher-Order and Symbolic Computation 20(3), 199--207 (2007) Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Maraist, J., Odersky, M., Turner, D.N.,Wadler, P.: Call-by-name, callby- value, call-by-need and the linear lambda calculus. Electr. Notes Theor. Comput. Sci. 1, 370--392 (1995)Google ScholarGoogle ScholarCross RefCross Ref
  26. Plotkin, G.D.: LCF considerd as a programming language. Theor. Comp. Sci. 5, 225--255 (1977)Google ScholarGoogle ScholarCross RefCross Ref
  27. Sands, D.: Complexity analysis for a lazy higher-order language. In: ESOP 1990. LNCS, vol. 432, pp. 361--376 (1990) Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Sands, D.: Operational theories of improvement in functional languages (extended abstract). In: Functional Programming. pp. 298--311 (1991) Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Wilhelm, R., Engblom, J., Ermedahl, A., Holsti, N., Thesing, S., Whalley, D., Bernat, G., Ferdinand, C., Heckmann, R., Mitra, T., Mueller, F., Puaut, I., Puschner, P., Staschulat, J., Stenstrom, P.: The worst case execution time problem - overview of methods and survey of tools. ACM Trans. Embed. Comput. Syst. (2008) Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The geometry of types

      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

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!