Module Mechanisms CS412/413. Modules + abstract types. Abstract types. Multiple Implementations. How to type-check?

Size: px
Start display at page:

Download "Module Mechanisms CS412/413. Modules + abstract types. Abstract types. Multiple Implementations. How to type-check?"

Transcription

1 CS412/413 Introduction to Compilers and Translators Andrew Mers Cornell Universit Lecture 19: ADT mechanisms 10 March 00 Module Mechanisms Last time: modules, was to implement ADTs Module collection of related values and tpes; mechanism for separate compilation, encapsulation, abstraction Record set of named fields with tpes; modules similar to records; module interface defines tpe of module value Abstract tpe allows encapsulation of values generated b module Implementation known onl at link time -- clients are insulated from changes, but harder to optimize CS 412/413 Spring '00 Lecture Andrew Mers 2 Abstract tpes Iota+abstract tpes, Modula-3 stle: list.int: declaration of abstract tpe tpe List; gth(l: List): int cons(h: int, l: List): List first(l: List): int rest(l: List): List binding to actual tpe list.mod: tpe List = {: int, : int, : List gth(l: List): int = l. cons(h: int, l: List): List = List{=l.+1,=h,l=l CS 412/413 Spring '00 Lecture Andrew Mers 3 Modules + abstract tpes Module is no longer a record: interface also contains list of abstract tpes Tpe: module(i 1..I n ) { v 1 : T 1 v m : T m tpe I 1... tpe I n v 1 : T 1 v m : T m Stripped-down module snta: tpe I 1 = T 1,, I n = T n v 1 : T 1 = e 1 v m : T m = e m CS 412/413 Spring '00 Lecture Andrew Mers 4 How to tpe-check? Additional issues: module must agree with own interface (everthing implemented, with right tpe) must recognize abstract tpes correctl: add to smbol table You should alread do most of this! A + {I i : tpe = T i (i 1..n) +{v j :T j (j 1..m ) < e k : T k m m A < tpe I 1 = T 1,, I n = T n v 1 : T 1 = e 1 v m : T m = e m (k 1..m ) : module(i 1..I n ) { v 1 : T 1,, v m : T m CS 412/413 Spring '00 Lecture Andrew Mers 5 Multiple Implementations Most (non-oo) languages: onl one implementation of (module value for) an interface Doesn t scale to large programs want multiple modules implementing an interface Approach 1: first-class module values using dependent tpes (e.g. FX-91 language) Approach 2: objects CS 412/413 Spring '00 Lecture Andrew Mers 6 1

2 First-class module values List interface: ListMod = tpe T; gth(t): int cons(int,t): T, first(t): int rest(t): T Two implementations: SimpleList: ListMod = { tpe T = {: int, : T, gth(l: T): int = (/* recurse */), LenList: ListMod = { tpe T = {: int, :int, : T, gth(l: T): int = l., CS 412/413 Spring '00 Lecture Andrew Mers 7 Ambiguit Problem: from interface, don t know which implementation we are dealing with. uses List = ListMod.T list1: List list1? LenList.T s SimpleList.T s CS 412/413 Spring '00 Lecture Andrew Mers 8 Implications Must name module value eplicitl rather than using name of interface: SimpleList.gth, LenList.T instead of ListMod.gth, ListMod.T Code written to use ADT must be passed module value too! sum(list: ListMod, a: list.t): int = if (list.gth(a) == 0) 0 else list.first(a) + sum(list, list.rest(a)) sum(a: ListMod.T): int = vs. if (ListMod.gth(a) == 0) 0 else ListMod.first(a) + sum(a, ) CS 412/413 Spring '00 Lecture Andrew Mers 9 Compiling Multiple Impls Can t stack allocate -- need to know the concrete tpe of a reference (as in C++) Don t know what code to run when an operation (e.g. gth) is invoked L: ListMod, list1: L.T list1 dependent tpe: contains epression (L) L.gth(list1) calls what? LenList.T SimpleList.T CS 412/413 Spring '00 Lecture Andrew Mers 10 Using Module Values First-class module value is record: points to proper code and global variables of module For single implementation (2 nd -class modules), linker makes module calls direct L: ListMod, list1: L.T; L.gth(list1) list1: L.T L: ListMod code (function value) gth gth(l: LenList.T) = l.; first rest CS 412/413 Spring '00 Lecture Andrew Mers 11 Using Objects as ADTs Another wa to etend records into ADTs Source code for a class defines the concrete tpe (implementation) Interface defined b public variables and methods of class class List { public static int gth(list l); public static List cons(int, List); public static int first(list); public static List rest(list); private int, ; private List ; tpe T; gth(t): int cons(int,t): T, first(t): int rest(t): T CS 412/413 Spring '00 Lecture Andrew Mers 12 2

3 Multiple implementations Can model using classes and methods: interface List { int gth(); List cons(int); int first(); List rest(); class LenList implements List { private int, ; private LenList ; private LenList(int h,t) { public int gth() { return ; public List cons(int h) { return new LenList(h, this); class SimpleList impls List { private int ; private SimpleList ; public int gth() { return 1+.gth() CS 412/413 Spring '00 Lecture Andrew Mers 13 The dispatching problem Same problem as with first-class modules: don t know what code to run at compile time. List a; a.gth() ListMod L; ListMod.T a; L.gth(a) SimpleList.gth or LenList.gth? Difference: objects know their implementation without separate module value (no L needed) CS 412/413 Spring '00 Lecture Andrew Mers 14 Objects implemented b adding etra pointer to dispatch vector (also: virtual table) with pointers to method code Code receiving :List onl knows has initial dispatch vector pointer Compiling objects SimpleList LenList List?? dispatch vector SimpleList.gth SimpleList.first SimpleList.rest dispatch vector Lenlist.gth LenList.first LenList.rest CS 412/413 Spring '00 Lecture Andrew Mers 15 Modules vs. objects Objects fold together functionalit of records, abstract tpes and modules Both mechanisms allow forms of polmorphism: code can use values of more than one tpe Mechanisms have subtl different epressive power first-class modules list1: L.T objects list1: List L: ListMod gth first rest dispatch vector gth first rest CS 412/413 Spring '00 Lecture Andrew Mers 16 Binar operations Advantage of abstract tpes: compare LenList in both stles, but with a binar prepend operation: LenList: ListMod = { tpe T = {: int, :int, : T gth(l: T): int = l. cons(h: int, l: T): T = { = l.+1, prepend(l1, l2: T): T = (if (l1. == 0) l2 else cons(l1., prepend(l1., l2))) class LenList implements List {, : int, : List gth() = Can t access l1 fields directl! prepend(l1: List) = ( if (l1.gth() == 0) this else cons(l1.first(), prepend(l1.rest())) CS 412/413 Spring '00 Lecture Andrew Mers 17 Heterogeneit Objects are better for heterogenous data structures containing different implementations of same interface Can mi different List impls in same list LenList SimpleList EmptList CS 412/413 Spring '00 Lecture Andrew Mers 18 3

4 Tpe relationships Relationship of LenList module and List interface is relationship of a value to its tpe LenList, SimpleList : ListMod Relationship of classes and object interfaces is more comple tpes related b subtpe relationship Enables heterogeneous data structures LenList <: List SimpleList <: List LenList List SimpleList CS 412/413 Spring '00 Lecture Andrew Mers 19 Subtpes Idea: one interface can etend another b adding more operations interface Point { float (); float (); interface ColoredPoint etends Point { float (); float (); Color color(); Point ColoredPoint is a subtpe of ColoredPoint <: Point (also: ) CS 412/413 Spring '00 Lecture Andrew Mers 20 Subtpe properties If tpe S is a subtpe of tpe T (S <: T) A value of tpe S ma be used wherever a value of tpe T is epected (e.g., assignment to a variable, passed as argument, returned from method) Point ; ColoredPoint ; ColoredPoint <: Point... subtpe supertpe = ; Subtpe polmorphism: code using T s can also use S s. CS 412/413 Spring '00 Lecture Andrew Mers 21 Subtpes in Java interface I etends I 2 { class C implements I { class C etends C 2 I 2 I 1 I C C 2 I 1 <: I 2 C <: I C 1 <: C 2 C 1 inh C 2 CS 412/413 Spring '00 Lecture Andrew Mers 22 C Subtpe hierarch Introduction of subtpe relation creates a hierarch of tpes: subtpe hierarch Subtpe Subset A value of tpe S ma be used wherever a value of tpe T is epected tpe or subtpe hierarch I2 I3 class/inheritance hierarch S <: T values(s) values(t) values of tpe S values of tpe T CS 412/413 Spring '00 Lecture Andrew Mers 23 CS 412/413 Spring '00 Lecture Andrew Mers 24 4

5 Subtping aioms Subtpe relation is refleive: T <: T Transitive: R <: S S <: T R <: T Usuall anti-smmetric: T 1 <: T 2 T 2 <: T 1 T 1 = T 2 Defines an ordering on tpes (partial order) Language defines subtpe judgement on various tpe kinds (primitives, records, &c) Java: C <: Object, C <: I CS 412/413 Spring '00 Lecture Andrew Mers 25 Subsumption Subsumption rule connects subtping relation and ordinar tping judgements A < E : S S <: T S <: T values(s) values(t) If epression E has tpe S, it also has tpe T for ever T such that S <: T CS 412/413 Spring '00 Lecture Andrew Mers 26 Implementing Tpe-checking Problem: static semantics is supposed to find a tpe for ever epression, but epressions have (in general) man tpes Which tpe to pick? CS 412/413 Spring '00 Lecture Andrew Mers 27 I2 I3 Principal Tpe Idea: ever epression has a principal tpe that is the most-specific tpe of the epression Can use subsumption rule to infer all supertpes if principal tpe is used CS 412/413 Spring '00 Lecture Andrew Mers 28 I2 I3 Tpe-checking interface Old method for checking tpes: abstract class Node { abstract Tpe tpecheck(smtab A); // Return the principal tpe of this // statement or epression No changes in interface needed to support subtping, ecept interpretation of result of tpecheck Tpe-checking rules Rules for checking code must allow a subtpe where a supertpe was epected Old rule for assignment: id : T A A < id = E; : T What needs to change here? CS 412/413 Spring '00 Lecture Andrew Mers 29 CS 412/413 Spring '00 Lecture Andrew Mers 30 5

6 Tpe-checking code class Assignment etends ASTNode { String id; Epr E; Tpe tpecheck(smtab A) { Tpe Tp = E.tpeCheck(A); Tpe T = A.lookupVariable(id); if (Tp.subtpeOf(T)) return T; else throw new TpecheckError(E); p T p <: T + id : T A A < id = E; : T CS 412/413 Spring '00 Lecture Andrew Mers 31 Unification Some rules more problematic: if Rule: A < E : bool A < S 1 : T A < S 2 : T A < if ( E ) S 1 else S 2 : T Problem: suppose S 1 has principal tpe T 1, S 2 has principal tpe T 2. Old check: T 1 = T 2. New check: need principal tpe T. How to unif T 1, T 2? CS 412/413 Spring '00 Lecture Andrew Mers 32 Unification in subtpe hierarch Idea: unified principal tpe is least common ancestor in tpe hierarch I2 I3 LCA(C3, ) = Logic: must be same as or subtpe of an tpe that could be the tpe of both a value of tpe C3 and a value of tpe CS 412/413 Spring '00 Lecture Andrew Mers 33 Eplicit vs Structural subtpes Java: all subtpes eplicitl declared, name equivace for tpes. Subtpe relationships inferred b transitive etension. Languages with structural equivace (e.g., Modula-3): subtpes inferred based on structure of tpes; no etends declaration Same checking done in each case; eplicitl declared subtpes must follow rules for recognizing subtpes implicitl CS 412/413 Spring '00 Lecture Andrew Mers 34 Testing subtpe relation Subtping for records S T means S has at least the fields of T {: int, : int, c: Color <: { : int, : int Subtpe rule for records {: int, : int, c: Color { : int, : int m n A < {a 1 : T 1,,a m : T m <: {a 1 : T 1,,a n : T n Implementation: c S T Similar to our rule for checking modules What about allowing field tpes to var? If Point <: ColoredPoint, allow { p: ColoredPoint, z: int <: { p: Point, z: int? p p z z c CS 412/413 Spring '00 Lecture Andrew Mers 35 CS 412/413 Spring '00 Lecture Andrew Mers 36 6

7 Field Invariance Tr { p: ColoredPoint <: { p: Point : {p: Point : {p: ColoredPoint = ;.p = new 3DPoint( ); Point ColoredPoint Mutable (assignable) fields must be invariant under subtping 3DPoint Covariance Immutable record fields ma change with subtping (ma be covariant ) Suppose we allow variables to be declared final -- : final int Safe: p z { p: final ColoredPoint, z: int { p: final Point, z: int c p z CS 412/413 Spring '00 Lecture Andrew Mers 37 CS 412/413 Spring '00 Lecture Andrew Mers 38 Immutable record subtping Corresponding fields ma be subtpes; eact match not required m n A < T i <: T (i 1..m) i A < {a 1 : T 1 a m :T m <:{a 1 : T 1 a n :T n Summar Multiple implementation of abstract tpes special case of subtping Subtping characterized b new judgement: S <: T Old judgement A < e : T plus subsumption rule, defn. of subtpe relation defines new tpe-checking process Mutable fields must be invariant in subtpe relation; immutable fields ma be covariant CS 412/413 Spring '00 Lecture Andrew Mers 39 CS 412/413 Spring '00 Lecture Andrew Mers 40 7

Classes. Compiling Methods. Code Generation for Objects. Implementing Objects. Methods. Fields

Classes. Compiling Methods. Code Generation for Objects. Implementing Objects. Methods. Fields Classes Implementing Objects Components fields/instance variables values differ from to usuall mutable methods values shared b all s of a class usuall immutable component visibilit: public/private/protected

More information

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 17: Types and Type-Checking 25 Feb 08

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 17: Types and Type-Checking 25 Feb 08 CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 17: Types and Type-Checking 25 Feb 08 CS 412/413 Spring 2008 Introduction to Compilers 1 What Are Types? Types describe the values possibly

More information

Review. Type equivalence. Java declarations. Type equivalence. Declared vs. implicit subtyping. CS 412 Introduction to Compilers

Review. Type equivalence. Java declarations. Type equivalence. Declared vs. implicit subtyping. CS 412 Introduction to Compilers CS 412 Introdution to Comilers Andrew Mers Cornell Universit Leture 21: Subting 16 Marh 01 Review Multile imlementations suorted b subting Subting harateried b new judgement: S

More information

Records. ADTs. Objects as Records. Objects as ADTs. Objects CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 15: Objects 25 Feb 05

Records. ADTs. Objects as Records. Objects as ADTs. Objects CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 15: Objects 25 Feb 05 Records CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 15: Objects 25 Feb 05 Objects combine features of records and abstract data types Records = aggregate data structures Combine several

More information

Announcements. CSCI 334: Principles of Programming Languages. Lecture 19: C++

Announcements. CSCI 334: Principles of Programming Languages. Lecture 19: C++ Announcements CSCI 4: Principles of Programming Languages Lecture 19: C++ HW8 pro tip: the HW7 solutions have a complete, correct implementation of the CPS version of bubble sort in SML. All ou need to

More information

Object Oriented Languages. Hwansoo Han

Object Oriented Languages. Hwansoo Han Object Oriented Languages Hwansoo Han Object-Oriented Languages An object is an abstract data tpe Encapsulates data, operations and internal state behind a simple, consistent interface. z Data Code Data

More information

CS 403 Compiler Construction Lecture 8 Syntax Tree and Intermediate Code Generation [Based on Chapter 6 of Aho2] This Lecture

CS 403 Compiler Construction Lecture 8 Syntax Tree and Intermediate Code Generation [Based on Chapter 6 of Aho2] This Lecture CS 403 Compiler Construction Lecture 8 Snta Tree and Intermediate Code Generation [Based on Chapter 6 of Aho2] 1 This Lecture 2 1 Remember: Phases of a Compiler This lecture: Intermediate Code This lecture:

More information

Compiler construction

Compiler construction This lecture Compiler construction Lecture 5: Project etensions Magnus Mreen Spring 2018 Chalmers Universit o Technolog Gothenburg Universit Some project etensions: Arras Pointers and structures Object-oriented

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Values and Types We divide the universe of values according to types A type is a set of values and

More information

Classes. Code Generation for Objects. Compiling Methods. Dynamic Dispatch. The Need for Dispatching CS412/CS413

Classes. Code Generation for Objects. Compiling Methods. Dynamic Dispatch. The Need for Dispatching CS412/CS413 Classes CS4/CS43 Introduction to Comilers Tim Teitelbaum Lecture : Imlementing Objects 8 March 5 Comonents ields/instance variables values ma dier rom object to object usuall mutable methods values shared

More information

Type Inference Systems. Type Judgments. Deriving a Type Judgment. Deriving a Judgment. Hypothetical Type Judgments CS412/CS413

Type Inference Systems. Type Judgments. Deriving a Type Judgment. Deriving a Judgment. Hypothetical Type Judgments CS412/CS413 Type Inference Systems CS412/CS413 Introduction to Compilers Tim Teitelbaum Type inference systems define types for all legal programs in a language Type inference systems are to type-checking: As regular

More information

Introduction to Shape and Pointer Analysis

Introduction to Shape and Pointer Analysis Introduction to Shape and Pointer Analsis CS 502 Lecture 11 10/30/08 Some slides adapted from Nielson, Nielson, Hankin Principles of Program Analsis Analsis of the Heap Thus far, we have focussed on control

More information

Building Interpreters

Building Interpreters Building Interpreters Mool Sagiv html://www.cs.tau.ac.il/~msagiv/courses/wcc13.html Chapter 4 1 Structure of a simple compiler/interpreter Leical analsis Snta analsis Runtime Sstem Design Intermediate

More information

Administration CS 412/413. Advanced Language Support. First-class vs. Second-class. First-class functions. Function Types

Administration CS 412/413. Advanced Language Support. First-class vs. Second-class. First-class functions. Function Types Administration CS 412/413 Introduction to Compilers and Translators Andrew Myers Cornell University Lecture 33: First-class functions 21 April 00 Programming Assignment 6 handed out today register allocation

More information

Implementing Object-Oriented Languages. Implementing instance variable access. Implementing dynamic dispatching (virtual functions)

Implementing Object-Oriented Languages. Implementing instance variable access. Implementing dynamic dispatching (virtual functions) Implementing Object-Oriented Languages Implementing instance variable access Ke features: inheritance (possibl multiple) subtping & subtpe polmorphism message passing, dnamic binding, run-time tpe testing

More information

Typical workflow. CSE341: Programming Languages. Lecture 17 Implementing Languages Including Closures. Reality more complicated

Typical workflow. CSE341: Programming Languages. Lecture 17 Implementing Languages Including Closures. Reality more complicated Typical workflow concrete synta (string) "(fn => + ) 4" Parsing CSE341: Programming Languages abstract synta (tree) Lecture 17 Implementing Languages Including Closures Function Constant + 4 Var Var Type

More information

Object-Oriented Languages and Object-Oriented Design. Ghezzi&Jazayeri: OO Languages 1

Object-Oriented Languages and Object-Oriented Design. Ghezzi&Jazayeri: OO Languages 1 Object-Oriented Languages and Object-Oriented Design Ghezzi&Jazayeri: OO Languages 1 What is an OO language? In Ada and Modula 2 one can define objects encapsulate a data structure and relevant operations

More information

CS558 Programming Languages Winter 2013 Lecture 8

CS558 Programming Languages Winter 2013 Lecture 8 OBJECT-ORIENTED PROGRAMMING CS558 Programming Languages Winter 2013 Lecture 8 Object-oriented programs are structured in terms of objects: collections of variables ( fields ) and functions ( methods ).

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2018 Lecture 7b Andrew Tolmach Portland State University 1994-2018 Dynamic Type Checking Static type checking offers the great advantage of catching errors early And

More information

The code generator must statically assign a location in the AR for each temporary add $a0 $t1 $a0 ; $a0 = e 1 + e 2 addiu $sp $sp 4 ; adjust $sp (!

The code generator must statically assign a location in the AR for each temporary add $a0 $t1 $a0 ; $a0 = e 1 + e 2 addiu $sp $sp 4 ; adjust $sp (! Lecture Outline Code Generation (II) Adapted from Lectures b Profs. Ale Aiken and George Necula (UCB) Allocating temporaries in the Activation Record Let s optimie cgen a little Code generation for OO

More information

Variables and Bindings

Variables and Bindings Net: Variables Variables and Bindings Q: How to use variables in ML? Q: How to assign to a variable? # let = 2+2;; val : int = 4 let = e;; Bind the value of epression e to the variable Variables and Bindings

More information

Programming Languages

Programming Languages CSE 130: Spring 2010 Programming Languages Lecture 3: Epressions and Types Ranjit Jhala UC San Diego A Problem fun -> +1 Can functions only have a single parameter? A Solution: Simultaneous Binding Parameter

More information

News. CSE 130: Programming Languages. Environments & Closures. Functions are first-class values. Recap: Functions as first-class values

News. CSE 130: Programming Languages. Environments & Closures. Functions are first-class values. Recap: Functions as first-class values CSE 130: Programming Languages Environments & Closures News PA 3 due THIS Friday (5/1) Midterm NEXT Friday (5/8) Ranjit Jhala UC San Diego Recap: Functions as first-class values Arguments, return values,

More information

Grade Weights. Language Design and Overview of COOL. CS143 Lecture 2. Programming Language Economics 101. Lecture Outline

Grade Weights. Language Design and Overview of COOL. CS143 Lecture 2. Programming Language Economics 101. Lecture Outline Grade Weights Language Design and Overview of COOL CS143 Lecture 2 Project 0% I, II 10% each III, IV 1% each Midterm 1% Final 2% Written Assignments 10% 2.% each Prof. Aiken CS 143 Lecture 2 1 Prof. Aiken

More information

Building up a language SICP Variations on a Scheme. Meval. The Core Evaluator. Eval. Apply. 2. syntax procedures. 1.

Building up a language SICP Variations on a Scheme. Meval. The Core Evaluator. Eval. Apply. 2. syntax procedures. 1. 6.001 SICP Variations on a Scheme Scheme Evaluator A Grand Tour Techniques for language design: Interpretation: eval/appl Semantics vs. snta Sntactic transformations Building up a language... 3. 1. eval/appl

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Type Inference Some statically typed languages, like ML (and to a lesser extent Scala), offer alternative

More information

Winter Compiler Construction T9 IR part 2 + Runtime organization. Announcements. Today. Know thy group s code

Winter Compiler Construction T9 IR part 2 + Runtime organization. Announcements. Today. Know thy group s code Winter 26-27 Compiler Construction T9 IR part 2 + Runtime organization Mool Sagiv and Roman Manevich School of Computer Science Tel-Aviv Universit Announcements What is epected in PA3 documentation (5

More information

CS153: Compilers Lecture 11: Compiling Objects

CS153: Compilers Lecture 11: Compiling Objects CS153: Compilers Lecture 11: Compiling Objects Stephen Chong https://www.seas.harvard.edu/courses/cs153 Announcements Project 3 due today Project 4 out Due Thursday Oct 25 (16 days) Project 5 released

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2016 Lecture 7a Andrew Tolmach Portland State University 1994-2016 Values and Types We divide the universe of values according to types A type is a set of values and a

More information

Semantic Analysis. How to Ensure Type-Safety. What Are Types? Static vs. Dynamic Typing. Type Checking. Last time: CS412/CS413

Semantic Analysis. How to Ensure Type-Safety. What Are Types? Static vs. Dynamic Typing. Type Checking. Last time: CS412/CS413 CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 13: Types and Type-Checking 19 Feb 07 Semantic Analysis Last time: Semantic errors related to scopes Symbol tables Name resolution This lecture:

More information

EECS1022 Winter 2018 Additional Notes Tracing Point, PointCollector, and PointCollectorTester

EECS1022 Winter 2018 Additional Notes Tracing Point, PointCollector, and PointCollectorTester EECS1022 Winter 2018 Additional Notes Tracing, Collector, and CollectorTester Chen-Wei Wang Contents 1 Class 1 2 Class Collector 2 Class CollectorTester 7 1 Class 1 class { 2 double ; double ; 4 (double

More information

CS 132 Compiler Construction, Fall 2011 Instructor: Jens Palsberg Multiple Choice Exam, Dec 6, 2011

CS 132 Compiler Construction, Fall 2011 Instructor: Jens Palsberg Multiple Choice Exam, Dec 6, 2011 CS 132 Compiler Construction, Fall 2011 Instructor: Jens Palsberg Multiple Choice Eam, Dec 6, 2011 ID Name This eam consists of 22 questions. Each question has four options, eactl one of which is correct,

More information

Programming Languages

Programming Languages CSE 130 : Fall 2008 Programming Languages Lecture 3: Epressions and Types Ranjit Jhala UC San Diego News PA 1 due (net) Fri 10/10 5pm PA 2 out today or tomorrow Office hours posted on Webpage: Held in

More information

Math 1050 Lab Activity: Graphing Transformations

Math 1050 Lab Activity: Graphing Transformations Math 00 Lab Activit: Graphing Transformations Name: We'll focus on quadratic functions to eplore graphing transformations. A quadratic function is a second degree polnomial function. There are two common

More information

Side note: Tail Recursion. Begin at the beginning. Side note: Tail Recursion. Base Types. Base Type: int. Base Type: int

Side note: Tail Recursion. Begin at the beginning. Side note: Tail Recursion. Base Types. Base Type: int. Base Type: int Begin at the beginning Epressions (Synta) Compile-time Static Eec-time Dynamic Types Values (Semantics) 1. Programmer enters epression 2. ML checks if epression is well-typed Using a precise set of rules,

More information

Types. Type checking. Why Do We Need Type Systems? Types and Operations. What is a type? Consensus

Types. Type checking. Why Do We Need Type Systems? Types and Operations. What is a type? Consensus Types Type checking What is a type? The notion varies from language to language Consensus A set of values A set of operations on those values Classes are one instantiation of the modern notion of type

More information

Lecture Overview. [Scott, chapter 7] [Sebesta, chapter 6]

Lecture Overview. [Scott, chapter 7] [Sebesta, chapter 6] 1 Lecture Overview Types 1. Type systems 2. How to think about types 3. The classification of types 4. Type equivalence structural equivalence name equivalence 5. Type compatibility 6. Type inference [Scott,

More information

Tail Recursion: Factorial. Begin at the beginning. How does it execute? Tail recursion. Tail recursive factorial. Tail recursive factorial

Tail Recursion: Factorial. Begin at the beginning. How does it execute? Tail recursion. Tail recursive factorial. Tail recursive factorial Begin at the beginning Epressions (Synta) Compile-time Static Eec-time Dynamic Types Values (Semantics) 1. Programmer enters epression 2. ML checks if epression is well-typed Using a precise set of rules,

More information

Typical Compiler. Ahead- of- time compiler. Compilers... that target interpreters. Interpreter 12/9/15. compile time. run time

Typical Compiler. Ahead- of- time compiler. Compilers... that target interpreters. Interpreter 12/9/15. compile time. run time Ahead- of- time Tpical Compiler compile time C source C 86 assembl 86 assembler 86 machine Source Leical Analzer Snta Analzer Semantic Analzer Analsis Intermediate Code Generator Snthesis run time 86 machine

More information

Lecture 7: Data Abstractions

Lecture 7: Data Abstractions Lecture 7: Data Abstractions Abstract Data Types Data Abstractions How to define them Implementation issues Abstraction functions and invariants Adequacy (and some requirements analysis) Towards Object

More information

Recursive Types and Subtyping

Recursive Types and Subtyping Recursive Types and Subtyping #1 One-Slide Summary Recursive types (e.g., list) make the typed lambda calculus as powerful as the untyped lambda calculus. If is a subtype of then any expression of type

More information

Types and Type Inference

Types and Type Inference CS 242 2012 Types and Type Inference Notes modified from John Mitchell and Kathleen Fisher Reading: Concepts in Programming Languages, Revised Chapter 6 - handout on Web!! Outline General discussion of

More information

Implementing Subprograms

Implementing Subprograms 1 Implementing Subprograms CS 315 Programming Languages Pinar Duygulu Bilkent University CS315 Programming Languages Pinar Duygulu The General Semantics of Calls and Returns 2 The subprogram call and return

More information

CS152: Programming Languages. Lecture 23 Advanced Concepts in Object-Oriented Programming. Dan Grossman Spring 2011

CS152: Programming Languages. Lecture 23 Advanced Concepts in Object-Oriented Programming. Dan Grossman Spring 2011 CS152: Programming Languages Lecture 23 Advanced Concepts in Object-Oriented Programming Dan Grossman Spring 2011 So far... The difference between OOP and records of functions with shared private state

More information

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring Java Outline Java Models for variables Types and type checking, type safety Interpretation vs. compilation Reasoning about code CSCI 2600 Spring 2017 2 Java Java is a successor to a number of languages,

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 14 Tuesday, March 24, 2015 1 Parametric polymorphism Polymorph means many forms. Polymorphism is the ability of

More information

Introduction to OCaml

Introduction to OCaml Fall 2018 Introduction to OCaml Yu Zhang Course web site: http://staff.ustc.edu.cn/~yuzhang/tpl References Learn X in Y Minutes Ocaml Real World OCaml Cornell CS 3110 Spring 2018 Data Structures and Functional

More information

What is an algorithm?

What is an algorithm? Reminders CS 142 Lecture 4 ADTs & Objects Program 1 was assigned - Due on 1/27 by 11:55pm Spring 2015 2 Object-Oriented Programming (OOP) OOP Definitions Imagine: You and your programming team have written

More information

Subtyping. Lecture 13 CS 565 3/27/06

Subtyping. Lecture 13 CS 565 3/27/06 Subtyping Lecture 13 CS 565 3/27/06 Polymorphism Different varieties of polymorphism: Parametric (ML) type variables are abstract, and used to encode the fact that the same term can be used in many different

More information

CSE Lecture 3: Objects 2 September Nate Nystrom University of Texas at Arlington

CSE Lecture 3: Objects 2 September Nate Nystrom University of Texas at Arlington CSE 3302 Lecture 3: Objects 2 September 2010 Nate Nystrom University of Texas at Arlington Administration Out of town this afternoon thru Monday HW1 due next Thursday 9/9 Types Last time: strongly typed

More information

Recap. Recap. If-then-else expressions. If-then-else expressions. If-then-else expressions. If-then-else expressions

Recap. Recap. If-then-else expressions. If-then-else expressions. If-then-else expressions. If-then-else expressions Recap Epressions (Synta) Compile-time Static Eec-time Dynamic Types (Semantics) Recap Integers: +,-,* floats: +,-,* Booleans: =,

More information

CS152: Programming Languages. Lecture 24 Bounded Polymorphism; Classless OOP. Dan Grossman Spring 2011

CS152: Programming Languages. Lecture 24 Bounded Polymorphism; Classless OOP. Dan Grossman Spring 2011 CS152: Programming Languages Lecture 24 Bounded Polymorphism; Classless OOP Dan Grossman Spring 2011 Revenge of Type Variables Sorted lists in ML (partial): type a slist make : ( a -> a -> int) -> a slist

More information

Data abstractions: ADTs Invariants, Abstraction function. Lecture 4: OOP, autumn 2003

Data abstractions: ADTs Invariants, Abstraction function. Lecture 4: OOP, autumn 2003 Data abstractions: ADTs Invariants, Abstraction function Lecture 4: OOP, autumn 2003 Limits of procedural abstractions Isolate implementation from specification Dependency on the types of parameters representation

More information

Compiler Construction Lent Term 2015 Lectures 10, 11 (of 16)

Compiler Construction Lent Term 2015 Lectures 10, 11 (of 16) Compiler Construction Lent Term 15 Lectures 10, 11 (of 16) 1. Slang.2 (Lecture 10) 1. In lecture code walk of slang2_derive 2. Assorted topics (Lecture 11) 1. Exceptions 2. Objects 3. Stacks vs. Register

More information

Register Allocation 3/16/11. What a Smart Allocator Needs to Do. Global Register Allocation. Global Register Allocation. Outline.

Register Allocation 3/16/11. What a Smart Allocator Needs to Do. Global Register Allocation. Global Register Allocation. Outline. What a Smart Allocator Needs to Do Register Allocation Global Register Allocation Webs and Graph Coloring Node Splitting and Other Transformations Determine ranges for each variable can benefit from using

More information

CSCI-GA Scripting Languages

CSCI-GA Scripting Languages CSCI-GA.3033.003 Scripting Languages 12/02/2013 OCaml 1 Acknowledgement The material on these slides is based on notes provided by Dexter Kozen. 2 About OCaml A functional programming language All computation

More information

The role of semantic analysis in a compiler

The role of semantic analysis in a compiler Semantic Analysis Outline The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors

More information

Announcements. Working on requirements this week Work on design, implementation. Types. Lecture 17 CS 169. Outline. Java Types

Announcements. Working on requirements this week Work on design, implementation. Types. Lecture 17 CS 169. Outline. Java Types Announcements Types Working on requirements this week Work on design, implementation Lecture 17 CS 169 Prof. Brewer CS 169 Lecture 16 1 Prof. Brewer CS 169 Lecture 16 2 Outline Type concepts Where do types

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Lecture 4 Thomas Wies New York University Review Last week Control Structures Selection Loops Adding Invariants Outline Subprograms Calling Sequences Parameter

More information

CMSC 330: Organization of Programming Languages. OCaml Imperative Programming

CMSC 330: Organization of Programming Languages. OCaml Imperative Programming CMSC 330: Organization of Programming Languages OCaml Imperative Programming CMSC330 Spring 2018 1 So Far, Only Functional Programming We haven t given you any way so far to change something in memory

More information

Administration CS 412/413. Why build a compiler? Compilers. Architectural independence. Source-to-source translator

Administration CS 412/413. Why build a compiler? Compilers. Architectural independence. Source-to-source translator CS 412/413 Introduction to Compilers and Translators Andrew Myers Cornell University Administration Design reports due Friday Current demo schedule on web page send mail with preferred times if you haven

More information

Programming Languages and Techniques (CIS120)

Programming Languages and Techniques (CIS120) Programming Languages and Techniques (CIS120) Lecture 22 March 14 th, 2016 Object Oriented Programming in Java Java Bootcamp tonight Announcements Monday, March 14 from 6-8pm in Levine 101 (Wu & Chen)

More information

! Those values must be stored somewhere! Therefore, variables must somehow be bound. ! How?

! Those values must be stored somewhere! Therefore, variables must somehow be bound. ! How? A Binding Question! Variables are bound (dynamically) to values Subprogram Activation! Those values must be stored somewhere! Therefore, variables must somehow be bound to memory locations! How? Function

More information

CMSC 330: Organization of Programming Languages. OCaml Expressions and Functions

CMSC 330: Organization of Programming Languages. OCaml Expressions and Functions CMSC 330: Organization of Programming Languages OCaml Expressions and Functions CMSC330 Spring 2018 1 Lecture Presentation Style Our focus: semantics and idioms for OCaml Semantics is what the language

More information

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler so far

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler so far Outline Semantic Analysis The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Statically vs. Dynamically typed languages

More information

Programming Languages

Programming Languages CSE 130 : Fall 2008 Programmg Languages Lecture 4: Variables, Environments, Scope News PA 1 due Frida 5pm PA 2 out esterda (due net Fi) Fri) Ranjit Jhala UC San Diego Variables and Bdgs Q: How to use variables

More information

CS558 Programming Languages. Winter 2013 Lecture 3

CS558 Programming Languages. Winter 2013 Lecture 3 CS558 Programming Languages Winter 2013 Lecture 3 1 NAMES AND BINDING One essential part of being a high-level language is having convenient names for things: variables constants types functions etc. classes

More information

Types and Type Inference

Types and Type Inference Types and Type Inference Mooly Sagiv Slides by Kathleen Fisher and John Mitchell Reading: Concepts in Programming Languages, Revised Chapter 6 - handout on the course homepage Outline General discussion

More information

The basic operations defined on a symbol table include: free to remove all entries and free the storage of a symbol table

The basic operations defined on a symbol table include: free to remove all entries and free the storage of a symbol table SYMBOL TABLE: A symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is associated with information relating

More information

Values (a.k.a. data) representation. Advanced Compiler Construction Michel Schinz

Values (a.k.a. data) representation. Advanced Compiler Construction Michel Schinz Values (a.k.a. data) representation Advanced Compiler Construction Michel Schinz 2016 03 10 The problem Values representation A compiler must have a way of representing the values of the source language

More information

Values (a.k.a. data) representation. The problem. Values representation. The problem. Advanced Compiler Construction Michel Schinz

Values (a.k.a. data) representation. The problem. Values representation. The problem. Advanced Compiler Construction Michel Schinz Values (a.k.a. data) representation The problem Advanced Compiler Construction Michel Schinz 2016 03 10 1 2 Values representation The problem A compiler must have a way of representing the values of the

More information

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End Outline Semantic Analysis The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors

More information

Recursive Types and Subtyping

Recursive Types and Subtyping Recursive Types and Subtyping #1 One-Slide Summary Recall: Recursive types (e.g., τ list) make the typed lambda calculus as powerful as the untyped lambda calculus. If τ is a subtype of σ then any expression

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 10a Andrew Tolmach Portland State University 1994-2017 Object-oriented Programming Programs are structured in terms of objects: collections of variables

More information

Special Topics: Programming Languages

Special Topics: Programming Languages Lecture #23 0 V22.0490.001 Special Topics: Programming Languages B. Mishra New York University. Lecture # 23 Lecture #23 1 Slide 1 Java: History Spring 1990 April 1991: Naughton, Gosling and Sheridan (

More information

Transformations of Functions. 1. Shifting, reflecting, and stretching graphs Symmetry of functions and equations

Transformations of Functions. 1. Shifting, reflecting, and stretching graphs Symmetry of functions and equations Chapter Transformations of Functions TOPICS.5.. Shifting, reflecting, and stretching graphs Smmetr of functions and equations TOPIC Horizontal Shifting/ Translation Horizontal Shifting/ Translation Shifting,

More information

Types, Type Inference and Unification

Types, Type Inference and Unification Types, Type Inference and Unification Mooly Sagiv Slides by Kathleen Fisher and John Mitchell Cornell CS 6110 Summary (Functional Programming) Lambda Calculus Basic ML Advanced ML: Modules, References,

More information

Type checking. Jianguo Lu. November 27, slides adapted from Sean Treichler and Alex Aiken s. Jianguo Lu November 27, / 39

Type checking. Jianguo Lu. November 27, slides adapted from Sean Treichler and Alex Aiken s. Jianguo Lu November 27, / 39 Type checking Jianguo Lu November 27, 2014 slides adapted from Sean Treichler and Alex Aiken s Jianguo Lu November 27, 2014 1 / 39 Outline 1 Language translation 2 Type checking 3 optimization Jianguo

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 4a Andrew Tolmach Portland State University 1994-2017 Semantics and Erroneous Programs Important part of language specification is distinguishing valid from

More information

Lecture 8 CS 412/413 Spring '00 -- Andrew Myers 2. Lecture 8 CS 412/413 Spring '00 -- Andrew Myers 4

Lecture 8 CS 412/413 Spring '00 -- Andrew Myers 2. Lecture 8 CS 412/413 Spring '00 -- Andrew Myers 4 CS412/413 Introduction to Compilers and Translators Spring 00 Outline Typechecking Symbol tables Using symbol tables for analysis Lecture 8: Semantic Analysis and Symbol Tables Lecture 8 CS 412/413 Spring

More information

CS 242. Fundamentals. Reading: See last slide

CS 242. Fundamentals. Reading: See last slide CS 242 Fundamentals Reading: See last slide Syntax and Semantics of Programs Syntax The symbols used to write a program Semantics The actions that occur when a program is executed Programming language

More information

Tradeoffs. CSE 505: Programming Languages. Lecture 15 Subtyping. Where shall we add useful completeness? Where shall we add completeness?

Tradeoffs. CSE 505: Programming Languages. Lecture 15 Subtyping. Where shall we add useful completeness? Where shall we add completeness? Tradeoffs CSE 505: Programming Languages Lecture 15 Subtyping Zach Tatlock Autumn 2017 Desirable type system properties (desiderata): soundness - exclude all programs that get stuck completeness - include

More information

Programming Languages Lecture 15: Recursive Types & Subtyping

Programming Languages Lecture 15: Recursive Types & Subtyping CSE 230: Winter 2008 Principles of Programming Languages Lecture 15: Recursive Types & Subtyping Ranjit Jhala UC San Diego News? Formalize first-order type systems Simple types (integers and booleans)

More information

Bidirectional Object Layout for Separate Compilation

Bidirectional Object Layout for Separate Compilation Proceedings of the 1995 AM onference on Object-Oriented Programming Sstems, Languages, and Applications (OOPSLA) Bidirectional Object Laout for Separate ompilation Andrew. Mers MI Laborator for omputer

More information

CS 314 Principles of Programming Languages

CS 314 Principles of Programming Languages CS 314 Principles of Programming Languages Lecture 13: Names, Scopes and Bindings Zheng (Eddy) Zhang Rutgers University February 28, 2018 Review: Names, Scopes and Binding What s in a name? Each name means

More information

Anatomy of a Compiler. Overview of Semantic Analysis. The Compiler So Far. Why a Separate Semantic Analysis?

Anatomy of a Compiler. Overview of Semantic Analysis. The Compiler So Far. Why a Separate Semantic Analysis? Anatomy of a Compiler Program (character stream) Lexical Analyzer (Scanner) Syntax Analyzer (Parser) Semantic Analysis Parse Tree Intermediate Code Generator Intermediate Code Optimizer Code Generator

More information

Prelim 1 SOLUTION. CS 2110, September 29, 2016, 7:30 PM Total Question Name Loop invariants. Recursion OO Short answer

Prelim 1 SOLUTION. CS 2110, September 29, 2016, 7:30 PM Total Question Name Loop invariants. Recursion OO Short answer Prelim 1 SOLUTION CS 2110, September 29, 2016, 7:30 PM 0 1 2 3 4 5 Total Question Name Loop invariants Recursion OO Short answer Exception handling Max 1 15 15 25 34 10 100 Score Grader 0. Name (1 point)

More information

Special Member Functions

Special Member Functions CS 247: Software Engineering Principles Special Member Functions Readings: Eckel, Vol. 1 Ch. 11 References and the Copy Constructor Ch. 12 Operator Overloading ( operator= ) U Waterloo CS247 (Spring 2017)

More information

Types for References, Exceptions and Continuations. Review of Subtyping. Γ e:τ τ <:σ Γ e:σ. Annoucements. How s the midterm going?

Types for References, Exceptions and Continuations. Review of Subtyping. Γ e:τ τ <:σ Γ e:σ. Annoucements. How s the midterm going? Types for References, Exceptions and Continuations Annoucements How s the midterm going? Meeting 21, CSCI 5535, Spring 2009 2 One-Slide Summary Review of Subtyping If τ is a subtype of σ then any expression

More information

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS 164 Spring 1999 P. N. Hilfinger CS 164: Final Examination Name: Login: Please do not discuss

More information

Wednesday, February 19, 2014

Wednesday, February 19, 2014 Wednesda, Februar 19, 2014 Topics for toda Solutions to HW #2 Topics for Eam #1 Chapter 6: Mapping High-level to assembl-level The Pep/8 run-time stack Stack-relative addressing (,s) SP manipulation Stack

More information

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS

More information

Special Member Functions. Compiler-Generated Destructor. Compiler-Generated Default Constructor. Special Member Functions

Special Member Functions. Compiler-Generated Destructor. Compiler-Generated Default Constructor. Special Member Functions Special Member Functions CS 247: Software Engineering Principles Special Member Functions Readings: Eckel, Vol. 1 Ch. 11 References and the Copy Constructor Ch. 12 Operator Overloading ( operator= ) C++

More information

Lecture #23: Conversion and Type Inference

Lecture #23: Conversion and Type Inference Lecture #23: Conversion and Type Inference Administrivia. Due date for Project #2 moved to midnight tonight. Midterm mean 20, median 21 (my expectation: 17.5). Last modified: Fri Oct 20 10:46:40 2006 CS164:

More information

Semantics. Names. Binding Time

Semantics. Names. Binding Time /24/ CSE 3302 Programming Languages Semantics Chengkai Li, Weimin He Spring Names Names: identif language entities variables, procedures, functions, constants, data tpes, Attributes: properties of names

More information

CS113: Lecture 4. Topics: Functions. Function Activation Records

CS113: Lecture 4. Topics: Functions. Function Activation Records CS113: Lecture 4 Topics: Functions Function Activation Records 1 Why functions? Functions add no expressive power to the C language in a formal sense. Why have them? Breaking tasks into smaller ones make

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2017 Lecture 3a Andrew Tolmach Portland State University 1994-2017 Binding, Scope, Storage Part of being a high-level language is letting the programmer name things: variables

More information

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division DO NOT. P. N.

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division DO NOT. P. N. CS 164 Fall 2011 UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS 164: P. N. Hilfinger 1. [2 points] We d like to add inheritance to our

More information

Using Characteristics of a Quadratic Function to Describe Its Graph. The graphs of quadratic functions can be described using key characteristics:

Using Characteristics of a Quadratic Function to Describe Its Graph. The graphs of quadratic functions can be described using key characteristics: Chapter Summar Ke Terms standard form of a quadratic function (.1) factored form of a quadratic function (.1) verte form of a quadratic function (.1) concavit of a parabola (.1) reference points (.) transformation

More information

Project Compiler. CS031 TA Help Session November 28, 2011

Project Compiler. CS031 TA Help Session November 28, 2011 Project Compiler CS031 TA Help Session November 28, 2011 Motivation Generally, it s easier to program in higher-level languages than in assembly. Our goal is to automate the conversion from a higher-level

More information