next up previous contents index
Next: Components Up: Interfaces Previous: Contracts   Contents   Index

Interface Inheritance

As in object oriented languages, which also have the concept of interfaces, they can be used to build a type system. In our model, interfaces can have an arbitrary amount of super-interfaces. A common constraint for the hierarchy of interfaces is that any given interface can not be supertype of itself, which gives us a acyclic subtype hierarchy.

In order to define a subtype relationship on interfaces, consider an interface taken from a well-known programming language like Java or C#. In these languages, an interface specifies a set of signatures, consisting of an signature name, its parameter names and datatype, return types and exceptions. We use the same set of describing elements but in our model we have some constraints on the datatypes which can be used. As the external view of components is characterized by its interfaces, only interface references and an extensible set of basic data types (i.e., integer, string, ...) are allowed, but no component references.



Snowball 2007-03-16