Currently, the identifiers produced by Desmoscript are far too verbose for what they're worth. Below is an algorithm designed to alleviate this problem:
Iterate through every identifier. Create a chain (which I will call the "scope chain") containing the identifier name, all human-readable names of the identifiers' scope names, and finally the file name.
By default, any given identifier will use its own name and nothing more.
To resolve ambiguity, scope names will be concatenated as needed.
If--- after adding all possible scope names--- a variable name is still ambiguous, a numerical suffix will be added until a suitable one is found.
These data could be stored in a top-level map, corresponding to the ID of the root expression representing the identifier.
Currently, the identifiers produced by Desmoscript are far too verbose for what they're worth. Below is an algorithm designed to alleviate this problem: