Invention Grant
US09542166B2 System and method for inferring immutability of program variables 有权
用于推断程序变量的不变性的系统和方法

System and method for inferring immutability of program variables
Abstract:
In accordance with various embodiments, systems and methods are provided which facilitate inferring immutability of variables. A compiler analyzes local variables within source code to determine whether they are immutable. In particular embodiments the compiler examines locations where each variable is assigned to determine whether the variable was definitely unassigned before the assignment. Because the compiler can infer whether a local variable is immutable, it is possible for the programmer to avoid using a keyword to expressly declare the local variable as immutable. Inferring immutability of variables, thus, maintains correctness of the compiled code while reducing the burden on the programmer.
Public/Granted literature
Information query
Patent Agency Ranking
0/0