System and method for inferring immutability of program variables
AssigneeOracle International Corporation
InventorsBrian Goetz, Alexander Buckley, Daniel Smith, Maurizio Cimadamore
Life of this patent
Estimating the term…
Loading patent…
AssigneeOracle International Corporation
InventorsBrian Goetz, Alexander Buckley, Daniel Smith, Maurizio Cimadamore
Estimating the term…
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.
A computer-implemented method for compiling source code using a compiler operating on one or more microprocessor, the method comprising:
A non-transitory computer readable storage medium including instructions stored thereon for compiling source code, which instructions, when executed by a computer, cause the computer to perform steps comprising:
A system for compiling source code, the system comprising:
Dependencies are inferred from the claim text.