{"title":"无死锁并发的分级单子(function pearl)","authors":"Andrej Ivaskovic, A. Mycroft","doi":"10.1145/3406088.3409024","DOIUrl":null,"url":null,"abstract":"We present a new type-oriented framework for writing shared memory multithreaded programs that the Haskell type system guarantees are deadlock-free. The implementation wraps all concurrent computation inside a graded monad and assumes a total order is defined between locks. The grades within the type of such a computation specify which locks it acquires and releases. This information is drawn from an algebra that ensures that types can, in principle, be inferred in polynomial time.","PeriodicalId":242706,"journal":{"name":"Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell","volume":"38 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-08-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"A graded monad for deadlock-free concurrency (functional pearl)\",\"authors\":\"Andrej Ivaskovic, A. Mycroft\",\"doi\":\"10.1145/3406088.3409024\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present a new type-oriented framework for writing shared memory multithreaded programs that the Haskell type system guarantees are deadlock-free. The implementation wraps all concurrent computation inside a graded monad and assumes a total order is defined between locks. The grades within the type of such a computation specify which locks it acquires and releases. This information is drawn from an algebra that ensures that types can, in principle, be inferred in polynomial time.\",\"PeriodicalId\":242706,\"journal\":{\"name\":\"Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell\",\"volume\":\"38 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-08-09\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3406088.3409024\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3406088.3409024","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A graded monad for deadlock-free concurrency (functional pearl)
We present a new type-oriented framework for writing shared memory multithreaded programs that the Haskell type system guarantees are deadlock-free. The implementation wraps all concurrent computation inside a graded monad and assumes a total order is defined between locks. The grades within the type of such a computation specify which locks it acquires and releases. This information is drawn from an algebra that ensures that types can, in principle, be inferred in polynomial time.