{"title":"Taming stateful computations in Rust with typestates","authors":"José Duarte , António Ravara","doi":"10.1016/j.cola.2022.101154","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101154","url":null,"abstract":"<div><p>As our lives become increasingly more reliant on software, the impact of its failures grows as well; these failures have diverse causes and their impact ranges from negligible to life-threatening; thus, it is our duty as developers to minimize their occurrence, just as other fields do.</p><p>To that end, we build abstractions, move complexity from component to component, and much more, just to stop the end-user from shooting themselves in the foot. However, building said abstractions still requires the original author to know where the pitfalls lie and how to avoid them, an implicit contract that does not constitute a guarantee that they will not shoot themselves and their users in the feet.</p><p>Rust aims to minimize the amount of handguns users have at their disposal, locking them behind special <span>unsafe</span> blocks and restricting the set of possible programs through static analysis; this analysis is performed by the compiler which ensures that the program does not contain memory related errors such as <em>use-after-free</em> bugs.</p><p>While Rust is able to succeed in the previous domain, other error classes persist, such as errors related to API misusage. Our work aims to tackle that domain, providing a tool which enables developers to write safer APIs using typestates.</p><p>We propose a macro which embeds a typestate description DSL in Rust which allows developers to specify typestates for their APIs; the typestate is checked at compile-time for common mistakes and to ensure the correct usage of the typestate, we leverage Rust’s type system.</p><p>Our work only requires a Rust compiler, avoiding workflow bloat and keeping the development experience simple; it is open-source and available at <span>https://github.com/rustype/typestate-rs</span><svg><path></path></svg>.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"72 ","pages":"Article 101154"},"PeriodicalIF":2.2,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S259011842200051X/pdfft?md5=2622a5c710cc35277031a7c6298fd301&pid=1-s2.0-S259011842200051X-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72242278","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Kyungjin Park, Bradford W. Mott, S. J. Lee, Anisha Gupta, Katie Jantaraweragul, Krista D. Glazewski, J. Scribner, Anne T. Ottenbreit-Leftwich, C. Hmelo‐Silver, James Lester
{"title":"Investigating a visual interface for elementary students to formulate AI planning tasks","authors":"Kyungjin Park, Bradford W. Mott, S. J. Lee, Anisha Gupta, Katie Jantaraweragul, Krista D. Glazewski, J. Scribner, Anne T. Ottenbreit-Leftwich, C. Hmelo‐Silver, James Lester","doi":"10.1016/j.cola.2022.101157","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101157","url":null,"abstract":"","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"1 1","pages":"101157"},"PeriodicalIF":2.2,"publicationDate":"2022-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"90289547","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"PeachPie: Mature PHP to CLI compiler","authors":"Robert Husák, Jakub Mísek, F. Zavoral, J. Kofroň","doi":"10.1016/j.cola.2022.101152","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101152","url":null,"abstract":"","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"59 1","pages":"101152"},"PeriodicalIF":2.2,"publicationDate":"2022-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"74057408","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Taming stateful computations in Rust with typestates","authors":"J. Duarte, A. Ravara","doi":"10.1016/j.cola.2022.101154","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101154","url":null,"abstract":"","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"15 1","pages":"101154"},"PeriodicalIF":2.2,"publicationDate":"2022-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"85118076","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Vinícius Julião Ramos, Alexander Holmquist, Fernando Magno Quintão Pereira
{"title":"Hapi: A domain-specific language for the declaration of access policies","authors":"Vinícius Julião Ramos, Alexander Holmquist, Fernando Magno Quintão Pereira","doi":"10.1016/j.cola.2022.101153","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101153","url":null,"abstract":"","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"81 1","pages":"101153"},"PeriodicalIF":2.2,"publicationDate":"2022-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"76139342","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Design, implementation and evaluation of the Hedy programming language","authors":"Marleen Gilsing, Jesús Pelay, F. Hermans","doi":"10.1016/j.cola.2022.101158","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101158","url":null,"abstract":"","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"32 1","pages":"101158"},"PeriodicalIF":2.2,"publicationDate":"2022-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"78569509","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Minimising line segments in linear diagrams is NP-hard","authors":"Peter Chapman, Kevin Sim, Huang Hao Chen","doi":"10.1016/j.cola.2022.101136","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101136","url":null,"abstract":"<div><p>Linear diagrams have been shown to be an effective method of representing set-based data. Moreover, a number of guidelines have been proven to improve the efficacy of linear diagrams. One of these guidelines is to minimise the number of line segments appearing in a diagram. We show this problem to be NP-hard.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"71 ","pages":"Article 101136"},"PeriodicalIF":2.2,"publicationDate":"2022-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S2590118422000351/pdfft?md5=a982e755f1407cdf8298654e8eace4ec&pid=1-s2.0-S2590118422000351-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72268972","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
G. D. J. Barbosa, Dalai Dos Santos Ribeiro, Marisa Do Carmo Silva, H. Lopes, Simone Diniz Junqueira Barbosa
{"title":"Investigating the relationships between class probabilities and users' appropriate trust in computer vision classifications of ambiguous images","authors":"G. D. J. Barbosa, Dalai Dos Santos Ribeiro, Marisa Do Carmo Silva, H. Lopes, Simone Diniz Junqueira Barbosa","doi":"10.1016/j.cola.2022.101149","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101149","url":null,"abstract":"","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"1 1","pages":"101149"},"PeriodicalIF":2.2,"publicationDate":"2022-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"81950756","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}