Implementation of place types.

The key idea is that we add to the context a constrained term, placeTerm (of type place), representing the current known information about here. placeTerm's term represents the current place (the value of here). placeTerm is an XTerm of type place, and its constraint specifies equalities relating this XTerm to other XTerms. E.g. we may know that here = p1, here = p2. So then PlaceTerm will be p1 given p1=p2 or p2, given p1=p2.

here must never occur in the PlaceTerm.

Here is how the value of placeTerm is defined for various pieces of code where here can be used:

The at(p) e or at(p) S introduces place-shifts.

A new placeTerm is created and pushed into the current context. The placeTerm is the variable v if p's type equates self to v. Otherwise the placeTerm is set to a new UQV v. The constraint of the placeTerm is the constraint in the type of p, with the substitution v/self applied if v was generated.

At an implementation level, XContext and ClosureDef_c now carry two additional items, a placeTerm and a placeConstraint. The typeCheckOverride method of AtExpr_c is modified to establish the value of the placeTerm and placeConstraint fields in the ClosureDef_c associated with the body of the AtExpr_c.

Additionally, we modify the type-checking of X10New_c to add the clause self.home=v,c, where v given c is the current placeTerm obtained from the context.