# Class 15: Scheme Semantics (3)

Back to Scheme Semantics (2). On to Basics of Object-Oriented Programming.

Held: Friday, February 24, 2006

Summary: Today we conclude our exploration of the semantics of Scheme.

Related Pages:

Assignments

• For Monday: Find or write a good definition of object-oriented programming (and send it to me) and explain the difference between polymorphism and overloading.

Notes:

Overview:

• Notation, revisited.
• Revisiting hold.
• Function application.
• Lambda definitions.

## Notation, Revisited

Here are some issues that may be puzzling you.

• The semantics is using an interesting strategy: Given a continuation (essential, what to do after we evaluate this expression or statement), we build a new continuation (essentially, what to do after we evaluate the previous expression or statement).
• At times, the helper functions that the authors define use types not listed in the domain equations. At those times, they introduce new symbols to represent variables in those types. For example,
• The psi (pitchfork) in single is a function from E to C.
• The psi (pitchfork) in tievals and tievalsrest is a function from L* to C.
• The zeta (snake) in onearg is a function from E to a function from K to C.
• The authors regularly use Currying.
• In the definition of single, although the function is written "\psi epsilon*", you can think of it as "\psi . \epsilon*".
• Similarly, in tievals, instead of "\psi epsilon* omega", you can think of it as "\psi . \epsilon* omega" or even "\psi . \epsilon* . \omega".
• You will note that sometimes the number of parameters in the definition does not seem to match the number in the type declaration. That's because there are sometimes hidden parameters. For example, consider hold
• hold : L -> K -> C
• hold = \ alpha kappa sigma . send(sigma alpha select 1) kappa sigma
• Where does the sigma come from? It comes from the definition of C as S -> A.
• Because of that definition, we can also think of hold as being the following type
• hold : L -> K -> S -> A

Back to Scheme Semantics (2). On to Basics of Object-Oriented Programming.

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Wed May 10 09:02:51 2006.
The source to the document was last modified on Thu Jan 12 09:00:37 2006.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS302/2006S/Outlines/outline.15.html.

You may wish to validate this document's HTML ; ; Check with Bobby

Samuel A. Rebelsky, rebelsky@grinnell.edu