!7 sbool isConceptRefValid(Concept src, Concept dest) { ret src != null && dest != null && src._concepts != null && src._concepts == dest._concepts; } sO conceptRefMutex(Concept c) { ret or(c._concepts, dummyMutex()); } concept Thing { Thing ref_ptr; // setter selfType ref(Thing dest) { synchronized(conceptRefMutex(this)) { if (ref_ptr == dest) ret; unindexConceptRef(this, ref_ptr); ref_ptr = thing; indexConceptRef(this, thing); } this; } // getter. we could get rid of this by making the field // publicly accessible, but then we run the slight chance // of setting it without the setter inadvertently. Thing ref() { ret ref_ptr; } } cprint {}