gensym/2 — generates families of unique symbolsr
Prefix is a symbol (either an interned or uninterned atom), then
Symbol is a new UIA which has not previously existed in the system and which involves
Prefix as a subsymbol. . The string also involves the system time that the current ALS Prolog image was started, together with the value of a counter for these generated symbols. Consequently, the symbols are almost guaranteed to be unique across invokations of the system, execpt for the possibility of the system clock wrapping around.
?- gensym('<Prefix>', Symbol). Symbol='?<Prefix>_1540251652_0' yes. ?- gensym(airplane, X). X=?airplane_1540251652_1 yes.