Lock Inference in the Presence of Large Libraries

Lock Inference in the Presence of Large Libraries
复制标题

存在大型库时的锁定推理

DOI:
--
复制
发表时间:
2012
期刊:
European Conference on Object-Oriented Programming
影响因子:
--
通讯作者:
S. Eisenbach
S. Eisenbach
中科院分区:
--
文献类型:
--
作者:
Khilan Gudka;T. Harris;S. Eisenbach

文献摘要

被引文献

相似文献

原子部分可以使用锁推断来实现。为了使锁推理实用,分析大型库是至关重要的。然而,由于它们的圈复杂性,库对于静态分析是具有挑战性的。 现有的方法要么忽略库,要么要求库实现者注释要采取的锁,要么只考虑在库调用链中执行到一个级别的访问。因此,一些库访问可能不受保护,导致原子性违反,原子部分应该消除。 我们提出了一个锁推理的Java方法,充分分析库方法。我们实现这一点,通过(i)制定锁推理作为一个跨过程的分布式环境下的问题,(ii)使用图形表示的摘要信息和(iii)应用一些优化我们的实现,以减少时空需求和锁推断。我们证明了我们的方法的可扩展性,通过分析整个GNU类路径库,包括122Kbps。
Atomic sections can be implemented using lock inference. For lock inference to be practically useful, it is crucial that large libraries be analysed. However, libraries are challenging for static analysis, due to their cyclomatic complexity. Existing approaches either ignore libraries, require library implementers to annotate which locks to take or only consider accesses performed upto one level deep in library call chains. Thus, some library accesses may go unprotected, leading to atomicity violations that atomic sections are supposed to eliminate. We present a lock inference approach for Java that analyses library methods in full. We achieve this by (i) formulating lock inference as an Interprocedural Distributive Environment dataflow problem, (ii) using a graph representation for summary information and (iii) applying a number of optimisations to our implementation to reduce space-time requirements and locks inferred. We demonstrate the scalability of our approach by analysing the entire GNU Classpath library comprising 122KLOC.