LatticeHashForest:一种用于重复数据和操作的高效数据结构
LatticeHashForest: An Efficient Data Structure for Repetitive Data and Operations
AI总结:
提出LatticeHashForest数据结构,通过多级去重和高效操作消除全程序分析中的冗余计算与重复数据,在指针分析中实现内存近乎为零且速度提升超4倍。
摘要:
将整个程序作为单一单元进行分析,即全程序分析,涉及通过程序的控制流传播大量信息。这对于指针分析尤其如此,除非在分析精度上做出重大妥协,否则信息会出现组合爆炸。我们在实现这一目标的过程中观察到的关键问题之一是,大量重复数据被传播,并且许多底层数据结构操作被重复执行了极多次。\n我们提出了一种我们认为新颖且通用的数据结构,LatticeHashForest(LHF),用于存储和处理此类数据,其方式在类似于编译器和程序优化中遇到的场景下,消除了大部分冗余计算和重复数据。LHF与这一方向上的类似工作(如哈希共享、ZDD和BDD)不同之处在于,它不仅提供了一种高效操作大型聚合结构的方法,而且还以能够立即去重的方式修改此类结构的元素。LHF还提供了一种嵌套构建元素的方法,使得它们可以在多个层级进行去重,从而减少额外嵌套计算的需求。\n我们提供了详细的结构描述以及该数据结构的抽象模型。LHF的完整C++实现作为工件提供,并附有使用示例和基准程序对LHF进行的评估。我们还提供了API文档和用户手册,以便用户独立应用LHF。我们在指针分析领域的主要用例显示,与其他实现相比,内存使用量减少到几乎可忽略的极小比例,并且在输入规模接近1000万时,速度提升超过4倍。
英文摘要:
Analysis of entire programs as a single unit, or whole-program analysis, involves propagation of large amounts of information through the control flow of the program. This is especially true for pointer analysis, where, unless significant compromises are made in the precision of the analysis, there is a combinatorial blowup of information. One of the key problems we observed in our own efforts to this end is that a lot of duplicate data was being propagated, and many low-level data structure operations were repeated a large number of times. We present what we consider to be a novel and generic data structure, LatticeHashForest (LHF), to store and operate on such data in a manner that eliminates a majority of redundant computations and duplicate data in scenarios similar to those encountered in compilers and program optimization. LHF differs from similar work in this vein, such as hash-consing, ZDDs, and BDDs, by not only providing a way to efficiently operate on large, aggregate structures, but also modifying the elements of such structures in a manner that they can be deduplicated immediately. LHF also provides a way to perform a nested construction of elements such that they can be deduplicated at multiple levels, cutting down the need for additional, nested computations. We provide a detailed structural description, along with an abstract model of this data structure. An entire C++ implementation of LHF is provided as an artifact along with evaluations of LHF using examples and benchmark programs. We also supply API documentation and a user manual for users to make independent applications of LHF. Our main use case in the realm of pointer analysis shows memory usage reduction to an almost negligible fraction, and speedups beyond 4x for input sizes approaching 10 million when compared to other implementations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。