Introduction - COP4020 Programming Languages Introduction...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
COP4020 Programming Languages Introduction Prof. Robert van Engelen
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
COP4020 Spring 2011 2 1/3/11 Course Objectives ! Improve the background for choosing appropriate programming languages ! Be able to program in procedural , object - oriented , functional , and logical programming languages ! Understand the significance of the design of a programming language and its implementation in a compiler or interpreter ! Enhance the ability to learn new programming languages ! Increase the capacity to express general programming concepts and to choose among alternative ways to express things in a particular programming language ! Simulate useful features in languages that lack them ! Understand how programs are parsed and translated by a compiler ! Be able, in principle, to design a new programming language
Image of page 2
COP4020 Spring 2011 3 1/3/11 Course Outline 1. Introduction : History, overview, and classification of programming languages 2. Functional Programming : Programming with Scheme and Haskell 3. Logic Programming : Programming with Prolog 4. Compilers and Interpreters : How programs are translated into machine code 5. Syntax : How syntax is defined and how syntax can impact ease-of-use 6. Semantics : How the meaning and behavior of programming constructs can be defined and interpreted 7. Axiomatic Semantics : How programs can be analyzed and proven correct 8. Names, Scopes, and Bindings : How and when bindings for local names are defined in languages with scoping rules 9. Control Flow : How programming constructs define control flow and how the choice of constructs can affect programming style 10. Subroutines and Parameter Passing : How the subroutine calling mechanism is implemented and how and when parameters are passed and evaluated 11. Exception Handling : How to improve the robustness of programs
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
COP4020 Spring 2011 4 1/3/11 Important Events in Programming Language History ! 1940s: The first electronic computers were monstrous contraptions " Programmed in binary machine code by hand via switches and later by card readers and paper tape readers " Code is not reusable or relocatable " Computation and machine maintenance were difficult: machines had short mean-time to failure (MTTF) because vacuum tubes regularly burned out " The term “bug” originated from a bug that reportedly roamed around in a machine causing short circuits ENIAC (1946)
Image of page 4
COP4020 Spring 2011 5 1/3/11 Assembly Languages ! Assembly languages were invented to allow machine operations to be expressed in mnemonic abbreviations " Enables larger, reusable, and relocatable programs " Actual machine code is produced by an assembler " Early assemblers had a one-to-one correspondence between assembly and machine instructions ! “Speedcoding” : expansion of macros into multiple machine instructions to achieve a form of higher-level programming
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
COP4020 Spring 2011 6 1/3/11 Assembly Language Example addiu sp,sp,-32 sw ra,20(sp) jal getint nop jal getint sw v0,28(sp) lw a0,28(sp) move v1,v0 beq a0,v0,D slt at,v1,a0 A: beq at,zero,B nop b C subu a0,a0,v1 B: subu v1,v1,a0 C: bne a0,v1,A slt at,v1,a0 D: jal putint nop lw ra,20(sp) addiu sp,sp,32 jr ra move v0,zero !
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern