Invention Grant
US09542166B2 System and method for inferring immutability of program variables
有权
用于推断程序变量的不变性的系统和方法
- Patent Title: System and method for inferring immutability of program variables
- Patent Title (中): 用于推断程序变量的不变性的系统和方法
-
Application No.: US13677000Application Date: 2012-11-14
-
Publication No.: US09542166B2Publication Date: 2017-01-10
- Inventor: Brian Goetz , Alexander Buckley , Daniel Smith , Maurizio Cimadamore
- Applicant: Oracle International Corporation
- Applicant Address: US CA Redwood Shores
- Assignee: ORACLE INTERNATIONAL CORPORATION
- Current Assignee: ORACLE INTERNATIONAL CORPORATION
- Current Assignee Address: US CA Redwood Shores
- Agency: Tucker Ellis LLP
- Main IPC: G06F9/45
- IPC: G06F9/45 ; G06F11/36 ; G06F9/44

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
- US20140123118A1 SYSTEM AND METHOD FOR INFERRING IMMUTABILITY OF PROGRAM VARIABLES Public/Granted day:2014-05-01
Information query