Polymorphic Fractional Capabilities

  • Hirotoshi Yasuoka
  • Tachio Terauchi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5673)

Abstract

The capability calculus is a framework for statically reasoning about program resources such as deallocatable memory regions. Fractional capabilities, originally proposed by Boyland for checking the determinism of parallel reads in multi-thread programs, extend the capability calculus by extending the capabilities to range over the rational numbers. Fractional capabilities have since found numerous applications, including race detection, buffer bound inference, security analyses, and separation logic. However, previous work on fractional capability systems either lacked polymorphism or lacked an efficient inference procedure. Automated inference is important for the application of the calculus to static analysis. This paper addresses the issue by presenting a polymorphic fractional capability calculus that allows polynomial-time inference via a reduction to rational linear programming.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    GNU Linear Programming Kit, http://www.gnu.org/software/glpk/glpk.html
  2. 2.
    Bierhoff, K., Aldrich, J.: Modular typestate checking of aliased objects. In: Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA, pp. 301–320 (2007)Google Scholar
  3. 3.
    Bornat, R., Calcagno, C., O’Hearn, P., Parkinson, M.: Permission accounting in separation logic. In: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pp. 259–270 (2005)Google Scholar
  4. 4.
    Boyland, J.: Checking interference with fractional permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55–72. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  5. 5.
    Crary, K., Walker, D., Morrisett, G.: Typed memory management in a calculus of capabilities. In: Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pp. 262–275 (1999)Google Scholar
  6. 6.
    Foster, J.S., Terauchi, T., Aiken, A.: Flow-sensitive type qualifiers. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pp. 1–12 (2002)Google Scholar
  7. 7.
    Kikuchi, D., Kobayashi, N.: Type-based verification of correspondence assertions for communication protocols. In: Shao, Z. (ed.) APLAS 2007. LNCS, vol. 4807, pp. 191–205. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  8. 8.
    Pratikakis, P., Foster, J.S., Hicks, M.: Locksmith: context-sensitive correlation analysis for race detection. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pp. 320–331 (2006)Google Scholar
  9. 9.
    Rehof, J., Fähndrich, M.: Type-base flow analysis: from polymorphic subtyping to cfl-reachability. In: Proceedings of the 23th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pp. 54–66 (2001)Google Scholar
  10. 10.
    Terauchi, T.: Checking race freedom via linear programming. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pp. 1–10 (2008)Google Scholar
  11. 11.
    Terauchi, T.: A type system for observational determinism. In: Proceedings of the 21st IEEE Computer Security Foundations Symposium, CSF, pp. 287–300 (2008)Google Scholar
  12. 12.
    Terauchi, T., Aiken, A.: Witnessing side-effects. In: Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming, ICFP, pp. 105–115 (2005)Google Scholar
  13. 13.
    Terauchi, T., Aiken, A.: A capability calculus for concurrency and determinism. ACM Trans. Program. Lang. Syst. (2008)Google Scholar
  14. 14.
    Terauchi, T., Megacz, A.: Inferring channel buffer bounds via linear programming. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 284–298. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  15. 15.
    Tofte, M., Talpin, J.P.: Implementation of the typed call-by-value λ-calculus using a stack of regions. In: Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pp. 188–201 (1994)Google Scholar
  16. 16.
    Yasuoka, H., Terauchi, T.: Polymorphic fractional capabilities(long version) (2008), http://www.kb.ecei.tohoku.ac.jp/~yasuoka/papers/polyfrac.pdf

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Hirotoshi Yasuoka
    • 1
  • Tachio Terauchi
    • 1
  1. 1.Tohoku UniversityJapan

Personalised recommendations