A Grounded Conceptual Model for Ownership Types in Rust
Will Crichton, Gavin Gray, Shriram Krishnamurthi

TL;DR
This paper develops a conceptual model and pedagogical approach to teaching Rust's ownership types, improving learner understanding and bridging the gap between static and dynamic semantics.
Contribution
It introduces a new ownership conceptual model, a visualization tool, and an improved teaching chapter that enhances understanding of Rust's ownership semantics.
Findings
Learners' scores on the Ownership Inventory increased by 9%.
The pedagogy helped connect static and dynamic semantics of Rust.
The Ownership Inventory effectively measures ownership understanding.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
