On Tuesday, October 08, 2013 09:56:26 AM Claude Warren wrote: > So just to be clear. > > If a Statment S has the conditions: > S.getModel() = M > M.contains(S) = F > > and we call > S2 = S.changeLiteralObject( o2 ); > > we expect: > > S2.getModel() = M > M.contains(S2) = T
Yes. > So changing the object of a statement has the side effect It's not really a side effect. It's the effect. That's what changeObject is for. > of putting the > new statement in the model even if the original statement was not in the > model. Yes. The motivating activity for changeObject is "change the object of some statement S from model M". "Changing the object" is done by removing the old statement and adding the new one. That this works even when S wasn't in M (but just has it as its target model) is a happy accident. Chris -- RIP Diana Wynne Jones, 1934 - 2011. Epimorphics Ltd, http://www.epimorphics.com Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Epimorphics Ltd. is a limited company registered in England (number 7016688)