[Skip Navigation] [Remove Frame] [CS320] [Text Version] smalltalk.semantics.html Sat Dec 23 08:00:52 PST 2006

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

  6. arguments
  7. local variables
  8. a sequence of steps

    A message has a selector and an array of arguments;

  9. messages::selector >< #objects

    Sending a message to an object produces another object:

  10. ____send______
  11. |
  12. | x?:objects
  13. | m?:messages
  14. |
  15. | result':objects
  16. |
  17. |--------------------
  18. |
  19. | ...
  20. |_____________

End