nguyên lý ngôn ngữ lập trình nguyễn hứa phùng introduction sinhvienzone com

20 115 0
nguyên lý ngôn ngữ lập trình nguyễn hứa phùng introduction sinhvienzone com

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

C o e on nZ Dr Nguyen Hua Phung 09, 2015 hV ie HCMC University of Technology, Viet Nam in m Introduction https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction / 26 C o Introduction Reasons to study Concepts of Programming Languages Language Evaluation Criteria Language Design on nZ ie hV e Implementation Methods in m Outline https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction / 26 C o e hV ie nZ on My name: Nguyen Hua Phung Email: nhphung@hcmut.edu.vn Website: http://cse.hcmut.edu.vn/~phung(pending) Office hour: 15:00-16:30 Thursday (subject to change) Sakai: https://elearning.hcmut.edu.vn in m Lecturer In Charge https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction / 26 C o e hV ie nZ on Programming Languages: Principles And Paradigms, Maurizio Gabbrielli and Simone Martini, Springer, 2006 Programming Languages: Principles and Practices, Kenneth C Louden, Thomson Brooks/Cole, 2003 Ngon Ngu Lap Trinh: Cac nguyen ly va mo hinh, Cao Hoang Tru, 2004 in m References https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction / 26 C o e on hV ie nZ Tutorial/Lab/Online: 15% Assignment: 25% Final: 60% in m Assessment https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction / 26 C o e hV ie nZ on After complete this subject, students are able to: describe formally lexicon and grammar of a programming language describe and explain some mechanism of a programming language implement a interpreter/compiler for a simple programming language in m Objectives https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction / 26 C o e hV ie nZ on Increased capacity to express idea Improved background for choosing appropriate languages Increased ability to learn new languages Better understanding of the significance of implementation Better use of languages that are already known Overall advancement of computing in m Benefits of Studying https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction / 26 C o e hV ie nZ on Scientific Applications Fortran, ALGOL 60 Business Applications COBOL Artificial Intelligence LISP, Prolog Systems Programming PL/S, BLISS, Extended ALGOL, and C Web Software XHTML, JavaScript, PHP in m Programming Domains https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 11 / 26 C o e on hV ie nZ Simplicity Orthogonality Support of abstraction (Control, Data) Safety in m Language Characteristics https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 12 / 26 C o e on nZ hV ie Readability Writability Reliability Cost in m Evaluation https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 13 / 26 Von Neumann C o e Computer Architecture Imperative on Programming Methodologies nZ Machine-based Procedural Declarative hV ie Logic Functional Constraint Query-based Object-Oriented in m Influences on Language Design https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 15 / 26 C o e on Well-known computer architecture: Von Neumann Imperative languages, most dominant, because of von Neumann computers hV ie nZ Data and programs stored in memory Memory is separate from CPU Instructions and data are piped from memory to CPU Basis for imperative languages Variables model memory cells Assignment statements model writing to memory cell Iteration is efficient in m Computer Architecture Influence https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 16 / 26 C o e on 1950s and early 1960s: Simple applications; worry about machine efficiency Late 1960s: Efficiency became important; readability, better control structures nZ Structured programming Top-down design and step-wise refinement Late 1970s: Process-oriented to data-oriented ie data abstraction hV Middle 1980s: Object-oriented programming Data abstraction + inheritance + polymorphism in m Programming Methodologies Influences https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 17 / 26 C o Imperative (C, Pascal) e Central features are variables, assignment statements, and iteration on Functional (LISP, Scheme, Haskel, Ocaml, Scala) nZ Main means of making computations is by applying functions to given parameters Logic (Prolog) Rule-based (rules are specified in no particular order) ie Object-oriented (Java, C++, Scala) hV Data abstraction, inheritance, late binding Markup (XHTML, XML) New; not a programming per se, but used to specify the layout of information in Web documents in m Language Paradigms https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 18 / 26 C o Reliability vs cost of execution on e Conflicting criteria Example: Java demands all references to array elements be checked for proper indexing but that leads to increased execution costs Readability vs writability ie nZ Another conflicting criteria Example: APL provides many powerful operators (and a large number of new symbols), allowing complex computations to be written in a compact program but at the cost of poor readability hV Writability (flexibility) vs reliability in m Language Design Trade-Offs Another conflicting criteria Example: C++ pointers are powerful and very flexible but not reliably used https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 19 / 26 C o hV ie nZ on e Compilation Programs are entirely translated into machine language and then executed Pure Interpretation Programs are translated and executed line-by-line Hybrid Implementation Systems A compromise between compilers and pure interpreters Just-in-time Compiler A compiler inside an interpreter compiles just hot methods in m Implementation Methods https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 21 / 26 C o e Compiler Source Execution Result on Data nZ Source Interpreter hV Source Result ie Data in m Implementation Methods Compiler Interpreter Result Data https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 22 / 26 C o on lexical analyzer e source program syntax analyzer front end nZ semantic analyzer ie intermediate code generator code optimizer hV back end code generator target program in m Compilation Phases https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 24 / 26 C o e on hV ie nZ Preprocessor Assembler Linker Loader Debugger Editor in m Related Programs https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 25 / 26 C o e on hV ie nZ What are still in your mind? in m Summary https://fb.com/sinhvienzonevn Dr Nguyen Hua Phung Introduction 26 / 26 ... Systems A compromise between compilers and pure interpreters Just-in-time Compiler A compiler inside an interpreter compiles just hot methods in m Implementation Methods https://fb .com/ sinhvienzonevn... https://fb .com/ sinhvienzonevn Dr Nguyen Hua Phung Introduction 12 / 26 C o e on nZ hV ie Readability Writability Reliability Cost in m Evaluation https://fb .com/ sinhvienzonevn Dr Nguyen Hua Phung Introduction. .. https://fb .com/ sinhvienzonevn Dr Nguyen Hua Phung Introduction 25 / 26 C o e on hV ie nZ What are still in your mind? in m Summary https://fb .com/ sinhvienzonevn Dr Nguyen Hua Phung Introduction

Ngày đăng: 30/01/2020, 22:16

Mục lục

    Reasons to study Concepts of Programming Languages

Tài liệu cùng người dùng

Tài liệu liên quan