I am looking for references and papers on the following topic.
In general, some programming languages allow dynamic changes to classes. As an example, a new instance variable ‘weight’ can be added to the class
Edge
(the class of unweighted edges of graphs). But what should happen with existing edge objects?They can be upgraded to include the new instance variable with a default value, perhaps weight
0
, in the edge example. Or existing objects stay the same.In context-oriented programming, similar situations can arise, when a context is dynamically activated at run-time. This may affect changes to methods which are currently executed (although I am concerned at the single thread execution at the moment).
Considering design patterns, when a proxy object wraps another object, references to the old object may expect certain invariants that the proxy object doesn’t adhere to. This may also lead to inconsistencies when an object is wrapped/’updated’ with a proxy object.
Are there any references that list possible ways to treat the problem in case of dynamic changes/activation? Like the options to keep the state consistent?
I looked primarily in the communities of dynamic software evolution, context-oriented programming and software components. Are there other important communities I can search to find references?