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.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 30 · Forward citations: 0.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method for compiling source code using a compiler operating on one or more microprocessor, the method comprising: receiving said source code wherein said source code includes a plurality of local variables wherein each of said plurality of local variables is expressed in said source code without the use of a keyword which expressly declares said each of said plurality of local variables as being immutable; identifying with the compiler each of said plurality of local variables in said source code; for each local variable of the plurality of said plurality of local variab
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (30)
Non-Patent Literature (5)
- Clark, Mike, "Using Blocks in iOS 4: The Basics" retrieved Nov. 15, 2013 , 6 pages.
- Clark, Mike, "Using Blocks in iOS 4: The Basics" retrieved Nov. 15, 2013 <http://pragmaticstudio.com/blog/2010/7/28/ios4-blocks-1>, 6 pages.
- Diehl, Stephan, "A Formal Introduction to the Compilation of Java", Software-Practice and Experience, vol. 28(3), 297-327(Mar. 1998).
- European Patent Office, International Searching Authority, International Search Report and Written Opinion dated Jan. 12, 2016 for International Application No. PCT/US2015/052060, 14 pages.
- Goetz, Brian et al., Featherweight Defenders: A formal model for virtual extension methods in Java, Oracle Corporation Dec. 2, 2011, 9 pages, retrieved Apr. 2, 2015 from: .