func NewRecv(u Name, P Process) *Recv {
	return &Recv{Chan: u, Cont: P}
}
NewRecv creates a new Recv with given channel.
package asyncpi
import (
	"bytes"
	"fmt"
	"sort"
)
type Name interface {
	Ident() string
	String() string
}
type names []Name
func (n names) Less(i, j int) bool { return n[i].Ident() < n[j].Ident() }
func remDup(names []Name) []Name {
	m := make(map[string]bool)
	for _, name := range names {
		if _, seen := m[name.Ident()]; !seen {
			names[len(m)] = name
			m[name.Ident()] = true
		}
	}
	return names[:len(m)]
}
type Process interface {
	FreeNames() []Name
	FreeVars() []Name
	Calculi() string
	String() string
}
type NilProcess struct{}
func NewNilProcess() *NilProcess {
	return new(NilProcess)
}
func (n *NilProcess) FreeNames() []Name {
	return []Name{}
}
func (n *NilProcess) FreeVars() []Name {
	return []Name{}
}
func (n *NilProcess) String() string {
	return "inact"
}
type Par struct {
	Procs []Process
}
func NewPar(P, Q Process) *Par { return &Par{Procs: []Process{P, Q}} }
func (p *Par) FreeNames() []Name {
	var fn []Name
	for _, proc := range p.Procs {
		fn = append(fn, proc.FreeNames()...)
	}
	sort.Slice(fn, names(fn).Less)
	return remDup(fn)
}
func (p *Par) FreeVars() []Name {
	var fv []Name
	for _, proc := range p.Procs {
		fv = append(fv, proc.FreeVars()...)
	}
	sort.Slice(fv, names(fv).Less)
	return remDup(fv)
}
func (p *Par) String() string {
	var buf bytes.Buffer
	buf.WriteString("par[ ")
	for i, proc := range p.Procs {
		if i != 0 {
			buf.WriteString(" | ")
		}
		buf.WriteString(proc.String())
	}
	buf.WriteString(" ]")
	return buf.String()
}
type Recv struct {
	Chan Name     
	Vars []Name   
	Cont Process  
}