Performs a rule reference by evaluating refChain in the context of part. This function is used when a reference needs to be made and the direct reference chain syntax is not permitted. Note that ref(a.b.c, :d) is equivalent to ref(a, "b.c.d"), and also to a.b.c.d. Ref only needs to be used when part cannot be directly interpreted as a part. Use refMethod() to call methods in the same way.