Design a small model of untyped objects: a language, scoping, an adapted substitution function, and a (standard or regular) reduction system.
Start with the simplification of objects as multi-entry functions:
(define-language Object (e ::= n y (object (m (x) e) ...) (send e m e)) (y ::= x this) (n ::= number) (m ::= variable-not-otherwise-mentioned) (x ::= variable-not-otherwise-mentioned))
Sometimes we wish to treat this like a variable and at other times, we want to exclude it from this world. To support this two-faced treatment, the grammar includes the syntactic category of y, which consists of the set x of variables and this.