跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 软件工程

arXiv:1808.02998 (cs)
[提交于 2018年8月10日]

标题:Safe Stream-Based Programming with Refinement Types

作者:Benno Stein, Lazaro Clapp, Manu Sridharan, Bor-Yuh Evan Chang
查看论文《Safe Stream-Based Programming with Refinement Types》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:In stream-based programming, data sources are abstracted as a stream of values that can be manipulated via callback functions. Stream-based programming is exploding in popularity, as it provides a powerful and expressive paradigm for handling asynchronous data sources in interactive software. However, high-level stream abstractions can also make it difficult for developers to reason about control- and data-flow relationships in their programs. This is particularly impactful when asynchronous stream-based code interacts with thread-limited features such as UI frameworks that restrict UI access to a single thread, since the threading behavior of streaming constructs is often non-intuitive and insufficiently documented. In this paper, we present a type-based approach that can statically prove the thread-safety of UI accesses in stream-based software. Our key insight is that the fluent APIs of stream-processing frameworks enable the tracking of threads via type-refinement, making it possible to reason automatically about what thread a piece of code runs on -- a difficult problem in general. We implement the system as an annotation-based Java typechecker for Android programs built upon the popular ReactiveX framework and evaluate its efficacy by annotating and analyzing 8 open-source apps, where we find 33 instances of unsafe UI access while incurring an annotation burden of only one annotation per 186 source lines of code. We also report on our experience applying the typechecker to two much larger apps from the Uber Technologies Inc. codebase, where it currently runs on every code change and blocks changes that introduce potential threading bugs.
主题: 软件工程 (cs.SE); 程序设计语言 (cs.PL)
引用方式: arXiv:1808.02998 [cs.SE]
  (或者 arXiv:1808.02998v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.1808.02998
期刊参考: Proceedings of the 2018 33rd ACM/IEEE International Conference on Automated Software Engineering
相关 DOI: https://doi.org/10.1145/3238147.3238174

提交历史

来自:Benno Stein
[v1] 2018年8月10日 星期五 00:00:00 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.SE
< 上一篇   |   下一篇 >
最新 | 近期 | 2018-08
切换浏览方式为:
cs
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站