Fall 2011 in a selector pq is q a method or eld of

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: SE341: Programming a context- free grammar Lecture 1 Lecture 1 Course –  Has a variable been declared? Mechanics Course Mechanics Mn expression? –  Are types consistent in aL Variable Bindings ML Variable Bindings –  In the assignment x=y, is y assignable to x? Dan Grossman Dan Grossman –  Does a method call have the right number and types of Fall 2011 parameters? Fall 2011 –  In a selector p.q, is q a method or field of class instance p? –  Is variable x guaranteed to be ini9alized before it is used? –  In p.q, could p be null? –  Etc. Winter 2013 UW CSE 401 (Michael Ringenburg) 5 Checked Proper9es C CSE341: Programming Languages •  Some enforced SE341: Programming Languages at compile 9me, others at run 9me (typically depends on lecture 1 spec). Lecture 1 L anguage Course •  Different Course Mechanics Mechanics languages have different requirements ML Variable Bindings –  E.g., C ML JVariable Bindings vs. ava typing rules, ini9aliza9on requirements –  Some of these pGrossman are ojen desirable in roper9es Dan Grossman Dan Fall 2011 programs, even all the languages doesn’t require them. if F 2011 –  Compilers shouldn’t enforce a property that is not required by the language (but can warn). –  However, there are sta9c checkers for some of these proper9es that use compiler- style algorithms. Winter 2013 UW CSE 401 (Michael Ringenburg) 6 What else do we need to know to generate code? CSE341: Programming CSE341: elds allocated n an object? •  Where are fiProgramming iLanguages Languages •  How big are objects? (i.e., how much 1torage needs to Lecture 1 Lecture s be allocated by new) Course Mechanics Course Mechanics ML tored •  Where are L Variable Bindings when a method is M local variables sVariable Bindings called? Dan Grossman D ffset? Or exclusively in register? Which? –  Stack? What oan Grossman Fall 2011 Fall 2011 –  Aside: what happens to registers when a method is called? •  Which methods are associated with an object/class? –  In par9cular, how...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online