Saturday, March 12, 2011

Resolving names in ParaSail

In ParaSail, the names exported by an interface can in most cases be used without any explicit qualification of the interface from which they came. Hence, continuing with our Array interface example, we can generally write "First(Arr)" without having to specify which "First" function we mean, presuming we know the type of Arr. If qualification is necessary, the "::" notation of C++ is used, such as "Array::First(Arr)". ParaSail reserves "." for selecting a component of a composite object, such as "Arr.First".

ParaSail's name resolution works roughly as follows: Going bottom up, if you have a simple name (not used as the name of an operation being called), and that name is declared in the current scope, you use that interpretation. If you have an operation call, you determine the types of as many parameters as you can, and then look in the interfaces defining each of those types, for operations of the given name. If you find one or more that "work," then you consider all of those possibilities. If there are some operands which have no interpretations yet (perhaps because the operand is actually a parameterless call or an equivalent interface constant), then the type expected for that operand is used to help resolve the operand. If you get to the "top" and you have exactly one interpretation that "works," you use that one. If you have no interpretations, or you have more than one, the construct cannot be resolved, and an error is indicated. This sort of overload resolution sounds more complicated than it typically ends up being, because most constructs are relatively simple.

0 comments For Resolving names in ParaSail Article

What do you think about Resolving names in ParaSail article???
Please give your comments about Resolving names in ParaSail article in this Blog. give your comments about Resolving names in ParaSail article, either in the form of criticism and advice and support will be very meaningful for me to progress this blog

Post a Comment