next up previous

2.5.2.3 Object MessagePassing

Os are described in two basic parts: and . Object properties are specified in terms of slots obtained from the objectís class; slots are discussed in more detail in Section 2.4.2. Object behavior is specified in terms of procedural code called messagehandlers which are attached to the objectís class. Objects are manipulated via messagepassing. For example, to cause the RollsRoyce object, which is an instance of the class CAR, to start its engine, the user must call the send function to send the message ìstartengineî to the RollsRoyce. How the RollsRoyce responds to this message will be dictated by the execution of the messagehandlers for ìstartengineî attached to the CAR class and any of its superclasses. The result of a message is similar to a function call in CLIPS: a useful return value or sideeffect.

Further discussion on messagehandlers can be found in Section 2.6, and a comprehensive description of the CLIPS ObjectOriented Language (COOL) can be found in Section 9.


next up previous