concept Str extends DefiniteThing { S name; new L otherNames; *() {} *(S *name) {} public S toString() { ret name; } } static Str concept(S name) { for (Str s : list(Str.class)) if (eqic(s.name, name) || containsIgnoreCase(s.otherNames, name)) ret s; ret new Str(name); } static void mergeStrs(Str a, Str b) { if (a == b) ret; if (nempty(b.backRefs)) { Str t = a; a = b; b = t; } a.otherNames.add(b.name); a.otherNames.addAll(b.otherNames); if (nempty(b.backRefs)) print("Warning: Deleting concept with back references - " + b.name); b.delete(); }