[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci Dept] / [R J Botting] / [Samples] / smalltalk.semantics
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Tue Sep 18 15:27:03 PDT 2007

Contents


    Notes on Semantics of Smalltalk

    [ /u/faculty/dick/cs320/smalltalk.semantics ]

    .Status PREDRAFT

    A Smalltalk shares a class with similar objects

  1. class::objects -> classes.
  2. instances:: classes-> @classes= /class.
  3. is_instance_of::@(objects, classes)={ (x,c) | c = class(x) }.

    Each object has special distinguishing values that are called its instance variable:

  4. instance_variables::(objects><variables)<>->values.

    Classes define what set of instance variables are valid for their objects.

    Classes also determine the way that their objects react to messages. They assoicate each message selector with a method for handling it. The set of possible messages for a class is called its protocol:

  5. protocol::(class><selector)<>->method.

    Each method has

    1. arguments
    2. local variables
    3. a sequence of steps

    A message has a selector and an array of arguments;

  6. messages::selector >< #objects

    Sending a message to an object produces another object:

  7. ____send______
  8. |
  9. | x?:objects
  10. | m?:messages
  11. |
  12. | result':objects
  13. |
  14. |--------------------
  15. |
  16. | ...
  17. |_____________

End