• Tidak ada hasil yang ditemukan

7 Conclusion

Dalam dokumen Quantitative Analysis of Smart Contracts (Halaman 56-59)

We have presented a novel approach for contract-checking for concurrent pro- cesses. Our model uses partial identity monitors which are written in the same language as the original processes and execute transparently. We define what it means to be a partial identity monitor and prove our characterization cor- rect. We provide multiple examples of contracts we can monitor including ones that make use of the monitor’s internal state, ones that make use of the idea of probabilistic result checking, and ones that cannot be expressed as depen- dent or refinement types. We translate contracts in the refinement fragment into monitors, and prove a safety theorem for that fragment.

Acknowledgment. This research was supported in part by NSF grant CNS1423168 and a Carnegie Mellon University Presidential Fellowship.

References

1. Acay, C., Pfenning, F.: Intersections and unions of session types. In: Proceedings Eighth Workshop on Intersection Types and Related Systems, ITRS 2016, Porto, Portugal, pp. 4–19, 26 June 2016.https://dx.doi.org/10.4204/EPTCS.242.3 2. Ahmed, A., Findler, R.B., Siek, J.G., Wadler, P.: Blame for all. In: 38th ACM

SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2011) (2011).https://doi.acm.org/10.1145/1570506.1570507

3. Balzer, S., Pfenning, F.: Manifest sharing with session types. Proc. ACM Program.

Lang.1(ICFP), 37:1–37:29 (2017).https://doi.org/10.1145/3110281

4. Caires, L., Pfenning, F.: Session types as intuitionistic linear propositions. In:

Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 222–236.

Springer, Heidelberg (2010).https://doi.org/10.1007/978-3-642-15375-4 16 5. Caires, L., Pfenning, F., Toninho, B.: Linear logic propositions as session types.

Math. Struct. Comput. Sci.26(3), 367–423 (2016)

6. Cervesato, I., Scedrov, A.: Relating state-based and process-based concurrency through linear logic. Inf. Comput.207(10), 1044–1077 (2009).https://doi.org/10.

1016/j.ic.2008.11.006

7. Dimoulas, C., Findler, R.B., Flanagan, C., Felleisen, M.: Correct blame for con- tracts: no more scapegoating. In: Proceedings of the 38th Annual ACM SIGPLAN- SIGACT Symposium on Principles of Programming Languages, POPL 2011, pp.

215–226. ACM, New York (2011).https://doi.acm.org/10.1145/1926385.1926410 8. Dimoulas, C., Tobin-Hochstadt, S., Felleisen, M.: Complete monitors for behavioral

contracts. In: Seidl, H. (ed.) ESOP 2012. LNCS, vol. 7211, pp. 214–233. Springer, Heidelberg (2012).https://doi.org/10.1007/978-3-642-28869-2 11

9. Disney, T., Flanagan, C., McCarthy, J.: Temporal higher-order contracts. In: 16th ACM SIGPLAN International Conference on Functional Programming (ICFP 2011) (2011).https://doi.acm.org/10.1145/2034773.2034800

10. Findler, R.B., Felleisen, M.: Contracts for higher-order functions. In: Proceedings of the Seventh ACM SIGPLAN International Conference on Functional Program- ming, ICFP 2002, pp. 48–59. ACM, New York (2002). https://doi.acm.org/10.

1145/581478.581484

11. Gay, S.J., Hole, M.: Subtyping for session types in theπ-calculus. Acta Informatica 42(2–3), 191–225 (2005).https://doi.org/10.1007/s00236-005-0177-z

12. Gommerstadt, H., Jia, L., Pfenning, F.: Session-typed concurrent contracts. Tech- nical report CMU-CyLab-17-004, CyLab, Carnegie Mellon University, February 2018

13. Griffith, D.: Polarized Substructural Session Types. Ph.D. thesis, University of Illinois at Urbana-Champaign, April 2016

14. Igarashi, A., Thiemann, P., Vasconcelos, V.T., Wadler, P.: Gradual session types.

Proc. ACM Program. Lang.1(ICFP), 38:1–38:28 (2017).https://doi.org/10.1145/

3110282

15. Jia, L., Gommerstadt, H., Pfenning, F.: Monitors and blame assignment for higher- order session types. In: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, pp. 582–594.

ACM, New York (2016).https://doi.acm.org/10.1145/2837614.2837662

16. Keil, M., Thiemann, P.: Blame assignment for higher-order contracts with intersec- tion and union. In: 20th ACM SIGPLAN International Conference on Functional Programming (ICFP 2015) (2015).https://doi.acm.org/10.1145/2784731.2784737 17. Melgratti, H., Padovani, L.: Chaperone contracts for higher-order sessions.

Proc. ACM Program. Lang.1(ICFP), 35:1–35:29 (2017).https://doi.org/10.1145/

3110279

18. Pfenning, F., Griffith, D.: Polarized substructural session types. In: Pitts, A. (ed.) FoSSaCS 2015. LNCS, vol. 9034, pp. 3–22. Springer, Heidelberg (2015).https://

doi.org/10.1007/978-3-662-46678-0 1

19. Schneider, F.B.: Enforceable security policies. ACM Trans. Inf. Syst. Secur. 3(1), 30–50 (2000).https://doi.org/10.1145/353323.353382

20. Thiemann, P.: Session types with gradual typing. In: Maffei, M., Tuosto, E. (eds.) TGC 2014. LNCS, vol. 8902, pp. 144–158. Springer, Heidelberg (2014).https://

doi.org/10.1007/978-3-662-45917-1 10

21. Thiemann, P., Vasconcelos, V.T.: Context-free session types. In: Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, ICFP 2016, pp. 462–475. ACM, New York (2016).https://acm.doi.org/10.4230/

LIPIcs.ECOOP.2016.9

22. Toninho, B.: A Logical Foundation for Session-based Concurrent Computation.

Ph.D. thesis, Carnegie Mellon University and New University of Lisbon (2015) 23. Toninho, B., Caires, L., Pfenning, F.: Higher-order processes, functions, and ses-

sions: a monadic integration. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013.

LNCS, vol. 7792, pp. 350–369. Springer, Heidelberg (2013). https://doi.org/10.

1007/978-3-642-37036-6 20

24. Wadler, P.: A complement to blame. In: 1st Summit on Advances in Programming Languages (SNAPL 2015) (2015). https://doi.acm.org/10.4230/LIPIcs.SNAPL.

2015.309

25. Wadler, P., Findler, R.B.: Well-typed programs can’t be blamed. In: Castagna, G.

(ed.) ESOP 2009. LNCS, vol. 5502, pp. 1–16. Springer, Heidelberg (2009).https://

doi.org/10.1007/978-3-642-00590-9 1

26. Wasserman, H., Blum, M.: Software reliability via run-time result-checking. J.

ACM44(6), 826–849 (1997).https://doi.org/10.1145/268999.269003

27. Waye, L., Chong, S., Dimoulas, C.: Whip: higher-order contracts for modern ser- vices. Proc. ACM Program. Lang.1(ICFP), 36:1–36:28 (2017).https://doi.org/10.

1145/3110280

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

Crash Failure Handling in Distributed

Dalam dokumen Quantitative Analysis of Smart Contracts (Halaman 56-59)