首页> 外文OA文献 >Call path sensitive interprocedural alias analysis of C programs
【2h】

Call path sensitive interprocedural alias analysis of C programs

机译:C程序的调用路径敏感的过程间别名分析

摘要

This work presents a new approach to detect may-aliases within ANSI-C programs. A may-alias occurs if two variables (or more complex expressions) use the same memory location. Aliases may be created by call-by-reference function calls or by pointer usage. In the context of C programs alias analysis becomes very complex because of the extensive pointer usage and the very few restrictions concerning pointer manipulations. Within this work it is described how the effects of a program can be summarised by so-called function interface graphs which are a static representation of the memory locations and the values stored at these locations. Based on standard techniques (function call and return statement normalisation, control flow graphs, static single assignment form), the intraprocedural step creates a function interface graph for each function individually by computing and merging the information for all its basic blocks according to the CFG structure. Afterwards these graphs will be reduced to their externally visible effects. This reduces the size of these graphs and will hence allow the following computations to be carried out more efficiently. Within the next step the reduced graphs will be merged according to the corresponding functions and their calls (interprocedural analysis). This is done by ignoring indirect function calls (through function pointers) first, and processing these calls only if a function that could be called by one of these calls is detected. In case functions are called by more than a single function call, the calling context will be taken into account as far as possible. A major benefit of our algorithm is that it can be applied to real ANSI-C programs since it makes only a few restrictions, i.e. effects of assembler code, interrupts, volatile attributes and I/O-based aliases. It deals with structures and unions, arbitrary pointer usage, type casts and function pointers. Under these circumstances, the algorithm cannot benefit from type information and, hence, the function interface graphs are based on a low-level memory representation. The algorithm was implemented using the SUIF compiler, and it has been successfully applied to a set of non-toy C programs.
机译:这项工作提出了一种检测ANSI-C程序中的别名的新方法。如果两个变量(或更复杂的表达式)使用相同的内存位置,则可能会出现别名。别名可以通过按引用调用函数或通过使用指针来创建。在C程序的上下文中,别名分析变得非常复杂,这是因为广泛使用了指针,并且很少涉及指针操作的限制。在这项工作中,描述了如何通过所谓的功能接口图来概括程序的效果,这些功能图是存储位置和在这些位置存储的值的静态表示。基于标准技术(函数调用和返回语句规范化,控制流程图,静态单一分配形式),过程内步骤通过根据CFG结构计算并合并其所有基本块的信息,分别为每个函数创建函数接口图。之后,这些图将减少到其外部可见效果。这减小了这些图的大小,因此将允许更有效地执行以下计算。在下一步中,将根据相应的功能及其调用合并归约图(过程间分析)。这是通过首先忽略间接函数调用(通过函数指针)来完成的,并且仅在检测到可以被这些调用之一调用的函数时才处理这些调用。如果函数被多个函数调用而不是单个函数调用,则将尽可能考虑调用上下文。我们的算法的主要优点是它可以应用于真正的ANSI-C程序,因为它仅具有一些限制,即汇编代码,中断,易失属性和基于I / O的别名的影响。它处理结构和联合,任意指针用法,类型转换和函数指针。在这些情况下,该算法无法从类型信息中受益,因此,功能接口图基于低级存储器表示。该算法是使用SUIF编译器实现的,已成功应用于一组非玩具C程序。

著录项

  • 作者

    Schmidt Dirk;

  • 作者单位
  • 年度 2006
  • 总页数
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号