Next: , Previous: Instance References, Up: Connections


10.2 Aliases

Connections between instance references create aliases. Before making any connections, all instances in the same scope constitute a hierarchy of referenceable objects. As connections (aliases) are made, these object unify, i.e., after ‘a = b’, both ‘a’ and ‘b’ refer to the same object. Aliasing hierarchical references also unifies them into the same object, e.g. ‘a.x = b.y’ result in one object, until further aliased. (The number of unique objects shrinks as connections are made.) Aliasing is sticky; once a connection has been made, there is no way to disconnect or undo the connection.

Publicly accessible references (allowing hierarchical access to public ports of structures) in any given scope are represented by the set of all legal names. The size of the names set doesn't change with connections, only the number of unique objects that are eventually created.

If the types are user-defined, then aliasing is recursive. For example, if the type of ‘a’ and ‘b’ has members (either public or private) ‘x’ and ‘y’ internally aliased, the ‘a.x’, ‘a.y’, ‘b.x’, and ‘b,y’ are all valid references to the same instance of ‘x’ and ‘y’'s type. (Implementation: This can simply be accomplished by mapping ‘a’ and ‘b’ to the same instance, saving the trouble of recursive aliasing, and generating the combinations of names, not that that is ever a problem.)

Since connections and aliases are unrolled, the actual unique instance objects are not created until all connections have been processed.

Compiler options (proposed to support):