系统工程与电子技术
繫統工程與電子技術
계통공정여전자기술
SYSTEMS ENGINEERING AND ELECTRONICS
2010年
3期
614-619
,共6页
王甜甜%马培军%苏小红%郭全萍
王甜甜%馬培軍%囌小紅%郭全萍
왕첨첨%마배군%소소홍%곽전평
系统依赖图%指针别名%流敏感%上下文敏感
繫統依賴圖%指針彆名%流敏感%上下文敏感
계통의뢰도%지침별명%류민감%상하문민감
system dependence graph%pointer alias%flow-sensitive%context-sensitive
针对目前指针分析算法的程序中间表示形式不能充分表示程序的语法结构与语义,因而不适合应用于源代码-源代码级别的程序转换与分析的问题,提出了一种基于系统依赖图的过程间指针别名分析算法.改进了指针别名信息的表示方法,精确描述数组元素和指针数组元素的别名.以系统依赖图作为程序的中间表示形式,在每个过程调用节点,根据是否为递归调用,分别采用改进的Banning算法和函数内联的方法处理因参数传递引起的别名信息.实验结果表明,该方法的准确性高于Wilson算法和Emami算法,且指针分析结果可直接应用于源代码级别的程序分析与转换中.
針對目前指針分析算法的程序中間錶示形式不能充分錶示程序的語法結構與語義,因而不適閤應用于源代碼-源代碼級彆的程序轉換與分析的問題,提齣瞭一種基于繫統依賴圖的過程間指針彆名分析算法.改進瞭指針彆名信息的錶示方法,精確描述數組元素和指針數組元素的彆名.以繫統依賴圖作為程序的中間錶示形式,在每箇過程調用節點,根據是否為遞歸調用,分彆採用改進的Banning算法和函數內聯的方法處理因參數傳遞引起的彆名信息.實驗結果錶明,該方法的準確性高于Wilson算法和Emami算法,且指針分析結果可直接應用于源代碼級彆的程序分析與轉換中.
침대목전지침분석산법적정서중간표시형식불능충분표시정서적어법결구여어의,인이불괄합응용우원대마-원대마급별적정서전환여분석적문제,제출료일충기우계통의뢰도적과정간지침별명분석산법.개진료지침별명신식적표시방법,정학묘술수조원소화지침수조원소적별명.이계통의뢰도작위정서적중간표시형식,재매개과정조용절점,근거시부위체귀조용,분별채용개진적Banning산법화함수내련적방법처리인삼수전체인기적별명신식.실험결과표명,해방법적준학성고우Wilson산법화Emami산법,차지침분석결과가직접응용우원대마급별적정서분석여전환중.
Existing pointer analysis algorithms usually adopt a lower-level intermediate representation which can not sufficiently represent the syntactical structure and semanteme of programs, which makes them difficult apply to source-to-source program transformation or analysis. To solve this problem, a flow-sensitive and context-sensitive pointer analysis algorithm based on system dependence graph is presented. An improved representation of alias information is proposed to describe the subscript details of elements in arrays, especially in pointer arrays. Then an iterative alias analysis for each procedure is performed on the system dependence graph of the program. An improved Banning algorithm or an inlining method is used to analyze the alias information respectively at each calling node according to a rule whether it's an iterative call. Test results show that the precision of this approach is higher than those of Wilson's and Emami's approaches. The pointer analyzing results can be directly applied to source-to-source program transformation and analysis.