一句话:提出无监督工具 SherLock,通过冲突操作附近的线性系统与延迟注入,在 8 个 C# 应用中推断出 122 个同步且误报少。
并发软件中同步操作种类繁多,仅靠代码分析通常只能推断特定类型,人工标注又难以扩展。SherLock 提出无监督推断方法:观察到大多数同步出现在冲突操作附近,于是将同步属性与假设组织成线性系统,并通过基于反馈的延迟注入在少量单元测试运行中收集足够观测,从而推断同步操作。作者在 8 个 C# 开源应用上评估,无需先验知识即推断出 122 个独特同步,误报很少,且覆盖锁、fork-join、异步、框架同步与自定义同步等多种类型。
Synchronizations are fundamental to the correctness and performance of concurrent software. Unfortunately, correctly identifying all synchronizations has become extremely difficult in modern soft-ware systems due to the various types of synchronizations. Previous work either only infers specific type of synchronization by code analysis or relies on manual effort to annotate the synchronization. This paper proposes SherLock, a tool that uses unsupervised inference to identify synchronizations. SherLock leverages the fact that most synchronizations appear around the conflicting operations and form it into a linear system with a set of synchronization proper-ties and hypotheses. To collect enough observations, SherLock runs the unit tests a small number of times with feedback-based delay injection. We applied SherLock on 8 C# open-source applications. Without any prior knowledge, SherLock inferred 122 unique synchronizations, with few false positives. These inferred synchronizations cover a wide variety of types, including lock operations, fork-join operations, asynchronous operations, framework synchronization, and custom synchronization.
DOI 原文 ·
@inproceedings{paperbot6116,
title = {SherLock: unsupervised synchronization-operation inference},
author = {Guangpu Li and Dongjie Chen and Shan Lu and Madanlal Musuvathi and Suman Nath},
booktitle = {ASPLOS},
year = {2021},
doi = {10.1145/3445814.3446754}
}