skip to main content
research-article

The type discipline of behavioral separation

Published:23 January 2013Publication History
Skip Abstract Section

Abstract

We introduce the concept of behavioral separation as a general principle for disciplining interference in higher-order imperative concurrent programs, and present a type-based approach that systematically develops the concept in the context of an ML-like language extended with concurrency and synchronization primitives. Behavioral separation builds on notions originally introduced for behavioral type systems and separation logics, but shifts the focus from the separation of static program state properties towards the separation of dynamic usage behaviors of runtime values. Behavioral separation types specify how values may be safely used by client code, and can enforce fine-grained interference control disciplines while preserving compositionality, information hiding, and flexibility. We illustrate how our type system, even if based on a small set of general primitives, is already able to tackle fairly challenging program idioms, involving aliasing at various types, concurrency with first-class threads, manipulation of linked data structures, behavioral borrowing, and invariant-based separation.

Skip Supplemental Material Section

Supplemental Material

r2d2_talk1.mp4

mp4

188 MB

References

  1. M. Abadi, C. Flanagan, and S. N. Freund. Types for safe locking: Static race detection for Java. ACM TOPLAS, 28(2):207--255, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Ahmed, M. Fluet, and G. Morrisett. L3: A Linear Language with Locations. Fundam. Inform., 77(4):397--449, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. Bierhoff and J. Aldrich. Modular Typestate Checking of Aliased Objects. In OOPSLA 2007, pages 301--320, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. L. Bloom and Z. Ésik. Free Shuffle Algebras in Language Varieties. Theoretical Computer Science, 163(1&2):55--98, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. Bornat, C. Calcagno, P. W. O'Hearn, and M. Parkinson. Permission accounting in separation logic. In POPL 2005, pages 259--270, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Boyapati, R. Lee, and M. C. Rinard. Ownership types for safe programming: preventing data races and deadlocks. In OOPSLA 2002, pages 211--230. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Boyapati, B. Liskov, and L. Shrira. Ownership types for object encapsulation. In POPL 2003, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Boyapati and M. C. Rinard. A Parameterized Type System for Race-Free Java Programs. In OOPSLA 2001, pages 56--69, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Boyland. Checking Interference with Fractional Permissions. In SAS 2003, volume 2694 of LNCS, pages 55--72. Springer-Verlag, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. L. Caires. Spatial-Behavioral Types for Concurrency and Resource Control in Distributed Systems. Theoretical Computer Science, 402(2--3):120--141, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. L. Caires and L. Cardelli. A Spatial Logic for Concurrency (Part I). Information and Computation, 186(2):194--235, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. Caires and F. Pfenning. Session Types as Intuitionistic Linear Propositions. In CONCUR'10, volume 6269 of LNCS, pages 222--236. Springer-Verlag, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. L. Caires and J. C. Seco. The Type Discipline of Behavioral Separation. Technical report, TR-DI-FCT-UNL, 2012.Google ScholarGoogle Scholar
  14. C. Calcagno, P. W. O'Hearn, and H. Yang. Local Action and Abstract Separation Logic. In LICS 2007, pages 366--378, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Cardelli and A. D. Gordon. Anytime, Anywhere. Modal Logics for Mobile Ambients. In POPL 2000, pages 365--377. ACM, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Chaki, S. Rajamani, and J. Rehof. Types as models: Model Checking Message-Passing Programs. In POPL 2002, pages 45--57, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T. Dinsdale-Young, M. Dodds, P. Gardner, M. J. Parkinson, and V. Vafeiadis. Concurrent Abstract Predicates. In ECOOP 2010, volume 6183 of LNCS, pages 504--528. Springer-Verlag, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. J. Gay, V. Thudichum Vasconcelos, A. Ravara, N. Gesbert, and A. Z. Caldeira. Modular Session Types for Distributed Object-oriented Programming. In POPL 2010, pages 299--312, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. A. R. Hoare, B. Möller, G. Struth, and I. Wehrman. Concurrent Kleene Algebra. In CONCUR'09, volume 5710 of LNCS, pages 399--414. Springer-Verlag, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. Hoare and P. W. O'Hearn. Separation Logic Semantics for Communicating Processes. EN Theo. Computer Science, 212:3--25, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. K. Honda, V. T. Vasconcelos, and M. Kubo. Language Primitives and Type Discipline for Structured Communication-Based Programming. In ESOP 1998, volume 1381 of LNCS, pages 122--138. Springer, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. K. Honda, N. Yoshida, and M. Carbone. Multiparty Asynchronous Session Types. In POPL 2008, pages 273--284. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Igarashi and N. Kobayashi. Resource Usage Analysis. In POPL 2002, pages 331--342, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Igarashi and N. Kobayashi. A Generic Type System for the Pi-Calculus. Theoretical Computer Science, 311(1--3):121--163, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. B. Jensen and L. Birkedal. Fictional Separation Logic. In ESOP 2012, LNCS, pages 377--396. Springer-Verlag, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Cliff B. Jones. Splitting Atoms Safely. Theoretical Computer Science, 375(1--3):109--119, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. R. Bocchino Jr., S. Heumann, N. Honarmand, S. Adve, V. Adve, A. Welc, and T. Shpeisman. Safe Nondeterminism in a Deterministic-by-default Parallel Language. In POPL 2011, pages 535--548, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. N. R. Krishnaswami, A. Turon, D. Dreyer, and D. Garg. Superficially Substructural Types. In ICFP'12, pages 41--54. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Militao, F. and Aldrich, J. and Caires, L. Aliasing control with view-based typestate. In FTFJP '10, pages 7:1--7:7. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. K. Naden, R. Bocchino, J. Aldrich, and K. Bierhoff. A Type System for Borrowing Permissions. In POPL 2012, pages 557--570, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. Nanevski, J. G. Morrisett, and L. Birkedal. Hoare Type Theory, Polymorphism and Separation. J. Fun. P., 18(5--6):865--911, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. P. W. O'Hearn. On Bunched Typing. J. Fun. P., 13(4):747--796, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. P. W. O'Hearn. Resources, Concurrency, and Local Reasoning. Theor. Comput. Sci., 375(1--3):271--307, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. B. Pierce. Types and Programming Languages. MIT Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. François Pottier. Hiding local state in direct style: A higher-order anti-frame rule. In LICS'08, pages 331--340, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. J. C. Reynolds. Syntactic Control of Interference. In POPL 78, pages 39--46, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. J. C. Reynolds. Syntactic Control of Interference, Part 2. In ICALP 89, volume 372 of LNCS, pages 704--722. Springer, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. J. C. Reynolds. Design of the programming language FORSYTHE, pages 173--233. Birkhauser Boston Inc., Cambridge, MA, USA, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. J. C. Reynolds. Separation Logic: A Logic for Shared Mutable Data Structures. In LICS 2012, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. Schwinghammer, L. Birkedal, B. Reus, and H. Yang. Nested Hoare Triples and Frame Rules for Higher-order Store. Logical Methods in Computer Science, 7(3), 2011.Google ScholarGoogle Scholar
  41. J. Villard, E. Lozes, and C. Calcagno. Proving copyless message passing. In APLAS 2009, volume 5904 of LNCS, pages 194--209. Springer-Verlag, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The type discipline of behavioral separation

        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 SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 48, Issue 1
          POPL '13
          January 2013
          561 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2480359
          Issue’s Table of Contents
          • cover image ACM Conferences
            POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
            January 2013
            586 pages
            ISBN:9781450318327
            DOI:10.1145/2429069

          Copyright © 2013 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 23 January 2013

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader