Download presentation
Presentation is loading. Please wait.
Published byMarshall Boone Modified over 8 years ago
1
CSE 755, part4 Operational Semantics References: Kurtz (Ch. 8.4, 8.5, 8.6) Many ways to define o.s. of a language L: Define an interpreter for L Define a compiler for L, plus an interpreter for the assembly language used Specify how the state changes as various commands execute We will consider the third approach 1
4
CSE 755, part4 Denotational Semantics References: Kurtz (Ch. 9, 10(?)); Pagan (Ch. 4.2) Idea: The d.s. of each construct is the function computed by it Important: Compositionality: Semantics of a construct should be obtained by appropriately composing the semantics of its components (and should not depend on the details of the components) 4
6
1.Possible to handle more complex languages such as with nested blocks, procedures, etc. 2.Consider: begin int x; x:=0; begin int x; x:=1; end; write x; end; That should output 0, not 1 But when we reach the end of the block, we can't just go back to the state we had at the start of the block begin int x; int y; x:=0; y:=0; begin int x; x:=1; y:=1; end; write x; write y; end; That should output 0, 1; not 0, 0
8
CSE 755, part4 That’s all folks! Final exam: See course homepage Topics: Everything we have discussed in class Review: I will post on the newsgroup and in Piazza Sample finals: maybe... Thanks! 8
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.