Skip to Content
Programming Languages: Concepts and Implementation
book

Programming Languages: Concepts and Implementation

by Saverio Perugini
December 2021
Beginner
840 pages
47h 29m
English
Jones & Bartlett Learning
Content preview from Programming Languages: Concepts and Implementation

6.6 Free or Bound Variables

A variable in an expression in any programming language can appear either (1) bound to a declaration and, therefore, a value, or (2) free, meaning unbound to a declaration and, thus, a denotation or value. The qualification of a variable as free or bound is defined as follows (Friedman, Wand, and Haynes 2001, Definition 1.3.2, p. 29):

  • A variable v occurs free in an expression e if and only if there is a reference to v within e that is not bound by any declaration of v within e.

  • Avariable v occurs bound in an expression e if and only if there is a reference to v within e that is bound by some declaration of v in e.

For instance, in the expression , the x in the body of the lambda expression occurs bound to the declaration ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Concepts and Semantics of Programming Languages 1

Concepts and Semantics of Programming Languages 1

Therese Hardin, Mathieu Jaume, Francois Pessaux, Veronique Viguie Donzeau-Gouge
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9781284222739