Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

alias analysis vs. pointer analysis vs. points-to analysis

Currently I am reading a lot about static code analysis. There are several terms that confuses me because I can't really tell what the difference is.

  • alias analysis
  • pointer analysis
  • points-to analysis

What is the difference (if any) between them?

like image 646
Fee Avatar asked Sep 17 '25 17:09

Fee


1 Answers

Pointer analysis or points-to analysis is a static program analysis that determines information on the values of pointer variables or expressions.

Although the literature is not entirely consistent on terminology, pointer analysis is a near-synonym of alias analysis. Whereas, however, pointer/points-to analysis typically tries to model heap objects and asks “what objects can a variable point to?”, alias analysis algorithms focus on the question of “can a pair of variables/expressions point to the same object (aliases) ?”

like image 122
eternalStudent Avatar answered Sep 21 '25 05:09

eternalStudent