Adventure of a Lifetime: Extract Method Refactoring for Rust
We present a design and implementation of the automated "Extract Method" refactoring for Rust programs. Even though Extract Method is one of the most well-studied and widely used in practice automated refactorings, featured in all major IDEs for all popular programming languages, implement...
Saved in:
| Published in: | Proceedings of ACM on programming languages Vol. 7; no. OOPSLA2; pp. 658 - 685 |
|---|---|
| Main Authors: | , , , |
| Format: | Journal Article |
| Language: | English |
| Published: |
New York, NY, USA
ACM
16.10.2023
|
| Subjects: | |
| ISSN: | 2475-1421, 2475-1421 |
| Online Access: | Get full text |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| Abstract | We present a design and implementation of the automated "Extract Method" refactoring for Rust programs. Even though Extract Method is one of the most well-studied and widely used in practice automated refactorings, featured in all major IDEs for all popular programming languages, implementing it soundly for Rust is surprisingly non-trivial due to the restrictions of the Rust's ownership and lifetime-based type system. In this work, we provide a systematic decomposition of the Extract Method refactoring for Rust programs into a series of program transformations, each concerned with satisfying a particular aspect of Rust type safety, eventually producing a well-typed Rust program. Our key discovery is the formulation of Extract Method as a composition of naive function hoisting and a series of automated program repair procedures that progressively make the resulting program "more well-typed" by relying on the corresponding repair oracles. Those oracles include a novel static intra-procedural ownership analysis that infers correct sharing annotations for the extracted function's parameters, and the lifetime checker of rustc, Rust's reference compiler. We implemented our approach in a tool called REM---an automated Extract Method refactoring built on top of IntelliJ IDEA plugin for Rust. Our extensive evaluation on a corpus of changes in five popular Rust projects shows that REM (a) can extract a larger class of feature-rich code fragments into semantically correct functions than other existing refactoring tools, (b) can reproduce method extractions performed manually by human developers in the past, and (c) is efficient enough to be used in interactive development. |
|---|---|
| AbstractList | We present a design and implementation of the automated "Extract Method" refactoring for Rust programs. Even though Extract Method is one of the most well-studied and widely used in practice automated refactorings, featured in all major IDEs for all popular programming languages, implementing it soundly for Rust is surprisingly non-trivial due to the restrictions of the Rust's ownership and lifetime-based type system.
In this work, we provide a systematic decomposition of the Extract Method refactoring for Rust programs into a series of program transformations, each concerned with satisfying a particular aspect of Rust type safety, eventually producing a well-typed Rust program. Our key discovery is the formulation of Extract Method as a composition of naive function hoisting and a series of automated program repair procedures that progressively make the resulting program "more well-typed" by relying on the corresponding repair oracles. Those oracles include a novel static intra-procedural ownership analysis that infers correct sharing annotations for the extracted function's parameters, and the lifetime checker of rustc, Rust's reference compiler.
We implemented our approach in a tool called REM---an automated Extract Method refactoring built on top of IntelliJ IDEA plugin for Rust. Our extensive evaluation on a corpus of changes in five popular Rust projects shows that REM (a) can extract a larger class of feature-rich code fragments into semantically correct functions than other existing refactoring tools, (b) can reproduce method extractions performed manually by human developers in the past, and (c) is efficient enough to be used in interactive development. We present a design and implementation of the automated "Extract Method" refactoring for Rust programs. Even though Extract Method is one of the most well-studied and widely used in practice automated refactorings, featured in all major IDEs for all popular programming languages, implementing it soundly for Rust is surprisingly non-trivial due to the restrictions of the Rust's ownership and lifetime-based type system. In this work, we provide a systematic decomposition of the Extract Method refactoring for Rust programs into a series of program transformations, each concerned with satisfying a particular aspect of Rust type safety, eventually producing a well-typed Rust program. Our key discovery is the formulation of Extract Method as a composition of naive function hoisting and a series of automated program repair procedures that progressively make the resulting program "more well-typed" by relying on the corresponding repair oracles. Those oracles include a novel static intra-procedural ownership analysis that infers correct sharing annotations for the extracted function's parameters, and the lifetime checker of rustc, Rust's reference compiler. We implemented our approach in a tool called REM---an automated Extract Method refactoring built on top of IntelliJ IDEA plugin for Rust. Our extensive evaluation on a corpus of changes in five popular Rust projects shows that REM (a) can extract a larger class of feature-rich code fragments into semantically correct functions than other existing refactoring tools, (b) can reproduce method extractions performed manually by human developers in the past, and (c) is efficient enough to be used in interactive development. |
| ArticleNumber | 245 |
| Author | Costea, Andreea Sergey, Ilya Gopinathan, Kiran Thy, Sewen |
| Author_xml | – sequence: 1 givenname: Sewen orcidid: 0009-0005-8798-7809 surname: Thy fullname: Thy, Sewen email: s.thy@u.yale-nus.edu.sg organization: Yale-NUS College, Singapore, Singapore – sequence: 2 givenname: Andreea orcidid: 0000-0002-9089-9392 surname: Costea fullname: Costea, Andreea email: andreeac@comp.nus.edu.sg organization: National University of Singapore, Singapores, Singapore – sequence: 3 givenname: Kiran orcidid: 0000-0002-1877-9871 surname: Gopinathan fullname: Gopinathan, Kiran email: kirang@comp.nus.edu.sg organization: National University of Singapore, Singapore, Singapore – sequence: 4 givenname: Ilya orcidid: 0000-0003-4250-5392 surname: Sergey fullname: Sergey, Ilya email: ilya@nus.edu.sg organization: National University of Singapore, Singapore, Singapore |
| BookMark | eNptz01LAzEQBuAgFay1ePeUm6fVfO1mI15KqR9QEYqel2wy0Uh3I0kq-u9daRURTzPDPAzzHqJRH3pA6JiSM0pFec4rxmpG99CYCVkWVDA6-tUfoGlKL4QQqriouRqjy5l9gz5vIuDgsMZL7yD7Di7w4j1HbTK-g_wcLF6BG6YQff-EXYh4tUn5CO07vU4w3dUJerxaPMxviuX99e18tiw0kzIXlW0J1JaCYEZxp4RWxkApW04Udc6UQjJnJAFeiVZUra2lBAVOKWZsrSWfoGJ718SQUgTXGJ919qEfXvTrhpLmK32zSz_40z_-NfpOx49_5MlWatP9oO_lJyU2Yh4 |
| CitedBy_id | crossref_primary_10_1109_TSE_2023_3345800 |
| Cites_doi | 10.1109/ICSE.2007.70 10.1145/1368088.1368146 10.1145/1094811.1094832 10.1007/978-3-642-28869-2_29 10.1145/286936.286947 10.1007/978-3-642-36946-9_3 10.1007/978-3-540-74061-2_1 10.1109/TSE.2004.1265817 10.1145/1636642.1636655 10.1145/3156016 10.1007/978-3-540-45070-2_9 10.1145/1869459.1869485 10.1016/j.entcs.2005.02.053 10.1145/3014812.3014826 10.1145/3485498 10.1016/j.scico.2004.03.002 10.1145/3314221.3314600 10.1145/949305.949308 10.1145/582419.582447 10.1007/978-3-642-03013-0_19 10.1145/582419.582440 10.1145/1368088.1368147 10.5555/280606.280610 10.1145/2398857.2384680 10.1145/1297027.1297059 10.1007/978-3-642-28872-2_34 10.1007/978-3-642-31057-7_9 10.1109/ASE.2009.68 10.5281/zenodo.8124395 10.1145/3385412.3386036 10.1007/3-540-45337-7_2 10.1145/1028664.1028669 10.1109/MS.2021.3072577 |
| ContentType | Journal Article |
| Copyright | Owner/Author |
| Copyright_xml | – notice: Owner/Author |
| DBID | AAYXX CITATION |
| DOI | 10.1145/3622821 |
| DatabaseName | CrossRef |
| DatabaseTitle | CrossRef |
| DatabaseTitleList | CrossRef |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Computer Science |
| EISSN | 2475-1421 |
| EndPage | 685 |
| ExternalDocumentID | 10_1145_3622821 3622821 |
| GrantInformation_xml | – fundername: Singapore Ministry of Education grantid: MOE-MOET32021-0001 funderid: https://doi.org/10.13039/ |
| GroupedDBID | AAKMM AAYFX ACM ADPZR AIKLT ALMA_UNASSIGNED_HOLDINGS GUFHI LHSKQ M~E OK1 ROL AAYXX AEFXT AEJOY AKRVB CITATION |
| ID | FETCH-LOGICAL-a277t-6db0e8d1e42c93f94a9cce57b3091ffc5472fc70e364b46bd877e9ef992cd8a73 |
| ISICitedReferencesCount | 3 |
| ISICitedReferencesURI | http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=001087279100025&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| ISSN | 2475-1421 |
| IngestDate | Sun Nov 09 14:46:52 EST 2025 Tue Nov 18 21:23:03 EST 2025 Fri Feb 21 01:29:13 EST 2025 |
| IsDoiOpenAccess | true |
| IsOpenAccess | true |
| IsPeerReviewed | true |
| IsScholarly | true |
| Issue | OOPSLA2 |
| Keywords | program repair Rust automated code refactoring |
| Language | English |
| License | This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. |
| LinkModel | OpenURL |
| MergedId | FETCHMERGED-LOGICAL-a277t-6db0e8d1e42c93f94a9cce57b3091ffc5472fc70e364b46bd877e9ef992cd8a73 |
| ORCID | 0009-0005-8798-7809 0000-0002-1877-9871 0000-0003-4250-5392 0000-0002-9089-9392 |
| OpenAccessLink | https://dl.acm.org/doi/10.1145/3622821 |
| PageCount | 28 |
| ParticipantIDs | crossref_citationtrail_10_1145_3622821 crossref_primary_10_1145_3622821 acm_primary_3622821 |
| PublicationCentury | 2000 |
| PublicationDate | 2023-10-16 |
| PublicationDateYYYYMMDD | 2023-10-16 |
| PublicationDate_xml | – month: 10 year: 2023 text: 2023-10-16 day: 16 |
| PublicationDecade | 2020 |
| PublicationPlace | New York, NY, USA |
| PublicationPlace_xml | – name: New York, NY, USA |
| PublicationTitle | Proceedings of ACM on programming languages |
| PublicationTitleAbbrev | ACM PACMPL |
| PublicationYear | 2023 |
| Publisher | ACM |
| Publisher_xml | – name: ACM |
| References | Mehmet Emre, Ryan Schroeder, Kyle Dewey, and Ben Hardekopf. 2021. Translating C to safer Rust. Proc. ACM Program. Lang., 5, OOPSLA (2021), 1–29. https://doi.org/10.1145/3485498 10.1145/3485498 Dave Clarke, Johan Östlund, Ilya Sergey, and Tobias Wrigstad. 2013. Ownership Types: A Survey. In Aliasing in Object-Oriented Programming. Types, Analysis and Verification (LNCS, Vol. 7850). Springer, 15–58. https://doi.org/10.1007/978-3-642-36946-9_3 10.1007/978-3-642-36946-9_3 Sewen Thy, Andreea Costea, Kiran Gopinathan, and Ilya Sergey. 2023. Reproduction Artefact for Article “Adventure of a Lifetime: Extract Method Refactoring for Rust”. https://doi.org/10.5281/zenodo.8124395 10.5281/zenodo.8124395 Ittai Balaban, Frank Tip, and Robert M. Fuhrer. 2005. Refactoring support for class library migration. In OOPSLA. ACM, 265–279. https://doi.org/10.1145/1094811.1094832 10.1145/1094811.1094832 Nicolas Juillerat and Béat Hirsbrunner. 2007. Improving Method Extraction: A Novel Approach to Data Flow Analysis Using Boolean Flags and Expressions. In 1st Workshop on Refactoring Tools (WRT). 48–49. Dave Clarke and Sophia Drossopoulou. 2002. Ownership, Encapsulation and the Disjointness of Type and Effect. In OOPSLA. ACM, 292–310. https://doi.org/10.1145/582419.582447 10.1145/582419.582447 Günter Kniesel and Helge Koch. 2004. Static composition of refactorings. Sci. Comput. Program., 52 (2004), 9–51. https://doi.org/10.1016/j.scico.2004.03.002 10.1016/j.scico.2004.03.002 Dmitry Jemerov. 2008. Implementing refactorings in IntelliJ IDEA. In Second ACM Workshop on Refactoring Tools (WRT). ACM, 13. https://doi.org/10.1145/1636642.1636655 10.1145/1636642.1636655 Robert M. Fuhrer, Frank Tip, and Adam Kiezun. 2004. Advanced Refactorings in Eclipse. In OOPSLA Companion. ACM, 8. https://doi.org/10.1145/1028664.1028669 10.1145/1028664.1028669 Wei Huang, Werner Dietl, Ana L. Milanova, and Michael D. Ernst. 2012. Inference and Checking of Object Ownership. In ECOOP (LNCS, Vol. 7313). Springer, 181–206. https://doi.org/10.1007/978-3-642-31057-7_9 10.1007/978-3-642-31057-7_9 The Rust Team. 2017. The Rust programming language. http://rust-lang.org Martin Fowler and Kent Beck. 1999. Refactoring: Improving the Design of Existing Code. Addison-Wesley. Microsoft. 2023. Refactoring in Visual Studio Code. https://code.visualstudio.com/docs/editor/refactoring Stas Negara, Nicholas Chen, Mohsen Vakilian, Ralph E. Johnson, and Danny Dig. 2013. A Comparative Study of Manual and Automated Refactorings. In ECOOP (LNCS). Springer, 552–576. https://doi.org/978-3-642-39038-8_23 Huiqing Li and Simon J. Thompson. 2012. A Domain-Specific Language for Scripting Refactorings in Erlang. In FASE (LNCS, Vol. 7212). Springer, 501–515. https://doi.org/10.1007/978-3-642-28872-2_34 10.1007/978-3-642-28872-2_34 Donald Bradley Roberts. 1999. Practical Analysis for Refactoring. Ph. D. Dissertation. University of Illinois at Urbana-Champaign. USA. Garming Sam, Nick Cameron, and Alex Potanin. 2017. Automated Refactoring of Rust Programs. In Proceedings of the Australasian Computer Science Week Multiconference, ACSW. ACM, 14:1–14:9. https://doi.org/10.1145/3014812.3014826 10.1145/3014812.3014826 Chandrasekhar Boyapati, Robert Lee, and Martin Rinard. 2002. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. In OOPSLA. ACM, 211–230. https://doi.org/10.1145/582419.582440 10.1145/582419.582440 Lars Ole Andersen. 1994. Program analysis and specialization for the C programming language. Ph. D. Dissertation. University of Copenhagen. Denmark. Hannes Kegel and Friedrich Steimann. 2008. Systematically refactoring inheritance to delegation in java. In ICSE. ACM, 431–440. https://doi.org/10.1145/1368088.1368147 10.1145/1368088.1368147 Nicholas D. Matsakis. 2017. The Rust RFC Book: Non-Lexical Lifetimes. https://rust-lang.github.io/rfcs/2094-nll.html Ilya Sergey and Dave Clarke. 2012. Gradual Ownership Types. In ESOP (LNCS, Vol. 7211). Springer, 579–599. https://doi.org/10.1007/978-3-642-28869-2_29 10.1007/978-3-642-28869-2_29 William G. Griswold. 1992. Program Restructuring as an Aid to Software Maintenance. Ph. D. Dissertation. University of Washington. USA. John Boyland, James Noble, and William Retert. 2001. Capabilities for Sharing: A Generalisation of Uniqueness and Read-Only. In ECOOP (LNCS, Vol. 2072). Springer, 2–27. https://doi.org/10.1007/3-540-45337-7_2 10.1007/3-540-45337-7_2 Max Schäfer and Oege de Moor. 2010. Specifying and implementing refactorings. In OOPSLA. ACM, 286–301. https://doi.org/10.1145/1869459.1869485 10.1145/1869459.1869485 Boqin Qin, Yilun Chen, Zeming Yu, Linhai Song, and Yiying Zhang. 2020. Understanding memory and thread safety practices and issues in real-world Rust programs. In PLDI. 763–779. https://doi.org/10.1145/3385412.3386036 10.1145/3385412.3386036 Tom Mens and Tom Tourwé. 2004. A Survey of Software Refactoring. IEEE Trans. Software Eng., 30, 2 (2004), 126–139. https://doi.org/10.1109/TSE.2004.1265817 10.1109/TSE.2004.1265817 William F. Opdyke. 1991. Refactoring object-oriented frameworks. Ph. D. Dissertation. University of Illinois at Urbana-Champaign. USA. Huiqing Li, Simon J. Thompson, and Claus Reinke. 2005. The Haskell Refactorer, HaRe, and its API. In Proceedings of the Fifth Workshop on Language Descriptions, Tools, and Applications (LDTA) (ENTCS, Vol. 141). Elsevier, 29–34. https://doi.org/10.1016/j.entcs.2005.02.053 10.1016/j.entcs.2005.02.053 Isaiah Ayooluwa, Ledru Sylvestre, and Ivy Roy. 2020. Rewriting the GNU Coreutils in Rust. https://lwn.net/Articles/857599 Max Schäfer. 2010. Specification, Implementation and Verification of Refactorings. Ph. D. Dissertation. University of Oxford. UK. Don Roberts, John Brant, and Ralph E. Johnson. 1997. A Refactoring Tool for Smalltalk. Theory Pract. Object Syst., 3, 4 (1997), 253–263. Emerson R. Murphy-Hill and Andrew P. Black. 2008. Breaking the Barriers to Successful Refactoring: Observations and Tools for Extract Method. In ICSE. ACM, 421–430. https://doi.org/10.1145/1368088.1368146 10.1145/1368088.1368146 David G. Clarke, John Potter, and James Noble. 1998. Ownership Types for Flexible Alias Protection. In OOPSLA. ACM, 48–64. https://doi.org/10.1145/286936.286947 10.1145/286936.286947 Reuben N. S. Rowe, Hugo Férée, Simon J. Thompson, and Scott Owens. 2019. Characterising renaming within OCaml’s module system: theory and implementation. In PLDI. ACM, 950–965. https://doi.org/10.1145/3314221.3314600 10.1145/3314221.3314600 Ilya Sergey, Dave Clarke, and Alexander Podkhalyuzin. 2010. Automatic refactorings for Scala programs. KU Leuven. http://lirias.kuleuven.be/1652327 Frank Tip, Adam Kiezun, and Dirk Bäumer. 2003. Refactoring for generalization using type constraints. In OOPSLA. ACM, 13–26. https://doi.org/10.1145/949305.949308 10.1145/949305.949308 Dave Clarke and Tobias Wrigstad. 2003. External Uniqueness Is Unique Enough. In ECOOP (LNCS, Vol. 2743). Springer, 176–200. https://doi.org/978-3-540-45070-2_9 Wei Huang, Ana Milanova, Werner Dietl, and Michael D. Ernst. 2012. ReIm & ReImInfer: Checking and inference of reference immutability and method purity. In OOPSLA. ACM, 879–896. https://doi.org/10.1145/2398857.2384680 10.1145/2398857.2384680 Mohsen Vakilian, Danny Dig, Robert Bocchino, Jeffrey Overbey, Vikram Adve, and Ralph Johnson. 2009. Inferring Method Effect Summaries for Nested Heap Regions. In ASE. IEEE Computer Society, 421–432. https://doi.org/10.1109/ASE.2009.68 10.1109/ASE.2009.68 Friedrich Steimann and Andreas Thies. 2009. From Public to Private to Absent: Refactoring Java Programs under Constrained Accessibility. In ECOOP (LNCS, Vol. 5653). Springer, 419–443. https://doi.org/10.1007/978-3-642-03013-0_19 10.1007/978-3-642-03013-0_19 Adam Kiezun, Michael D. Ernst, Frank Tip, and Robert M. Fuhrer. 2007. Refactoring for Parameterizing Java Classes. In ICSE. IEEE Computer Society, 437–446. https://doi.org/10.1109/ICSE.2007.70 10.1109/ICSE.2007.70 The Rust Reference. 2023. Lifetime Elision. https://doc.rust-lang.org/reference/lifetime-elision.html Immunant Inc.. 2022. c2rust. Available at https://c2rust.com Nicholas D. Matsakis. 2017. The Rust RFC Book: Statements and expressions. https://doc.rust-lang.org/reference/statements-and-expressions.html Per Ove Ringdal. 2020. Automated Refactoring of Rust Programs. Master’s thesis. University of Oslo. Frank Tip. 2007. Refactoring Using Type Constraints. In SAS (LNCS, Vol. 4634). Springer, 1–17. https://doi.org/10.1007/978-3-540-74061-2_1 10.1007/978-3-540-74061-2_1 Friedrich Steimann. 2018. Constraint-Based Refactoring. ACM Trans. Program. Lang. Syst., 40, 1 (2018), 2:1–2:40. https://doi.org/10.1145/3156016 10.1145/3156016 Claire Le Goues, Michael Pradel, Abhik Roychoudhury, and Satish Chandra. 2021. Automatic Program Repair. IEEE Softw., 38, 4 (2021), 22–27. https://doi.org/10.1109/MS.2021.3072577 10.1109/MS.2021.3072577 Kin-Keung Ma and Jeffrey S. Foster. 2007. Inferring aliasing and encapsulation properties for java. In OOPSLA. ACM, 423–440. https://doi.org/10.1145/1297027.1297059 10.1145/1297027.1297059 Opdyke William F. (e_1_2_1_32_1) e_1_2_1_20_1 e_1_2_1_24_1 e_1_2_1_45_1 e_1_2_1_22_1 e_1_2_1_43_1 e_1_2_1_28_1 e_1_2_1_49_1 e_1_2_1_26_1 Ringdal Per Ove (e_1_2_1_34_1) e_1_2_1_47_1 Griswold William G. (e_1_2_1_13_1) Negara Stas (e_1_2_1_31_1) Roberts Donald Bradley (e_1_2_1_36_1) Andersen Lars Ole (e_1_2_1_1_1) e_1_2_1_8_1 e_1_2_1_6_1 e_1_2_1_12_1 e_1_2_1_35_1 e_1_2_1_50_1 e_1_2_1_4_1 e_1_2_1_10_1 e_1_2_1_33_1 e_1_2_1_2_1 e_1_2_1_16_1 e_1_2_1_39_1 e_1_2_1_14_1 e_1_2_1_37_1 Schäfer Max (e_1_2_1_41_1) Fowler Martin (e_1_2_1_11_1) 1999 Juillerat Nicolas (e_1_2_1_18_1) 2007 e_1_2_1_42_1 e_1_2_1_40_1 e_1_2_1_23_1 e_1_2_1_46_1 e_1_2_1_21_1 e_1_2_1_44_1 e_1_2_1_27_1 e_1_2_1_25_1 e_1_2_1_48_1 e_1_2_1_29_1 e_1_2_1_7_1 e_1_2_1_30_1 e_1_2_1_5_1 e_1_2_1_3_1 e_1_2_1_17_1 e_1_2_1_38_1 e_1_2_1_15_1 e_1_2_1_9_1 e_1_2_1_19_1 |
| References_xml | – reference: Don Roberts, John Brant, and Ralph E. Johnson. 1997. A Refactoring Tool for Smalltalk. Theory Pract. Object Syst., 3, 4 (1997), 253–263. – reference: Huiqing Li, Simon J. Thompson, and Claus Reinke. 2005. The Haskell Refactorer, HaRe, and its API. In Proceedings of the Fifth Workshop on Language Descriptions, Tools, and Applications (LDTA) (ENTCS, Vol. 141). Elsevier, 29–34. https://doi.org/10.1016/j.entcs.2005.02.053 10.1016/j.entcs.2005.02.053 – reference: Martin Fowler and Kent Beck. 1999. Refactoring: Improving the Design of Existing Code. Addison-Wesley. – reference: Robert M. Fuhrer, Frank Tip, and Adam Kiezun. 2004. Advanced Refactorings in Eclipse. In OOPSLA Companion. ACM, 8. https://doi.org/10.1145/1028664.1028669 10.1145/1028664.1028669 – reference: Kin-Keung Ma and Jeffrey S. Foster. 2007. Inferring aliasing and encapsulation properties for java. In OOPSLA. ACM, 423–440. https://doi.org/10.1145/1297027.1297059 10.1145/1297027.1297059 – reference: Max Schäfer and Oege de Moor. 2010. Specifying and implementing refactorings. In OOPSLA. ACM, 286–301. https://doi.org/10.1145/1869459.1869485 10.1145/1869459.1869485 – reference: Mohsen Vakilian, Danny Dig, Robert Bocchino, Jeffrey Overbey, Vikram Adve, and Ralph Johnson. 2009. Inferring Method Effect Summaries for Nested Heap Regions. In ASE. IEEE Computer Society, 421–432. https://doi.org/10.1109/ASE.2009.68 10.1109/ASE.2009.68 – reference: Günter Kniesel and Helge Koch. 2004. Static composition of refactorings. Sci. Comput. Program., 52 (2004), 9–51. https://doi.org/10.1016/j.scico.2004.03.002 10.1016/j.scico.2004.03.002 – reference: The Rust Team. 2017. The Rust programming language. http://rust-lang.org – reference: Tom Mens and Tom Tourwé. 2004. A Survey of Software Refactoring. IEEE Trans. Software Eng., 30, 2 (2004), 126–139. https://doi.org/10.1109/TSE.2004.1265817 10.1109/TSE.2004.1265817 – reference: Emerson R. Murphy-Hill and Andrew P. Black. 2008. Breaking the Barriers to Successful Refactoring: Observations and Tools for Extract Method. In ICSE. ACM, 421–430. https://doi.org/10.1145/1368088.1368146 10.1145/1368088.1368146 – reference: Wei Huang, Werner Dietl, Ana L. Milanova, and Michael D. Ernst. 2012. Inference and Checking of Object Ownership. In ECOOP (LNCS, Vol. 7313). Springer, 181–206. https://doi.org/10.1007/978-3-642-31057-7_9 10.1007/978-3-642-31057-7_9 – reference: Dave Clarke, Johan Östlund, Ilya Sergey, and Tobias Wrigstad. 2013. Ownership Types: A Survey. In Aliasing in Object-Oriented Programming. Types, Analysis and Verification (LNCS, Vol. 7850). Springer, 15–58. https://doi.org/10.1007/978-3-642-36946-9_3 10.1007/978-3-642-36946-9_3 – reference: Claire Le Goues, Michael Pradel, Abhik Roychoudhury, and Satish Chandra. 2021. Automatic Program Repair. IEEE Softw., 38, 4 (2021), 22–27. https://doi.org/10.1109/MS.2021.3072577 10.1109/MS.2021.3072577 – reference: Sewen Thy, Andreea Costea, Kiran Gopinathan, and Ilya Sergey. 2023. Reproduction Artefact for Article “Adventure of a Lifetime: Extract Method Refactoring for Rust”. https://doi.org/10.5281/zenodo.8124395 10.5281/zenodo.8124395 – reference: Frank Tip, Adam Kiezun, and Dirk Bäumer. 2003. Refactoring for generalization using type constraints. In OOPSLA. ACM, 13–26. https://doi.org/10.1145/949305.949308 10.1145/949305.949308 – reference: Dave Clarke and Sophia Drossopoulou. 2002. Ownership, Encapsulation and the Disjointness of Type and Effect. In OOPSLA. ACM, 292–310. https://doi.org/10.1145/582419.582447 10.1145/582419.582447 – reference: Nicolas Juillerat and Béat Hirsbrunner. 2007. Improving Method Extraction: A Novel Approach to Data Flow Analysis Using Boolean Flags and Expressions. In 1st Workshop on Refactoring Tools (WRT). 48–49. – reference: Dmitry Jemerov. 2008. Implementing refactorings in IntelliJ IDEA. In Second ACM Workshop on Refactoring Tools (WRT). ACM, 13. https://doi.org/10.1145/1636642.1636655 10.1145/1636642.1636655 – reference: William F. Opdyke. 1991. Refactoring object-oriented frameworks. Ph. D. Dissertation. University of Illinois at Urbana-Champaign. USA. – reference: Adam Kiezun, Michael D. Ernst, Frank Tip, and Robert M. Fuhrer. 2007. Refactoring for Parameterizing Java Classes. In ICSE. IEEE Computer Society, 437–446. https://doi.org/10.1109/ICSE.2007.70 10.1109/ICSE.2007.70 – reference: John Boyland, James Noble, and William Retert. 2001. Capabilities for Sharing: A Generalisation of Uniqueness and Read-Only. In ECOOP (LNCS, Vol. 2072). Springer, 2–27. https://doi.org/10.1007/3-540-45337-7_2 10.1007/3-540-45337-7_2 – reference: Nicholas D. Matsakis. 2017. The Rust RFC Book: Non-Lexical Lifetimes. https://rust-lang.github.io/rfcs/2094-nll.html – reference: Huiqing Li and Simon J. Thompson. 2012. A Domain-Specific Language for Scripting Refactorings in Erlang. In FASE (LNCS, Vol. 7212). Springer, 501–515. https://doi.org/10.1007/978-3-642-28872-2_34 10.1007/978-3-642-28872-2_34 – reference: Isaiah Ayooluwa, Ledru Sylvestre, and Ivy Roy. 2020. Rewriting the GNU Coreutils in Rust. https://lwn.net/Articles/857599/ – reference: Hannes Kegel and Friedrich Steimann. 2008. Systematically refactoring inheritance to delegation in java. In ICSE. ACM, 431–440. https://doi.org/10.1145/1368088.1368147 10.1145/1368088.1368147 – reference: Per Ove Ringdal. 2020. Automated Refactoring of Rust Programs. Master’s thesis. University of Oslo. – reference: Chandrasekhar Boyapati, Robert Lee, and Martin Rinard. 2002. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. In OOPSLA. ACM, 211–230. https://doi.org/10.1145/582419.582440 10.1145/582419.582440 – reference: Microsoft. 2023. Refactoring in Visual Studio Code. https://code.visualstudio.com/docs/editor/refactoring – reference: Friedrich Steimann. 2018. Constraint-Based Refactoring. ACM Trans. Program. Lang. Syst., 40, 1 (2018), 2:1–2:40. https://doi.org/10.1145/3156016 10.1145/3156016 – reference: Donald Bradley Roberts. 1999. Practical Analysis for Refactoring. Ph. D. Dissertation. University of Illinois at Urbana-Champaign. USA. – reference: Stas Negara, Nicholas Chen, Mohsen Vakilian, Ralph E. Johnson, and Danny Dig. 2013. A Comparative Study of Manual and Automated Refactorings. In ECOOP (LNCS). Springer, 552–576. https://doi.org/978-3-642-39038-8_23 – reference: Max Schäfer. 2010. Specification, Implementation and Verification of Refactorings. Ph. D. Dissertation. University of Oxford. UK. – reference: Ittai Balaban, Frank Tip, and Robert M. Fuhrer. 2005. Refactoring support for class library migration. In OOPSLA. ACM, 265–279. https://doi.org/10.1145/1094811.1094832 10.1145/1094811.1094832 – reference: Dave Clarke and Tobias Wrigstad. 2003. External Uniqueness Is Unique Enough. In ECOOP (LNCS, Vol. 2743). Springer, 176–200. https://doi.org/978-3-540-45070-2_9 – reference: Boqin Qin, Yilun Chen, Zeming Yu, Linhai Song, and Yiying Zhang. 2020. Understanding memory and thread safety practices and issues in real-world Rust programs. In PLDI. 763–779. https://doi.org/10.1145/3385412.3386036 10.1145/3385412.3386036 – reference: William G. Griswold. 1992. Program Restructuring as an Aid to Software Maintenance. Ph. D. Dissertation. University of Washington. USA. – reference: Mehmet Emre, Ryan Schroeder, Kyle Dewey, and Ben Hardekopf. 2021. Translating C to safer Rust. Proc. ACM Program. Lang., 5, OOPSLA (2021), 1–29. https://doi.org/10.1145/3485498 10.1145/3485498 – reference: Ilya Sergey and Dave Clarke. 2012. Gradual Ownership Types. In ESOP (LNCS, Vol. 7211). Springer, 579–599. https://doi.org/10.1007/978-3-642-28869-2_29 10.1007/978-3-642-28869-2_29 – reference: Nicholas D. Matsakis. 2017. The Rust RFC Book: Statements and expressions. https://doc.rust-lang.org/reference/statements-and-expressions.html – reference: Immunant Inc.. 2022. c2rust. Available at https://c2rust.com – reference: Frank Tip. 2007. Refactoring Using Type Constraints. In SAS (LNCS, Vol. 4634). Springer, 1–17. https://doi.org/10.1007/978-3-540-74061-2_1 10.1007/978-3-540-74061-2_1 – reference: Wei Huang, Ana Milanova, Werner Dietl, and Michael D. Ernst. 2012. ReIm & ReImInfer: Checking and inference of reference immutability and method purity. In OOPSLA. ACM, 879–896. https://doi.org/10.1145/2398857.2384680 10.1145/2398857.2384680 – reference: The Rust Reference. 2023. Lifetime Elision. https://doc.rust-lang.org/reference/lifetime-elision.html – reference: Ilya Sergey, Dave Clarke, and Alexander Podkhalyuzin. 2010. Automatic refactorings for Scala programs. KU Leuven. http://lirias.kuleuven.be/1652327 – reference: Lars Ole Andersen. 1994. Program analysis and specialization for the C programming language. Ph. D. Dissertation. University of Copenhagen. Denmark. – reference: Friedrich Steimann and Andreas Thies. 2009. From Public to Private to Absent: Refactoring Java Programs under Constrained Accessibility. In ECOOP (LNCS, Vol. 5653). Springer, 419–443. https://doi.org/10.1007/978-3-642-03013-0_19 10.1007/978-3-642-03013-0_19 – reference: Garming Sam, Nick Cameron, and Alex Potanin. 2017. Automated Refactoring of Rust Programs. In Proceedings of the Australasian Computer Science Week Multiconference, ACSW. ACM, 14:1–14:9. https://doi.org/10.1145/3014812.3014826 10.1145/3014812.3014826 – reference: Reuben N. S. Rowe, Hugo Férée, Simon J. Thompson, and Scott Owens. 2019. Characterising renaming within OCaml’s module system: theory and implementation. In PLDI. ACM, 950–965. https://doi.org/10.1145/3314221.3314600 10.1145/3314221.3314600 – reference: David G. Clarke, John Potter, and James Noble. 1998. Ownership Types for Flexible Alias Protection. In OOPSLA. ACM, 48–64. https://doi.org/10.1145/286936.286947 10.1145/286936.286947 – ident: e_1_2_1_20_1 doi: 10.1109/ICSE.2007.70 – ident: e_1_2_1_30_1 doi: 10.1145/1368088.1368146 – ident: e_1_2_1_3_1 doi: 10.1145/1094811.1094832 – ident: e_1_2_1_27_1 – ident: e_1_2_1_43_1 doi: 10.1007/978-3-642-28869-2_29 – ident: e_1_2_1_9_1 doi: 10.1145/286936.286947 – ident: e_1_2_1_26_1 – ident: e_1_2_1_7_1 doi: 10.1007/978-3-642-36946-9_3 – ident: e_1_2_1_48_1 doi: 10.1007/978-3-540-74061-2_1 – ident: e_1_2_1_28_1 doi: 10.1109/TSE.2004.1265817 – ident: e_1_2_1_17_1 doi: 10.1145/1636642.1636655 – ident: e_1_2_1_45_1 doi: 10.1145/3156016 – ident: e_1_2_1_8_1 doi: 10.1007/978-3-540-45070-2_9 – ident: e_1_2_1_42_1 doi: 10.1145/1869459.1869485 – ident: e_1_2_1_24_1 doi: 10.1016/j.entcs.2005.02.053 – ident: e_1_2_1_2_1 – ident: e_1_2_1_40_1 doi: 10.1145/3014812.3014826 – ident: e_1_2_1_10_1 doi: 10.1145/3485498 – ident: e_1_2_1_21_1 doi: 10.1016/j.scico.2004.03.002 – ident: e_1_2_1_37_1 doi: 10.1145/3314221.3314600 – ident: e_1_2_1_49_1 doi: 10.1145/949305.949308 – ident: e_1_2_1_6_1 doi: 10.1145/582419.582447 – volume-title: Program Restructuring as an Aid to Software Maintenance. Ph. D. Dissertation ident: e_1_2_1_13_1 – ident: e_1_2_1_46_1 doi: 10.1007/978-3-642-03013-0_19 – volume-title: Program analysis and specialization for the C programming language. Ph. D. Dissertation ident: e_1_2_1_1_1 – volume-title: Practical Analysis for Refactoring. Ph. D. Dissertation ident: e_1_2_1_36_1 – ident: e_1_2_1_4_1 doi: 10.1145/582419.582440 – ident: e_1_2_1_19_1 doi: 10.1145/1368088.1368147 – ident: e_1_2_1_38_1 – ident: e_1_2_1_35_1 doi: 10.5555/280606.280610 – ident: e_1_2_1_16_1 – volume-title: Refactoring object-oriented frameworks. Ph. D. Dissertation ident: e_1_2_1_32_1 – ident: e_1_2_1_15_1 doi: 10.1145/2398857.2384680 – ident: e_1_2_1_29_1 – ident: e_1_2_1_25_1 doi: 10.1145/1297027.1297059 – ident: e_1_2_1_23_1 doi: 10.1007/978-3-642-28872-2_34 – ident: e_1_2_1_14_1 doi: 10.1007/978-3-642-31057-7_9 – volume-title: Automated Refactoring of Rust Programs. Master’s thesis ident: e_1_2_1_34_1 – volume-title: Refactoring: Improving the Design of Existing Code year: 1999 ident: e_1_2_1_11_1 – volume-title: Implementation and Verification of Refactorings. Ph. D. Dissertation ident: e_1_2_1_41_1 – ident: e_1_2_1_44_1 – ident: e_1_2_1_50_1 doi: 10.1109/ASE.2009.68 – ident: e_1_2_1_47_1 doi: 10.5281/zenodo.8124395 – ident: e_1_2_1_39_1 – ident: e_1_2_1_33_1 doi: 10.1145/3385412.3386036 – ident: e_1_2_1_5_1 doi: 10.1007/3-540-45337-7_2 – volume-title: ECOOP (LNCS) ident: e_1_2_1_31_1 – ident: e_1_2_1_12_1 doi: 10.1145/1028664.1028669 – volume-title: 1st Workshop on Refactoring Tools (WRT). 48–49 year: 2007 ident: e_1_2_1_18_1 – ident: e_1_2_1_22_1 doi: 10.1109/MS.2021.3072577 |
| SSID | ssj0001934839 |
| Score | 2.2560549 |
| Snippet | We present a design and implementation of the automated "Extract Method" refactoring for Rust programs. Even though Extract Method is one of the most... |
| SourceID | crossref acm |
| SourceType | Enrichment Source Index Database Publisher |
| StartPage | 658 |
| SubjectTerms | Software and its engineering Software evolution Software maintenance tools |
| SubjectTermsDisplay | Software and its engineering -- Software evolution Software and its engineering -- Software maintenance tools |
| Title | Adventure of a Lifetime: Extract Method Refactoring for Rust |
| URI | https://dl.acm.org/doi/10.1145/3622821 |
| Volume | 7 |
| WOSCitedRecordID | wos001087279100025&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| journalDatabaseRights | – providerCode: PRVHPJ databaseName: ROAD: Directory of Open Access Scholarly Resources customDbUrl: eissn: 2475-1421 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0001934839 issn: 2475-1421 databaseCode: M~E dateStart: 20170101 isFulltext: true titleUrlDefault: https://road.issn.org providerName: ISSN International Centre |
| link | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV1LT9wwELYK5cClDx4CSisfKi5VRNax47jislrR9sDCit1K3Fa2Y0srQUC7S9le-ts7fuTRwoEeeomixHEkf9bMeDyfP4Q-CiV7kgudWEnThBaqTITSImFSpYVSJM0V9WIT_Py8uLoSo1iQufByAryqitVK3P1XqOEZgO2os_8Ad9MpPIB7AB2uADtcnwW8k1iu_L6Apz6ezaxxAvJu6X-6WjpS1Kehl42GoQ1qO3Ux5eX94o9M_ahxbr7eoz8Yuq2FWNF1476qs51NYD4JoI3NQ0sxGzgeiWyqJ03jCL46spbP3XtzM5u3M3XsSKEhq3v9U3ZTE8QXuQXmZJxMsdzdmzNCOUt6NPCha9vLO1Ps4mI0PuuTjjXNw6nu0THnQdvnsc2n7ngMcMSweuy1bq0pNoxv1tBLwplwZX_DX508nMgoBImBT-36Oo7tXbiibzrhSifumLxBr-KCAfcD0G_RC1Ntode1GAeOtnkbnTS441uLJa5x_4wj6jigjjuoY0AdO9R30Pcvp5PBtyRKYySScL5M8lKlpih7hhItMiuoFFobxlUG8Z-1mlFOrOapyXKqaK7KgnMjjBWC6LKQPNtF69VtZfYQzg0E0YqVJbOwuBZKWZ4qkwtGtbZE6X20BeMwvQuHn0zj6Oyjo3pcpjqeJu9ETa6ngenO2oa4aVj38VeTgyf_8A5ttnPqEK0v5_fmPdrQP5azxfyDB_E3z95gnA |
| linkProvider | ISSN International Centre |
| openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Adventure+of+a+Lifetime%3A+Extract+Method+Refactoring+for+Rust&rft.jtitle=Proceedings+of+ACM+on+programming+languages&rft.au=Thy%2C+Sewen&rft.au=Costea%2C+Andreea&rft.au=Gopinathan%2C+Kiran&rft.au=Sergey%2C+Ilya&rft.date=2023-10-16&rft.pub=ACM&rft.eissn=2475-1421&rft.volume=7&rft.issue=OOPSLA2&rft.spage=658&rft.epage=685&rft_id=info:doi/10.1145%2F3622821&rft.externalDocID=3622821 |
| thumbnail_l | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=2475-1421&client=summon |
| thumbnail_m | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=2475-1421&client=summon |
| thumbnail_s | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=2475-1421&client=summon |