Collected Size Semantics for Strict Functional Programs over General Polymorphic Lists

  • Olha Shkaravska
  • Marko van Eekelen
  • Alejandro Tamalet
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8552)

Abstract

Size analysis can be an important part of heap consumption analysis. This paper is a part of ongoing work about typing support for checking output-on-input size dependencies for function definitions in a strict functional language. A significant restriction for our earlier results is that inner data structures (e.g. in a list of lists) all must have the same size. Here, we make a big step forwards by overcoming this limitation via the introduction of higher-order size annotations such that variate sizes of inner data structures can be expressed. In this way the analysis becomes applicable for general, polymorphic nested lists.

Keywords

Size Dependency Operational Semantic Function Definition Program Variable Size Function 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: Cost analysis of java bytecode. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 157–172. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  2. 2.
    Amadio, R.M.: Synthesis of max-plus quasi-interpretations. Fundam. Informaticae 65(1–2), 29–60 (2004)MathSciNetGoogle Scholar
  3. 3.
    Atassi, V., Baillot, P., Terui, K.: Verification of ptime reducibility for system F terms: type inference in dual light affine logic. Logical Meth. Comput. Sci. 3(4), 1–32 (2007)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Bonfante, G., Marion, J.Y., Moyen, J.Y.: Quasi-interpretations a way to control resources. Theor. Comput. Sci. 412(25), 2776–2796 (2011)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Reistadand, B., Gifford, D.K.: Static dependent costs for estimating execution time. In: Proceedings of the Conference on Lisp and Functional Programming FP’94, pp. 65–78. ACM Press, January 1994Google Scholar
  6. 6.
    Campbell, B.: Space cost analysis using sized types. Ph.D. thesis, School of Informatics, University of Edinburgh (2008)Google Scholar
  7. 7.
    Campbell, B.: Amortised memory analysis using the depth of data structures. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 190–204. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  8. 8.
    Gaboardi, M., Marion, J.-Y., Ronchi Della Rocca, S.: A logical account of PSPACE. In: Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages POPL 2008, San Francisco, January 10–12, 2008, pp. 121–131 (2008)Google Scholar
  9. 9.
    Góbi, A., Shkaravska, O., van Eekelen, M.: Higher-order size checking without subtyping. In: Loidl, H.-W., Peña, R. (eds.) TFP 2012. LNCS, vol. 7829, pp. 53–68. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  10. 10.
    Hoffmann, J., Aehlig, K., Hofmann, M.: Multivariate amortized resource analysis. ACM Trans. Program. Lang. Syst. 34(3), 14:1–14:62 (2012)Google Scholar
  11. 11.
    Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order functional programs. SIGPLAN Not. 38(1), 185–197 (2003)CrossRefGoogle Scholar
  12. 12.
    Hofmann, M., Jost, S.: Type-based amortised heap-space analysis. In: Sestoft, P. (ed.) ESOP 2006. LNCS, vol. 3924, pp. 22–37. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  13. 13.
    Hughes, L.P.J., Sabry, A.: Proving the correctness of reactive systems using sized types. In: Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’96, pp. 410–423. ACM (1996)Google Scholar
  14. 14.
    Shkaravska, O., van Eekelen, M.: Univariate polynomial solutions of algebraic difference equations. J. Symbolic Comput. 60, 15–28 (2014)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    Shkaravska, O., van Eekelen, M., Tamalet, A.: Collected size semantics for functional programs over polymorphic nested lists. Technical report ICIS-R09003, Radboud University Nijmegen, July 2009Google Scholar
  16. 16.
    Shkaravska, O., van Eekelen, M., Tamalet, A.: Collected size semantics for functional programs over lists. In: Scholz, S.-B., Chitil, O. (eds.) IFL 2008. LNCS, vol. 5836, pp. 118–137. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  17. 17.
    Shkaravska, O., van Eekelen, M.C.J.D., van Kesteren, R.: Polynomial size analysis of first-order shapely functions. Log. Meth. Comput. Sci. 5(2), 1–35 (2009)CrossRefGoogle Scholar
  18. 18.
    Shkaravska, O., van Kesteren, R., van Eekelen, M.: Polynomial size analysis of first-order functions. In: Della Rocca, S.R. (ed.) TLCA 2007. LNCS, vol. 4583, pp. 351–365. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  19. 19.
    Tamalet, A., Shkaravska, O., van Eekelen, M.: Size analysis of algebraic data types. In: Achten, P., Koopman, P., Morazán, M. (eds.) Trends in Functional Programming, TFP’08, vol. 9. Intellect Publishers (2009)Google Scholar
  20. 20.
    van Eekelen, M., Shkaravska, O., van Kesteren, R., Jacobs, B., Poll, E., Smetsers, S.: AHA: amortized heap space usage analysis. In: Morazán, M. (ed.) Selected Papers of the 8th International Symposium on Trends in Functional Programming (TFP’07), pp. 36–53. Intellect Publishers, New York (2007)Google Scholar
  21. 21.
    van Kesteren, R., Shkaravska, O., van Eekelen, M.: Inferring static non-monotonically sized types through testing. In: Proceedings of 16th International Workshop on Functional and (Constraint) Logic Programming (WFLP’07). ENTCS, Paris, France, vol. 216C, pp. 45–63 (2007)Google Scholar
  22. 22.
    Vasconcelos, P.B.: Space cost analysis using sized types. Ph.D. thesis, School of Computer Science, University of St. Andrews, August 2008Google Scholar
  23. 23.
    Xi, H., Pfenning, F.: Dependent types in practical programming. In: Proceedings of the 26th ACM SIGPLAN Symposium on Principles of Programming Languages, San Antonio, pp. 214–227, January 1999Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Olha Shkaravska
    • 1
  • Marko van Eekelen
    • 2
    • 3
  • Alejandro Tamalet
    • 4
  1. 1.Max Planck Institute for PsycholinguisticsNijmegenThe Netherlands
  2. 2.Institute for Computing and Information Sciences (iCIS)Radboud University NijmegenNijmegenThe Netherlands
  3. 3.Faculty of Management, Science and TechnologyOpen University of the NetherlandsHeerlenThe Netherlands
  4. 4.GlobantRosarioArgentina

Personalised recommendations