Closed jacosro closed 3 years ago
I'm not sure whether new types are needed or not. Types as classes would be useful to unify both formal and actual types, but that can be done after-the-fact. The main difficulty here is locating global variable usage and definitions.
In Java, only static elements can be "global variables", as all others will be accessed via this
, a parameter or a static field.
This issue can be split into static fields (see #46) and class fields (already supported in 1.3.0).
Static attributes of each class are represented as global variables. This means that each method declaration will have a
global_formal_in
andglobal_formal_out
parameter for each one of the global variables of the program (static attributes of every class). Consequently, every method call will also haveglobal_actual_in
andglobal_actual_out
nodes for each global variable.Four new
NodeType
s must be added:GLOBAL_FORMAL_IN
,GLOBAL_FORMAL_OUT
,GLOBAL_ACTUAL_IN
,GLOBAL_ACTUAL_OUT
, in order to be able to distinguish them from normal parameters.@cargaji What do you think?