RustViz: Interactively Visualizing Ownership and Borrowing

Marcelo Almeida, Grant Cole, Ke Du, Gongming Luo, Shulin Pan, Yu Pan, Kai Qiu, Vishnu Reddy, Haochen Zhang, Yingying Zhu, Cyrus Omar
{"title":"RustViz: Interactively Visualizing Ownership and Borrowing","authors":"Marcelo Almeida, Grant Cole, Ke Du, Gongming Luo, Shulin Pan, Yu Pan, Kai Qiu, Vishnu Reddy, Haochen Zhang, Yingying Zhu, Cyrus Omar","doi":"10.1109/vl/hcc53370.2022.9833121","DOIUrl":null,"url":null,"abstract":"—Rust is an industrial systems programming language unique in achieving memory safety without the need for a garbage collector. Instead, Rust relies on a unique and sometimes subtle resource ownership and borrowing system. This system can make learning Rust a challenge, even for experienced pro- grammers. Motivated by these challenges, we introduce RustViz, a tool that allows an instructor to generate custom interactive timelines depicting ownership and borrowing events alongside Rust code examples embedded within learning material. These visualizations makes visible the static events, and subsequent state changes, that a Rust programmer must otherwise track entirely mentally. We have used RustViz to build a week-long Rust unit in a large undergraduate programming languages course. We demonstrate that this learning material, and the RustViz visualizations in particular, were valuable to students and led to the development of an accurate mental model of the essentials of ownership and borrowing in Rust.","PeriodicalId":351709,"journal":{"name":"2022 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)","volume":"88 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-09-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/vl/hcc53370.2022.9833121","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

—Rust is an industrial systems programming language unique in achieving memory safety without the need for a garbage collector. Instead, Rust relies on a unique and sometimes subtle resource ownership and borrowing system. This system can make learning Rust a challenge, even for experienced pro- grammers. Motivated by these challenges, we introduce RustViz, a tool that allows an instructor to generate custom interactive timelines depicting ownership and borrowing events alongside Rust code examples embedded within learning material. These visualizations makes visible the static events, and subsequent state changes, that a Rust programmer must otherwise track entirely mentally. We have used RustViz to build a week-long Rust unit in a large undergraduate programming languages course. We demonstrate that this learning material, and the RustViz visualizations in particular, were valuable to students and led to the development of an accurate mental model of the essentials of ownership and borrowing in Rust.
RustViz:交互式可视化所有权和借用
rust是一种工业系统编程语言,在不需要垃圾收集器的情况下实现内存安全。相反,Rust依赖于一个独特的、有时是微妙的资源所有权和借用系统。这个系统可以使学习Rust成为一个挑战,即使对经验丰富的程序员也是如此。在这些挑战的激励下,我们介绍了RustViz,这是一个工具,它允许教师生成自定义的交互式时间表,描述所有权和借用事件,以及嵌入在学习材料中的Rust代码示例。这些可视化使静态事件和随后的状态变化变得可见,否则Rust程序员必须完全在精神上跟踪这些事件。我们已经使用RustViz在一个大型本科编程语言课程中构建了一个为期一周的Rust单元。我们证明了这些学习材料,特别是RustViz的可视化,对学生来说是有价值的,并导致了Rust中所有权和借用要素的准确心理模型的发展。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信