arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.02409cs.PL
收藏

大规模隐私尊重型类型错误遥测

Privacy-Respecting Type Error Telemetry at Scale

Ben Greenman, Alan Jeffrey, Shriram Krishnamurthi, Mitesh Shah

AI总结:

本文为 Luau 设计并部署假名化随机采样的类型错误遥测,基于 150 万余条记录分析渐进类型使用与类型分析表现。

摘要:

背景:Roblox Studio 让数百万创作者能够使用一种名为 Luau 的 Lua 变体进行编程,以构建交互式体验。创作者构成广泛群体,从编写第一个脚本的新手到专业开发者均有;因此,Luau 必须支持广泛的受众。作为支持各类程序员努力的一部分,Luau 包含一个可选的渐进类型系统,并竭尽全力减少误报错误。\n探究:由于 Luau 目前正被许多创作者使用,我们希望收集数据以改进该语言,尤其是类型系统。收集数据的标准方法是部署客户端遥测;然而,我们不能抓取个人数据或专有信息,这意味着不能收集源代码片段、错误消息,甚至文件路径。因此,研究问题围绕如何开展非侵入式遥测,并从中获得关于类型错误的洞见。\n方法:我们为 Luau 设计并实现了一个假名化、随机采样的遥测系统。遥测记录包括时间戳、会话 id、发送原因,以及最近类型分析的数值摘要。这些信息使我们能够随时间研究类型错误,同时不泄露私有数据。我们于 2023 年春季在 Roblox Studio 中部署了该系统,并从超过 340,000 个会话中收集了超过 150 万条遥测记录。\n认识:我们提出若干关于 Luau 的发现,所有发现都表明遥测是研究类型错误语用问题的有效方式。其中一个不太令人意外的发现是,可选启用的渐进类型并不流行:无类型 Luau 会话数量与有类型会话数量之间存在 100 倍差距。一个令人惊讶的发现是,类型分析的 strict 模式在处理与数据资产的交互时过于保守。一个令人安心的发现是,类型分析很少触及问题规模方面的内部限制。\n依据:我们的发现得到包含超过 150 万条遥测记录的数据集支持。用于分析这些数据的数据和脚本可在一个工件中获取。\n重要性:除了对 Luau 的直接收益外,我们关于类型和类型错误的发现还对 TypeScript、Elixir 和 Typed Racket 等其他渐进式语言的采用与人机工程学具有启示。我们的遥测设计具有广泛意义,因为它能够在不泄露敏感信息的情况下报告类型错误。

英文摘要:

Context: Roblox Studio lets millions of creators build interactive experiences by programming in a variant of Lua called Luau. The creators form a broad group, ranging from novices writing their first script to professional developers; thus, Luau must support a wide audience. As part of its efforts to support all kinds of programmers, Luau includes an optional, gradual type system and goes to great lengths to minimize false positive errors. Inquiry: Since Luau is currently being used by many creators, we want to collect data to improve the language and, in particular, the type system. The standard way to collect data is to deploy client-side telemetry; however, we cannot scrape personal data or proprietary information, which means we cannot collect source code fragments, error messages, or even filepaths. The research questions are thus about how to conduct telemetry that is not invasive and obtain insights from it about type errors. Approach: We designed and implemented a pseudonymized, randomly-sampling telemetry system for Luau. Telemetry records include a timestamp, a session id, a reason for sending, and a numeric summary of the most recent type analyses. This information lets us study type errors over time without revealing private data. We deployed the system in Roblox Studio during Spring 2023 and collected over 1.5 million telemetry records from over 340,000 sessions. Knowledge: We present several findings about Luau, all of which suggest that telemetry is an effective way to study type error pragmatics. One of the less-surprising findings is that opt-in gradual types are unpopular: there is an 100x gap between the number of untyped Luau sessions and the number of typed ones. One surprise is that the strict mode for type analysis is overly conservative about interactions with data assets. A reassuring finding is that type analysis rarely hits its internal limits on problem size. Grounding: Our findings are supported by a dataset of over 1.5 million telemetry records. The data and scripts for analyzing it are available in an artifact. Importance: Beyond the immediate benefits to Luau, our findings about types and type errors have implications for adoption and ergonomics in other gradual languages such as TypeScript, Elixir, and Typed Racket. Our telemetry design is of broad interest, as it reports on type errors without revealing sensitive information.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑