Abstract
We study a novel approach to typestate-oriented programming based on the chemical metaphor: state and operations on objects are molecules of messages and state transformations are chemical reactions. This approach allows us to investigate typestate in an inherently concurrent setting, whereby objects can be accessed and modified concurrently by several processes, each potentially changing only part of their state. We introduce a simple behavioral type theory to express in a uniform way both the private and the public interfaces of objects, to describe and enforce structured object protocols consisting of possibilities, prohibitions, and obligations, and to control object sharing.
- J. Aldrich, J. Sunshine, D. Saini, and Z. Sparks. Typestateoriented programming. In Proceedings of OOPSLA’09, pages 1015–1022. ACM, 2009. Google Scholar
Digital Library
- N. E. Beckman, D. Kim, and J. Aldrich. An empirical study of object protocols in the wild. In Proceedings of ECOOP’11, LNCS 6813, pages 2–26. Springer, 2011. Google Scholar
Digital Library
- N. Benton, L. Cardelli, and C. Fournet. Modern concurrency abstractions for C#. ACM Trans. Program. Lang. Syst., 26(5):769–804, 2004. Google Scholar
Digital Library
- G. Berry and G. Boudol. The chemical abstract machine. Theor. Comput. Sci., 96(1):217–248, 1992. Google Scholar
Digital Library
- K. Bierhoff and J. Aldrich. Modular typestate checking of aliased objects. In Proceedings of OOPSLA’07, pages 301– 320. ACM, 2007. Google Scholar
Digital Library
- J. A. Brzozowski. Derivatives of regular expressions. J. ACM, 11(4):481–494, 1964. Google Scholar
Digital Library
- P. Calvert and A. Mycroft. Control flow analysis for the join calculus. In Proceedings of SAS’12, LNCS 7460, pages 181– 197. Springer, 2012. Google Scholar
Digital Library
- J. Conway. Regular Algebra and Finite Machines. William Clowes & Sons Ltd, 1971.Google Scholar
- B. Courcelle. Fundamental properties of infinite trees. Theor. Comp. Sci., 25:95–169, 1983.Google Scholar
Cross Ref
- S. Crafa and L. Padovani. The chemical approach to typestateoriented programming. Technical report, 2015. https:// hal.archives-ouvertes.fr/hal-01155682. Google Scholar
Digital Library
- F. Damiani, E. Giachino, P. Giannini, and S. Drossopoulou. A type safe state abstraction for coordination in Java-like languages. Acta Inf., 45(7-8):479–536, 2008. Google Scholar
Digital Library
- O. Dardha, E. Giachino, and D. Sangiorgi. Session types revisited. In Proc. of PPDP’12, pages 139–150. ACM, 2012. Google Scholar
Digital Library
- G. de Caso, V. A. Braberman, D. Garbervetsky, and S. Uchitel. Enabledness-based program abstractions for behavior validation. ACM Trans. Softw. Eng. Methodol., 22(3):25, 2013. Google Scholar
Digital Library
- R. DeLine and M. Fähndrich. Typestates for objects. In Proceedings of ECOOP’04, LNCS 3086, pages 465–490. Springer, 2004.Google Scholar
- M. Fähndrich and R. DeLine. Adoption and focus: Practical linear types for imperative programming. In Proceedings of PLDI’02, pages 13–24. ACM, 2002. Google Scholar
Digital Library
- C. Fournet and G. Gonthier. The reflexive CHAM and the join-calculus. In Proceedings of POPL’96, pages 372–385. ACM, 1996. Google Scholar
Digital Library
- C. Fournet and G. Gonthier. The join calculus: A language for distributed mobile programming. In Summ. Sch. Appl. Sem., LNCS 2395, pages 268–332. Springer, 2000. Google Scholar
Digital Library
- C. Fournet, C. Laneve, L. Maranget, and D. Rémy. Implicit typing à la ML for the join-calculus. In Proceedings of CONCUR’97, LNCS 1243, pages 196–212. Springer, 1997. Google Scholar
Digital Library
- C. Fournet, C. Laneve, L. Maranget, and D. Rémy. Inheritance in the join calculus. J. Logic Alg. Progr., 57(12):23 – 69, 2003.Google Scholar
Cross Ref
- C. Fournet, F. Le Fessant, L. Maranget, and A. Schmitt. Jocaml: A language for concurrent distributed and mobile programming. In Advanced Functional Programming, LNCS 2638, pages 129–158. Springer, 2003.Google Scholar
- R. Garcia, É. Tanter, R. Wolff, and J. Aldrich. Foundations of typestate-oriented programming. ACM Trans. Program. Lang. Syst., 36(4):12, 2014. Google Scholar
Digital Library
- S. J. Gay and V. T. Vasconcelos. Linear type theory for asynchronous session types. J.Fun. Progr., 20(1):19–50, 2010. Google Scholar
Digital Library
- S. J. Gay, V. T. Vasconcelos, A. Ravara, N. Gesbert, and A. Z. Caldeira. Modular session types for distributed objectoriented programming. In Proceedings of POPL’10, pages 299–312. ACM, 2010. Google Scholar
Digital Library
- P. Haller and T. V. Cutsem. Implementing joins using extensible pattern matching. In Proceedings of COORDINATION’08, LNCS 5052, pages 135–152. Springer, 2008. Google Scholar
Digital Library
- T. A. Henzinger, R. Jhala, and R. Majumdar. Permissive interfaces. In Proc. of FSE’05, pages 31–40. ACM, 2005. Google Scholar
Digital Library
- C. Hewitt, P. Bishop, and R. Steiger. A universal modular actor formalism for artificial intelligence. In Proceedings of IJCAI’73, pages 235–245, 1973. Google Scholar
Digital Library
- K. Honda. Types for dyadic interaction. In Proceedings of CONCUR’93, LNCS 715, pages 509–523. Springer, 1993. Google Scholar
Digital Library
- G. S. V. Itzstein and M. Jasiunas. On implementing high level concurrency in Java. In Proceedings of ACSAC’03, LNCS 2823, pages 151–165. Springer, 2003.Google Scholar
- D. Jin, P. O. Meredith, D. Griffith, and G. Ros¸u. Garbage collection for monitoring parametric properties. In Proceedings of PLDI’11, pages 415–424. ACM, 2011. Google Scholar
Digital Library
- N. Kobayashi, B. C. Pierce, and D. N. Turner. Linearity and the pi-calculus. ACM Trans. Program. Lang. Syst., 21(5):914– 947, 1999. Google Scholar
Digital Library
- F. Le Fessant and L. Maranget. Compiling join-patterns. Electr. Notes Theor. Comput. Sci., 16(3):205–224, 1998.Google Scholar
Cross Ref
- P. O. Meredith, D. Jin, F. Chen, and G. Ros¸u. Efficient monitoring of parametric context-free patterns. Autom. Softw. Eng., 17(2):149–180, 2010. Google Scholar
Digital Library
- Microsoft Research. Cω, 2004. http://research. microsoft.com/Comega/.Google Scholar
- E. Najm, A. Nimour, and J. Stefani. Guaranteeing liveness in an object calculus through behavioural typing. In Proceedings of FORTE’99, volume 156, pages 203–221. Kluwer, 1999. Google Scholar
Digital Library
- P. Nienaltowski. Practical Framework for Contract-Based Concurrent Object-Oriented Programming. PhD thesis, ETH Zurich, 2007.Google Scholar
- O. Nierstrasz. Regular types for active objects. In Proceedings of OOPSLA’93, pages 1–15. ACM, 1993. Google Scholar
Digital Library
- M. Patrignani, D. Clarke, and D. Sangiorgi. Ownership types for the join calculus. In Proceedings of FMOODS/FORTE’11, LNCS 6722, pages 289–303. Springer, 2011. Google Scholar
Digital Library
- F. Puntigam. State inference for dynamically changing interfaces. Comput. Lang., 27(4):163–202, 2001. Google Scholar
Digital Library
- F. Puntigam. Strong types for coordinating active objects. Concurrency and Computation: Practice and Experience, 13(4):293–326, 2001.Google Scholar
Cross Ref
- F. Puntigam and C. Peter. Types for active objects with static deadlock prevention. Fundam. Inform., 48(4):315–341, 2001. Google Scholar
Digital Library
- A. Ravara and V. T. Vasconcelos. Typing non-uniform concurrent objects. In Proceedings of CONCUR’00, LNCS 1877, pages 474–488. Springer, 2000. Google Scholar
Digital Library
- C. V. Russo. The joins concurrency library. In Proceedings of PADL’07, LNCS 4354, pages 260–274. Springer, 2007. Google Scholar
Digital Library
- C. V. Russo. Join patterns for visual basic. In Proceedings of OOPSLA’08, pages 53–72. ACM, 2008. Google Scholar
Digital Library
- D. Sangiorgi and D. Walker. The Pi-Calculus - A theory of mobile processes. Cambridge University Press, 2001. Google Scholar
Digital Library
- S. Stork, P. Marques, and J. Aldrich. Concurrency by default: using permissions to express dataflow in stateful programs. In Proceedings of OOPSLA’09, pages 933–940. ACM, 2009. Google Scholar
Digital Library
- S. Stork, K. Naden, J. Sunshine, M. Mohr, A. Fonseca, P. Marques, and J. Aldrich. Æminium: A permission-based concurrent-by-default programming language approach. ACM Trans. Program. Lang. Syst., 36(1):2, 2014. Google Scholar
Digital Library
- R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Software Eng., 12(1):157–171, 1986. Google Scholar
Digital Library
- J. Sunshine, K. Naden, S. Stork, J. Aldrich, and É. Tanter. First-class state change in Plaid. In Proceedings of OOPSLA’11, pages 713–732. ACM, 2011. Google Scholar
Digital Library
- A. J. Turon and C. V. Russo. Scalable join patterns. In Proceedings of OOPSLA’11, pages 575–594. ACM, 2011. Google Scholar
Digital Library
- S. West, S. Nanz, and B. Meyer. Efficient and reasonable object-oriented concurrency. In Proceedings of PPoPP’15, pages 273–274, 2015. Google Scholar
Digital Library
Index Terms
The chemical approach to typestate-oriented programming
Recommendations
The Chemical Approach to Typestate-Oriented Programming
We introduce a novel approach to typestate-oriented programming based on the chemical metaphor: state and operations on objects are molecules of messages, and state transformations are chemical reactions. This approach allows us to investigate typestate ...
The chemical approach to typestate-oriented programming
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsWe study a novel approach to typestate-oriented programming based on the chemical metaphor: state and operations on objects are molecules of messages and state transformations are chemical reactions. This approach allows us to investigate typestate in ...
Typestate-like analysis of multiple interacting objects
OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applicationsThis paper presents a static analysis of typestate-like temporal specifications of groups of interacting objects, which are expressed using tracematches. Whereas typestate expresses a temporal specification of one object, a tracematch state may change ...






Comments