Fall 2011 some9mes used directly but even when not ags

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: mpling of Seman9c Checks and Computa9ons CSE341: Programming CSE341: Programming Languages Languages •  Field reference: exp.f Lecture 1 Lecture 1 –  Check: exp has a reference type (class instance) Course Course Mechanics Mechanics –  Check: The class of Bindingsa field named f exp has ML Variable Bindings ML Variable –  Compute: Inferred type is declared type of f Dan Grossman Fall 2011 Winter 2013 Dan Grossman Fall 2011 UW CSE 401 (Michael Ringenburg) 17 A Sampling of Seman9c Checks and Computa9ons CSE341: Programming CSE341: Programming Languages Languages •  Method call: exp.m(e1, e2, …, en) Lecture 1 L a reference type (class instance) 1 –  Check: exp is ecture Course Mechanics Course Mechanics –  Check: The class of Bindingsa method named m e L has ML Variable MxpVariable Bindings –  Check: The method exp.m has n parameters Dan Grossman Dan Grossman –  Check: Each argument has Fall ype that can be a t 2011 Fall 2011 assigned to the associated parameter •  “Assignment compa9ble”, like our assignment checking –  Compute: Inferred type is given by method declara9on return type (possibly void) Winter 2013 UW CSE 401 (Michael Ringenburg) 18 A Sampling of Seman9c Checks and Computa9ons CSE341: Programming Languages CSE341: Programming Languages •  Return statement: “return exp;...
View Full Document

Ask a homework question - tutors are online