Dynamic Objects

version 8/140515 by Jesse McGrew

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter: The "cloning a new object from" activity
    The cloning process is implemented as an activity called "cloning a new object from". We can write "before cloning a new object from" rules to intervene before the object is cloned, and in those rules we can refer to "preserving relations" as a truth state which is true if the process is going to preserve object relationships.
    We can also write "after cloning a new object from" rules to intervene after the object is cloned, and in those we can also refer to the clone as "the new object":
        A thing has a number called the clone generation.
        
        After cloning a new object from something:
            increase the clone generation of the new object by 1.
    In this example, we change the behavior of "preserving relations" so that when the original object relates to itself, the clone also relates to itself (and not to the original object):
        Love relates various people to various people. The verb to love (he loves, they love, he is loving, he is loved) implies the love relation.
        
        After cloning a new object from a person (called the original):
            if preserving relations is true and the original loves the original:
                now the new object does not love the original;
                now the original does not love the new object;
                now the new object loves the new object.