Skip to Content
Concepts and Semantics of Programming Languages 1
book

Concepts and Semantics of Programming Languages 1

by Therese Hardin, Mathieu Jaume, Francois Pessaux, Veronique Viguie Donzeau-Gouge
August 2021
Intermediate to advanced
336 pages
7h 18m
English
Wiley-ISTE
Content preview from Concepts and Semantics of Programming Languages 1

3Semantics of Functional Features

In this chapter, we examine the semantics of the constructs that form the kernel of functional languages. We shall present several methods for expressing the meaning of these constructs, along with different ways of describing their semantics. The functional language studied here corresponds to the functional kernel of MLstyle languages. Many other published presentations of the semantics of functional features of languages exist, for example [DOW 11, FRI01].

3.1. Syntactic aspects

3.1.1. Syntax of a functional kernel

The language studied here, denoted as Exp2, includes only one syntactic category: expressions. Its abstract syntax is defined from a set X of (symbols of) variables, the set K = ℤ ⋃ image of constant values (where ℤ is the set of relative integers and image the set of booleans) and a set of primitive operators.

Table 3.1 presents the nine construction rules that enable the inductive definition of the set Exp2. An expression in this language can therefore be:

  • 1) a constant denoting a value of K, which will be either a relative integer or true or false;
  • 2) an identifier, here called a variable to maintain consistency with the usual terminology of expressions;
  • 3) an application of a unary operator to an expression;
  • 4) an application of a binary ...
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

Programming Languages: Concepts and Implementation

Programming Languages: Concepts and Implementation

Saverio Perugini

Publisher Resources

ISBN: 9781786305305Purchase Link