A Grounded Conceptual Model for Ownership Types in Rust
Will Crichton, Gavin Gray, Shriram Krishnamurthi
Abstract
Programmers learning Rust struggle to understand ownership types, Rust's core mechanism for ensuring memory safety without garbage collection. This paper describes our attempt to systematically design a pedagogy for ownership types. First, we studied Rust developers' misconceptions of ownership to create the Ownership Inventory, a new instrument for measuring a person's knowledge of ownership. We found that Rust learners could not connect Rust's static and dynamic semantics, such as determining why an ill-typed program would (or would not) exhibit undefined behavior. Second, we created a conceptual model of Rust's semantics that explains borrow checking in terms of flow-sensitive permissions on paths into memory. Third, we implemented a Rust compiler plugin that visualizes programs under the model. Fourth, we integrated the permissions model and visualizations into a broader pedagogy of ownership by writing a new ownership chapter for The Rust Programming Language, a popular Rust textbook. Fifth, we evaluated an initial deployment of our pedagogy against the original version, using reader responses to the Ownership Inventory as a point of comparison. Thus far, the new pedagogy has improved learner scores on the Ownership Inventory by an average of 9% (𝑁 = 342, 𝑑 = 0.56).
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b40d08c2-14e2-4afc-9556-bbf39a4cf3a4Cited by top-tier papers8
- Identifying and Correcting Programming Language Behavior MisconceptionsKuang-Chen Lu, Shriram KrishnamurthiOOPSLA 2024 · 14 citations
- Clozemaster: Fuzzing Rust Compiler by Harnessing Llms for Infilling Masked Real ProgramsHongyan Gao, Yibiao Yang, Maolin Sun, Jiangchang Wu et al.ICSE 2025 · 6 citations
- Usability Barriers for Liquid TypesCatarina Gamboa, Abigail Reese, Alcides Fonseca, Jonathan AldrichPLDI 2025 · 4 citations
- Profiling Programming Language LearningWill Crichton, Shriram KrishnamurthiOOPSLA 2024 · 3 citations
- An Interactive Debugger for Rust Trait ErrorsGavin Gray, Will Crichton, Shriram KrishnamurthiPLDI 2025 · 1 citation
Builds on4
- Learning and Programming Challenges of Rust: A Mixed-Methods StudyShuofei Zhu, Ziyi Zhang, Boqin Qin, Aiping Xiong et al.ICSE 2022 · 27 citations
- How statically-typed functional programmers write codeJustin Lubin, Sarah E. ChasinsOOPSLA 2021 · 17 citations
- Applying cognitive principles to model-finding output: the positive value of negative informationTristan Dyer, Tim Nelson, Kathi Fisler, Shriram KrishnamurthiOOPSLA 2022 · 10 citations
- Garbage Collection Makes Rust Easier to Use: A Randomized Controlled Trial of the Bronze Garbage CollectorMichael Coblenz, Michelle L. Mazurek, Michael HicksICSE 2022 · 9 citations
Related papers
- Functional Ownership through Fractional UniquenessDanielle Marshall, Dominic OrchardOOPSLA 2024 · 6 citations
- Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder et al.OOPSLA 2023 · 32 citations
- Flux: Liquid Types for RustNico Lehmann, Adam T. Geller, Niki Vazou, Ranjit JhalaPLDI 2023 · 29 citations
- How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller et al.OOPSLA 2020 · 78 citations
- Stacked borrows: an aliasing model for RustRalf Jung, Hoang-Hai Dang, Jeehoon Kang, Derek DreyerPOPL 2020 · 67 citations
