TooL(ID:2916/too001)


for Tycoon oo language

Polymorphic pure object-oriented language with classes and inductively defined subtyping rules, programming language for Tycoon database environment



Structures:
Related languages
TYCOON => TooL   Extension of
TooL => Tycoon-2   Evolution of

References:
  • Gawecki, Andreas "TooL, Tycoon Object-Oriented Language: Language Summary" view details Abstract:
    The programming language TooL supports a pure object-oriented programming style within the Tycoon database environment. The Tycoon project follows an add-on approach to generic database programming that emphasizes type-safe scalability and extensibility External link: Online copy Extract: Language summary
    TooL is a polymorphic pure object-oriented language with classes and inductively defined subtyping rules. TooL supports the classical object model where objects are viewed as abstract data types encapsulating both state and behaviour. Method dispatch is based solely on the receiver's implementation type. TooL is a pure object-oriented language that

    provides uniform and expressive naming, binding and scoping rules for all language entities (objects, classes, types, type operators)
    minimizes built-in language functionality in favor of flexible system add-ons
    is equipped with powerful type abstraction mechanisms like (bounded and F-bounded) type parameterization, (partial) type hiding, and run-time type-discrimination
    is purely object-oriented in the sense that every language entity is viewed as an object and every computation is uniformly represented as a pattern of passing messages. This includes any form of control structures like loops, conditionals, function calls and exception handling.
    TooL supports multiple inheritance as a way to easily modify the behaviour of objects using small packages of behaviour (called mixins in some object-oriented languages).
    To improve reusability, even the access to all kinds of variables is (at least conceptually) done by sending messages. This obviates the need for special scoping rules concerning instance and class variables. The class hierarchy is simply seen as an extension to the local lexical context within a method body.
    Since messages are so important, TooL supports a rich set of syntactic variants to write down message sends. This syntactic sugar provides a compact yet easy to read encoding of complex message patterns.
    To take the maximum advantage of object-oriented software construction, TooL is a pure object-oriented language in the sense that every entity is viewed as an object and all kinds of computations are viewed as patterns of passing messages. Even low-level operations like integer arithmetic, variable access, and array indexing are uniformly expressed by sending messages to objects. Modern compiler technology eliminates most of the overhead traditionally associated with this approach.
    The TooL language is strongly and statically typed in the sense that no operation will ever be invoked on an object that does not support it, i.e. errors like 'message not understood' cannot occur at run time.

    Several conventional object models couple the implementation of an object with its type by unifying classes and types. In these models, an object of a certain class cannot be used in a context where another class is required if there is no inheritance relationship between these classes, even if both classes implement the same interface. TooL has adopted a more expressive type system based on conformance. Intuitively, an object conforms to a type when it supports at least the operations required by the type. That is, TooL views types as (unordered) sets of method signatures. The additional flexibility of conformance based typing is especially useful when integrating external services in distributed systems.

    Consequently, following recent research results on subtyping and inheritance, the TooL type hierarchy (implicitly defined by the subtype relation) does not have to be equal to the class hierarchy (explicitly defined by inheritance declarations): class specialization (by inheritance) can lead to type generalization or even to incompatible types that are in no subtype relation at all.

    In order to overcome some limitations of bounded parametric polymorphism, TooL captures certain forms of self-referencial similarity of object types by introducing a second relation on types orthogonal to the subtype relation: the matching relation '<*:' as it is implemented in the Emerald system. This is exactly F-Bounded Polymorphism.

    TooL supports the clean separation of the interface specification of an object (the set of messages an external client can send to the object), and the implementation of an object (i.e. the corresponding method bodies to these messages). These two parts of an object are specified in the public and private parts of a class description, respectively. Additionally, in the private part any number of private methods can be specified; these methods are not considered part of the external protocol of the object. The only object which can legally apply these private methods is the object itself. The expressions where these methods can be used are restricted to (statically determinable) messages to the pseudo-variables self and super.

    Similar to CLOS, TooL supports multiple inheritance by an (ordered) specification of multiple superclasses within a class description. Possible conflicts are resolved by a linearization of the inheritance tree performed by a topological sort on the superclass lattice. Inheriting from the same class more than once has no effect: TooL has no repeated inheritance as in Eiffel or C++.

  • Gawecki, Andreas [TooL Installation and Usage] view details Abstract: Initial implementation of the TooL type checker, class dependency manager, TooL to TML translator, and TooL-specific TVM extensions using the Tycoon infrastructure
  • Philippsen, Michael "A survey of concurrent object-oriented languages" pp917-980 view details
          in Concurrency: Practice and Experience 2000 v12 view details
    Resources