Concepts of Programming Languages
140 Chapter 3 Describing Syntax and Semantics state, where the machine’s state is the collection of the values in its storage. A ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 141 The human reader of such a description is the virtual computer an ...
142 Chapter 3 Describing Syntax and Semantics 3.5.1.2 Evaluation The first and most significant use of formal operational semant ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 143 construct. In denotational semantics, programming language constr ...
144 Chapter 3 Describing Syntax and Semantics the nonterminal in the right side would already have its meaning attached. So, a s ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 145 In the following sections, we present the denotational semantics ...
146 Chapter 3 Describing Syntax and Semantics The only error we consider in expressions is a variable having an unde- fined valu ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 147 3.5.2.5 Logical Pretest Loops The denotational semantics of a log ...
148 Chapter 3 Describing Syntax and Semantics 3.5.3 Axiomatic Semantics Axiomatic semantics, thus named because it is based on m ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 149 Precondition and postcondition assertions are presented in braces ...
150 Chapter 3 Describing Syntax and Semantics axiom. In most cases, however, the weakest precondition can be specified only by a ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 151 As another example of computing a precondition for an assignment ...
152 Chapter 3 Describing Syntax and Semantics To use this in a proof, an inference rule, named the rule of consequence, is neede ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 153 x1=E1 and x2=E2 then we have {P3x2SE2} x2=E2 {P3} {(P3x2SE2)x1SE1 ...
154 Chapter 3 Describing Syntax and Semantics clause. According to the inference rule, we need a precondition P that can be used ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 155 The axiomatic description of a while loop is written as {P} while ...
156 Chapter 3 Describing Syntax and Semantics For zero iterations, the weakest precondition is, obviously, {y = x} For one itera ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 157 terminates. Recalling that x and y are assumed to be integer vari ...
158 Chapter 3 Describing Syntax and Semantics Because of the difficulty of proving loop termination, that requirement is often i ...
3.5 Describing the Meanings of Programs: Dynamic Semantics 159 {n >= 0} count = n; fact = 1; while count <> 0 do fact = ...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf