“…A key barrier to sound typestate analyses is the need to reason about aliasing. Consider the classic example [137,325,287,129,138,302,320,275,324,318,6,243,80,184,10,75,328,101,102] of a File object, whose typestate is specified in fig. 3.1, and the following program in a Java-like imperative language: File f = new File(...); f.open(); File g = f; // f and g are aliases after this line is executed g.close(); f.read(); // an error occurs when this line is executed On line 3, the shared object-which both aliases f and g refer to-is in the open typestate.…”