@c "chapters/connections.texi"
@c $Id: connections.texi,v 1.1 2007/08/20 00:02:46 fang Exp $

@node Connections
@chapter Connections
@cindex connections

Connections are a relation between @emph{instance references}.  
(Connections are established in the meta-language processing 
of compilation; they are determined at compile-time only.)

Instance references refer to specific entities at unroll-time.  
Instance references fall into two categories: implicit and explicit.  
@xref{Arrays}.  

What does @samp{a = b} mean in the namespace or definition context?

@itemize
@item Parameters: the value of b is assigned to a.
	This is only valid if @samp{b} is instantiated and initialized, 
	and @samp{a} is instantiated and uninitialized.  
@item Datatypes (both built-in and user-defined), channels and processes:
	@samp{a} and @samp{b} refer to the same instance, in other words, 
	they are @emph{aliases}.
@end itemize

If the types are user-defined, then aliasing is recursive.  
For example, if the type of @samp{a} and @samp{b} has 
members (either public or private) @samp{x} and @samp{y} internally aliased, 
the @samp{a.x}, @samp{a.y}, @samp{b.x}, and @samp{b,y} are all 
valid references to the same instance of @samp{x} and @samp{y}'s type.  
(Implementation:
This can simply be accomplished by mapping @samp{a} and @samp{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 instance objects 
are not created until all connections have been processed.  

Compiler options (proposed to support):
@itemize
@item @option{-Wprocess-alias}:
	warning for connections between process
	(since the semantics seem arbitrary at this point and 
	are prone to future change), 
@item @option{-Wchannel-connections}: 
	warning for suspicious wrong connections with channels
	(multiple senders or multiple receivers)
@end itemize

Support for non-alias connections?

