next up previous contents
Next: Reflection Up: Expressiveness Previous: Generic types and modules   Contents

Support for objects

The bank accounts example illustrates a general point, namely, that in Maude it is very easy to support objects and distributed object interactions in a completely declarative style with rewrite rules. Although such object systems are just a particular style of system modules in which object interactions (through messages or directly between objects) are expressed by rewriting, Maude provides special support for object-based programming and for fair execution of object-based applications (see Chapter 8). Furthermore, the Full Maude extension provides special syntax in object-oriented modules (see Chapter 15). Such modules directly support object-oriented concepts like objects, messages, classes, and multiple class inheritance. Moreover, the support for communication with external objects (see Section 8.4) allows Maude objects to interact by message passing with internet sockets and, through them, with all kinds of other external objects, such as files, databases, graphical user interfaces, sensors, robots, and so on. All this is achieved without compromising Maude's declarative nature: interaction with normal Maude objects and with external objects can both be programmed with rewrite rules. Using internet sockets as external objects, it is also easy to develop distributed implementations in Maude, where a ``soup'' of objects and messages is not realized just as a multiset data structure in a single sequential machine, but as a ``distributed soup,'' with objects and messages in different machines or in transit.


next up previous contents
Next: Reflection Up: Expressiveness Previous: Generic types and modules   Contents
The Maude Team