Programming Language Theory 2014, 1 Chapter 1 :: Introduction Origin : Michael L. Scott School of Computer & Information Engineering,

Slides:



Advertisements
Similar presentations
Copyright © 2005 Elsevier Imperative languages Group languages as –imperative von Neumann(Fortran, Pascal, Basic, C) object-oriented(Smalltalk, Eiffel,
Advertisements

CSI 3125, Preliminaries, page 1 Programming languages and the process of programming –Programming means more than coding. –Why study programming languages?
Chapter 1: Preliminaries
Reasons to study concepts of PL
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Programming Languages Structure
Introduction and Syntax. Course objectives Discuss features of programming languages. Discuss how the features are implemented in a simple computer architecture.
Organization of Programming Languages (CSE452)
Chapter 1 :: Introduction
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
Copyright © 2005 Elsevier Chapter 1 :: Introduction Programming Language Pragmatics Michael L. Scott.
Introduction to Programming Language CS105 Programming Language First-generation: Machine language Second-generation: Assembly language Third-generation:
Programming Language and Paradigms
CS 355 – Programming Languages
Understanding Computers Ch. 131 Chapter 13 Program Development and Programming Languages.
CS 326 Programming Languages, Concepts and Implementation
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Programming Languages and Design Lecture 1 Introduction to Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern University,
Chapter 1. Introduction.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
1 Programming Languages Tevfik Koşar Lecture - II January 19 th, 2006.
By Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion (Algol,
Programming History. Who was the first programmer?
CS 326 Programming Languages, Concepts and Implementation Instructor: Mircea Nicolescu Lecture 2.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
ISBN Chapter 1 Preliminaries. Copyright © 2009 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Programming Languages
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
COP4020 Programming Languages Introduction Prof. Robert van Engelen (modified by Prof. Em. Chris Lacher)
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
Software Engineering Algorithms, Compilers, & Lifecycle.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
Chapter 1 :: Introduction Programming Language Pragmatics, Fourth Edition Michael L. Scott Copyright © 2016 Elsevier.
Chapter 1. Introduction.
Concepts of Programming Languages
Why study programming languages?
CS 3304 Comparative Languages
CSCI 3200: Programming Languages
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
PROGRAMMING LANGUAGES
CS 326 Programming Languages, Concepts and Implementation
CS 3304 Comparative Languages
CS 3304 Comparative Languages
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Introduction.
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Programming Language Design
Chapter 1 Preliminaries.
COP4020 Programming Languages
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Von Neumann Architecture
Chapter 1 Preliminaries.
Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
School of Computer & Information Engineering,
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
CSCI 3200: Programming Languages
Chapter 1 Preliminaries.
Presentation transcript:

Programming Language Theory 2014, 1 Chapter 1 :: Introduction Origin : Michael L. Scott School of Computer & Information Engineering, Sangji University Kwangman Ko

Programming Language Theory 2014, 2 Reading 1, P40. Reading 2, P40

Programming Language Theory 2014, 3 1. Introduction, P41 Why are there so many programming languages? –evolution - we've learned better ways of doing things over time –socio-economic factors: proprietary interests, commercial advantage –orientation toward special purposes –orientation toward special hardware –diverse ideas about what is pleasant to use

Programming Language Theory 2014, 4 Introduction What makes a language successful?, PP –easy to learn(BASIC, Pascal, LOGO, Scheme) –easy to express things, easy use once fluent, "powerful” C, Common Lisp, APL, Algol-68, Perl, … –easy to implement (BASIC, Forth) –possible to compile to very good (fast/small) code (Fortran) –backing of a powerful sponsor (COBOL, PL/1, Ada, Visual Basic) –wide dissemination at minimal cost (Pascal, Turing, Java)

Programming Language Theory 2014, Program Language Spectrum, PP Classified into families based on Model of Computation –Declarative Programming Language focused on WHAT the computer is to do. More higher level, tune with the programmer’s point of view. –Imperative Programming Language focused on HOW the computer should do it. dominate, mainly for performance reasons

Programming Language Theory 2014, 6 Declarative programming language –Functional Scheme, ML, pure Lisp, FP, … –logic, constraint-based: –Prolog, VisiCalc, RPG, … Imperative programming language –von Neumann: Fortran, Pascal, Basic, C, … –object-oriented: Smalltalk, Eiffel, C++, … –scripting languages: Perl, Python, JavaScript, PHP, …

Programming Language Theory 2014, Why study programming languages?, P47~ Help you choose a language. –for systems programming C vs. Modula-3 vs. C++ –for numerical computations Fortran vs. APL vs. Ada –for embedded systems Ada vs. Modula-2 –for symbolic data manipulation Common Lisp vs. Scheme vs. ML –for networked PC programs Java vs. C/CORBA

Programming Language Theory 2014, 8 Reading, P48. –Understand OBSCURE features: –Choose among alternative ways to express things understand implementation costs –Make good use of debuggers, assemblers, linkers, and related tools –Simulate useful features in languages that lack them

Programming Language Theory 2014, Compilation vs. Interpretation Compilation vs. Interpretation –not opposites –not a clear-cut distinction Source Program Compiler Input Data Outputs Target Program Source Program Interpreter Input Data Outputs

Programming Language Theory 2014, 10 Compilation vs. Interpretation Pure Compilation –translates the high-level source program into an equivalent target program(typically in machine language). 원시 프로그램 목적 프로그램 Frontend Backend 중간코드 COMPILER

Programming Language Theory 2014, 11 Pure Interpretation –stays around for the execution of the program –the locus of control during execution Reading, P51. –Interpretation Greater flexibility Better diagnostics (error messages) –Compilation Better performance

Programming Language Theory 2014, 12 Most language implementations, ☞ P 51. –a mixture of both compilation and interpretation –compilation or simple pre-processing, followed by interpretation source program translator intermediate program Virtual Machine (interpreter) Input Data Output

Programming Language Theory 2014, 13 source program translator intermediate program Virtual Machine (interpreter) Input Data Output Test.java Java compiler (javac Test.java ) Test.class Java interpreter (java Test.class)

Programming Language Theory 2014, 14 Preprocessor –Removes comments and white space –Groups characters into tokens (keywords, identifiers, numbers, symbols) –Expands abbreviations in the style of a macro assembler –Identifies higher-level syntactic structures (loops, subroutines)

Programming Language Theory 2014, 15 Library of Routines and Linking –Reading, P52. –Compiler uses a linker program to merge the appropriate library of subroutines (e.g., math functions such as sin, cos, log, etc.) into the final program: source program compiler Incomplete machine program LINKER Library Routines machine program

Programming Language Theory 2014, 16 Post-compilation Assembly –Facilitates debugging (assembly language easier for people to read) –Isolates the compiler from changes in the format of machine language files (only assembler must be changed, is shared by many compilers)

Programming Language Theory 2014, 17 The C Preprocessor (conditional compilation) –Preprocessor deletes portions of code, which allows several versions of a program to be built from the same source

Programming Language Theory 2014, 18 Source-to-Source Translation (C++) –C++ implementations based on the early AT&T compiler generated an intermediate program in C, instead of an assembly language:

Programming Language Theory 2014, 19 Bootstrapping

Programming Language Theory 2014, 20 Dynamic and Just-in-Time(JIT) Compilation –Reading, P56. –In some cases a programming system may deliberately delay compilation until the last possible moment. –The Java language definition defines a machine-independent intermediate form known as byte code. Byte code is the standard format for distribution of Java programs. –The main C# compiler produces.NET Common Intermediate Language (CIL), which is then translated into machine code immediately prior to execution.

Programming Language Theory 2014, 21 Compilation vs. Interpretation Tools

Programming Language Theory 2014, Programming Environments

Programming Language Theory 2014, An Overview of Compilation, PP59-60.