System and method for inferring immutability of program variables
US9542166B2 · kind B2 · utility
Assignee
Inventors
Key dates
| Filing date | Nov 14, 2012 |
| Grant date | Jan 10, 2017 |
| Priority date | — |
| Expiry date | Nov 9, 2033 |
Classification
- Technology area (CPC G)Physics
- CPC primaryG06F11/3672
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
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.
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.