next up previous contents
Next: Formal Description Up: Categories Previous: Category as Container Class

Sol Categories

A Sol category contains a (possibly empty) set, zero or more member operators, and zero or more member functions. A member operator is a procedure of at least two arguments (a set and a set element) which returns a new element of a new set. Category member operators can be applied in parallel to the member set, resulting in a new set.

Sol categories are similar to classes in a conventional object oriented programming language, providing data/method encapsulation and a single-inheritance mechanism. However, Sol categories differ from classes in a fundamental way; Rather than being a mechanism for encapsulating a heterogeneous collection of data and methods (a class), a category combines a single member set with methods for operating on that set in parallel, as well as more general methods which may operate on any data.

Through the inheritance mechanism ``abstract'' categories (categories containing empty sets) may be defined, which other ``instance'' categories inherit operators and methods from to acquire. Abstract categories can also serve as a useful organizational tool by providing named collections of static functions, just like static classes in a conventional object-oriented language.


next up previous contents
Next: Formal Description Up: Categories Previous: Category as Container Class
Richard W. DeVaul
1998-12-07