Steensgaard's algorithm

In computer science, Steensgaard's algorithm is a scalable, flow-insensitive, algorithm for pointer analysis. It is often used in compilers, due to its speed (for example, an implementation is available in the LLVM compiler framework).{{Cite web |title=LLVM Alias Analysis Infrastructure — LLVM 8 documentation |url=https://releases.llvm.org/8.0.0/docs/AliasAnalysis.html#the-steens-aa-pass |access-date=2022-04-22 |website=releases.llvm.org}} In its original formulation, this algorithm was field-, context-, and array-insensitive.

Steensgaard's algorithm is based on equality constraints,{{harv|Smaragdakis|Balatsouras|2015|p=14}} as opposed to Andersen's algorithm, which is based on subset constraints. This allows points-to information to be tracked using a union-find data structure. This choice gives the algorithm its characteristic speed; when implemented using a union-find data structure it is linear space and almost linear time in the size of the input program.

Bjarne Steensgaard's formulation of the algorithm was in terms of type inference and type checking. Steensgaard proposed the points-to analysis for a small imperative but generic pointer language which captures the essential properties of other common languages with pointers, like C. The language semantics and typing rules constitute the analysis.

References

{{Reflist}}

  • {{cite conference

| url =https://www.cs.cornell.edu/courses/cs711/2005fa/papers/steensgaard-popl96.pdf

| title =Points-to analysis in almost linear time

| last = Steensgaard | first = Bjarne

| year =1996

| book-title =POPL '96: Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages

| pages =32–41

| doi = 10.1145/237721.237727

| isbn =0-89791-769-3

| location = New York, NY, USA

| publisher =ACM

}}

  • {{cite journal

|last1=Smaragdakis

|first1=Yannis

|last2=Balatsouras

|first2=George

|date=2015

|title=Pointer Analysis

|url=https://yanniss.github.io/points-to-tutorial15.pdf

|journal=Foundations and Trends in Programming Languages

|volume=2

|issue=1

|pages=1–69

|access-date=May 30, 2019

|doi=10.1561/2500000014

}}

Category:Static program analysis

{{algorithm-stub}}