<p>Is chapter 29 of Bob Harper's <a href="http://www.cs.cmu.edu/~rwh/plbook/book.pdf">book</a> what you are looking for?</p>

CC BY-SA 3.0
2011-09-10T21:13:16.393Z
No. This is the standard CK-machine style semantics I'm familiar with. From PL-implementation lore, I know that having lexical closures is standard practice. I was wondering whether there is a semantic account which highlights them formally.
Ohad Kammar
CC BY-SA 3.0
2011-09-12T15:57:38.750Z
Maybe you could edit your title & question to clarify what you are looking for?
Martin Berger
CC BY-SA 3.0
2011-09-13T06:54:54.847Z
No, he should write his thesis and talk to his advisor. Or make his advisor use StackExchange.
Andrej Bauer
CC BY-SA 3.0
2011-09-09T18:20:30.393Z
2011-09-09T18:20:30.393Z
Andrej Bauer
<p>Closures form an important concept that I try to teach in my undergraduate Programming Languages class.  You can find my <a href="http://www.cs.bham.ac.uk/~udr/popl/index.html" rel="nofollow">lecture notes</a> online.</p>

<p>The Handout 8 shows big step semantics using environments and closures.  The Handout 9 shows my flavour of the SECD machine.  (The latter didn't work all that well for teaching purposes because the students got lost in detail and didn't develop good intuitions.  So I switched to big-step semantics.)</p>

<p>Neither of these is what you are asking for, but perhaps they could form a starting point?</p>

CC BY-SA 3.0
2012-03-07T16:30:23.873Z
2012-03-07T16:30:23.873Z
Uday Reddy
<p><em>Lexical closures</em> are an implementation technique in languages with first-class functions.</p>

<p>I'm interested in a simple operational description of function closures. Does anyone know of such a description?</p>

CC BY-SA 3.0
2011-09-07T22:02:53.520Z
Uhm, ask your advisor, the inventor of SOS?
Andrej Bauer
CC BY-SA 3.0
2011-09-07T22:36:57.173Z
You are relentless.
Ohad Kammar
CC BY-SA 3.0
2011-09-08T10:40:40.933Z
Is there any specific difficulty that prevents you from writing down a small-step SOS yourself?
Martin Berger
CC BY-SA 3.0
2012-03-08T07:31:21.773Z
I *know* what you're up to!
Andrej Bauer
CC BY-SA 3.0
2012-03-19T12:14:10.477Z
I hope so, although this question is unrelated to that.
Ohad Kammar
<reference-request><pl.programming-languages><semantics><compilers>
Where can I find an elementary small-step structural operational semantics for closures?
Ohad Kammar
# Where can I find an elementary small-step structural operational semantics for closures?

(Asked by: username_0 on 2011-09-07)

*Lexical closures* are an implementation technique in languages with first-class functions.

I'm interested in a simple operational description of function closures. Does anyone know of such a description?

**Tags:** reference-request, pl.programming-languages, semantics, compilers

> **Comments:**
> **username_1**: Uhm, ask your advisor, the inventor of SOS?  
> **username_0**: You are relentless.  
> **username_2**: Is there any specific difficulty that prevents you from writing down a small-step SOS yourself?  
> **username_1**: I *know* what you're up to!  
> **username_0**: I hope so, although this question is unrelated to that.  

---

## 2 answers

### Answer by username_1 on 2011-09-09. Score: 5

Is chapter 29 of Bob Harper's [book](http://www.cs.cmu.edu/~rwh/plbook/book.pdf) what you are looking for?

> **Comments:**
> **username_0**: No. This is the standard CK-machine style semantics I'm familiar with. From PL-implementation lore, I know that having lexical closures is standard practice. I was wondering whether there is a semantic account which highlights them formally.  
> **username_2**: Maybe you could edit your title & question to clarify what you are looking for?  
> **username_1**: No, he should write his thesis and talk to his advisor. Or make his advisor use StackExchange.  

---

### Answer by username_3 on 2012-03-07. Score: 4

Closures form an important concept that I try to teach in my undergraduate Programming Languages class. You can find my [lecture notes](http://www.cs.bham.ac.uk/~udr/popl/index.html) online.

The Handout 8 shows big step semantics using environments and closures. The Handout 9 shows my flavour of the SECD machine. (The latter didn't work all that well for teaching purposes because the students got lost in detail and didn't develop good intuitions. So I switched to big-step semantics.)

Neither of these is what you are asking for, but perhaps they could form a starting point?


---

