Runtime predictive analyses enhance coverage of traditional dynamic analyses based bug detection techniques by identifying a space of feasible reorderings of the observed execution and determining if any of these witnesses the violation of some desired safety property. The most popular approach for modelling the space of feasible reorderings is through Mazurkiewicz's trace equivalence. The simplicity of the framework also gives rise to efficient predictive analyses, and has been the de facto means for obtaining space and time efficient algorithms for monitoring concurrent programs. In this work, we investigate how to enhance the predictive power of trace-based reasoning, while still retaining the algorithmic benefits it offers. Towards this, we extend trace theory by naturally embedding a class of prefixes, which we call strong trace prefixes. We formally characterize strong trace prefixes using an enhanced dependence relation, study its predictive power and establish a tight connection to the previously proposed notion of synchronization preserving correct reorderings developed in the context of data race and deadlock prediction. We then show that despite the enhanced predictive power, strong trace prefixes continue to enjoy the algorithmic benefits of Mazurkiewicz traces in the context of prediction against co-safety properties, and derive new algorithms for synchronization preserving data races and deadlocks with better asymptotic space and time usage. We also show that strong trace prefixes can capture more violations of pattern languages. We implement our proposed algorithms and our evaluation confirms the practical utility of reasoning based on strong prefix traces.
翻译:运行时预测性分析通过识别观测执行中可行的重排序空间,并判定是否存在违反期望安全属性的违规情况,来增强传统动态分析中基于缺陷检测技术的覆盖能力。对可行重排序空间建模最常用的方法是通过马祖尔凯维奇迹等价。该框架的简洁性还催生了高效的预测性分析,并已成为获取监控并发程序的空间与时间高效算法的事实标准。在本工作中,我们研究如何在保留迹推理算法优势的同时增强其预测能力。为此,我们通过自然嵌入一类称为强迹前缀的前缀来扩展迹理论。我们通过增强的依赖关系正式刻画了强迹前缀,研究了其预测能力,并与先前在数据竞争和死锁预测背景下提出的同步保持正确重排序概念建立了紧密联系。我们随后证明,尽管预测能力增强,强迹前缀在针对共安全属性的预测中仍能保留马祖尔凯维奇迹的算法优势,并推导出用于同步保持数据竞争和死锁的新算法,其渐近时空开销更优。我们还展示了强迹前缀能够捕获更多模式语言的违规情况。我们实现了所提出的算法,评估结果证实了基于强迹前缀推理的实际效用。