Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concepts of Programming Languages

Similar presentations


Presentation on theme: "Concepts of Programming Languages"— Presentation transcript:

1 Concepts of Programming Languages
Presented by: Dr. Emad Nabil Fall 2018 Slides by

2 Grading Policy Task Percent % Assignments and MT 40 Final 60

3 Assignments Submission policy
No Late submission. Plagiarism means grading by –ve marks. Discussion of assignments is a must. Without discussion No marks will be assigned.

4 Languages Python C++ Java C# Ada Prolog Lisp

5 Course Contents Ch6: Data Types Ch8: Subprograms Ch1:Preliminaries
Ch3: Describing Syntax and Semantics Chapter 5 Names, Bindings, and Scopes Ch6: Data Types Ch7: Expressions and Assignment Statements Ch8:Statement-Level Control Structures Ch8: Subprograms Ch13:Concurrency

6 Course Page All materials will be uploaded to Acadox : GP:

7 Text Book Other materials on course page +

8 Chapter 1 Introduction

9 Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language Design Trade-Offs Implementation Methods Programming Environments

10 Reasons for Studying Concepts of Programming Languages
Improved background for choosing appropriate languages Increased ability to learn new languages Better understanding of significance of implementation Better use of languages that are already known

11 Programming Domains Systems programming Scientific applications
Large numbers of floating point computations; use of arrays Fortran, Matlab, Python Business applications Produce reports, use decimal numbers and characters COBOL, Java, Oracle, C# Artificial intelligence Symbols rather than numbers manipulated; use of linked lists LISP, prolog, Python Systems programming designing and writing computer programs that allow the computer hardware to interface with the programmer and the user, leading to the effective execution of application software. performance constrained, needs hardware awareness Need efficiency because of continuous use Examples OS, compilers, interpreters, scheduler. C/C++ Web Software collection of languages: markup (e.g., HTML), scripting (e.g., PHP), general-purpose (e.g., Java) ASP.NET Python

12 Language Evaluation Criteria
Readability: the ease with which programs can be read and understood Writability: the ease with which a language can be used to create programs Reliability: conformance “matching” to specifications (i.e., performs to its specifications) Cost: the ultimate total cost

13 Evaluation Criteria: Readability
1 Evaluation Criteria: Readability Overall simplicity Minimal feature multiplicity : having more than one way to accomplish a particular operation is bad. Minimal operator overloading Orthogonality A relatively small set of primitive constructs can be combined in a relatively small number of ways Every possible combination is legal Data types Adequate predefined data types Syntax considerations Identifier forms: flexible composition (combining) Form and meaning: self-descriptive constructs, meaningful keywords

14 Evaluation Criteria: Writability
2 Evaluation Criteria: Writability Simplicity and orthogonality Few constructs, a small number of primitives, a small set of rules for combining them Support for abstraction The ability to define and use complex structures or operations in ways that allow details to be ignored Expressivity A set of relatively convenient “easy” ways of specifying operations Strength and number of operators and predefined functions

15 Evaluation Criteria: Reliability
3 Evaluation Criteria: Reliability

16 Evaluation Criteria: Reliability
3 Evaluation Criteria: Reliability Type checking Testing for type errors Exception handling Intercept run-time errors and take corrective measures Aliasing Presence of two or more distinct referencing methods for the same memory location dangerous feature in a programming language. Writability and Readability Both readability and writability influence reliability A language that does not support “natural” ways of expressing an algorithm will require  the use of “unnatural” approaches, and hence reduced reliability A program is said to be reliable if it performs to its specifications under all conditions.

17 Evaluation Criteria: Cost (Money and Time)
4 Evaluation Criteria: Cost (Money and Time) Training programmers to use the language Writing programs (closeness to particular applications) Compiling/ Executing programs “speed” Language implementation system: availability of free compilers Reliability: poor reliability leads to high costs Maintaining programs

18 Evaluation Criteria: Others
5 Evaluation Criteria: Others Portability The ease with which programs can be moved from one implementation to anther A committee began work on producing a standard version of C++ in It was approved in 1998. Standard versions  (C++ 98, C++11, C++2014, C++2017, C++20,….) Generality The applicability to a wide range of applications Well-definedness The completeness and precision of the language’s official definition

19 Influences on Language Design

20 Influences on Language Design
Computer Architecture Languages are developed around the prevalent computer architecture, known as the von Neumann architecture Program Design Methodologies New software development methodologies (e.g., object-oriented software development)  led to new programming paradigms  new programming languages

21 Imperative programming Vs. Declarative Programming
Imperative programming languages focuses on describing how a program operates. a developer writes code that describes in exacting detail the steps that the computer must take to accomplish the goal. This is sometimes referred to as algorithmic / procedural programming. Ex (C#, Visual Basic, C++, and Java )  Declarative Programming languages : is non-procedural and very high-level (4th generation). focuses on what the program should accomplish without specifying how the program should achieve the result. expresses the logic of a computation without describing its control flow. Declarative programming often considers programs as theories of a formal logic, and computations as deductions in that logic space. EX: database query languages (e.g., SQL, XQuery), regular expressions, logic programming (Prolog), functional programming (Lisp, Haskell). Markup languages (NOT Programming language) It is a document format Markup languages extended to support some programming (Java script) Examples: HTML, XML

22 1-Computer Architecture Influences on Designing programming languages
Well-known computer architecture: Von Neumann Imperative languages most dominant, because of von Neumann computers Properties of Imperative languages 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 piping Iteration is fast on von Neumann computers (faster than recursion)

23 The von Neumann Architecture

24 Von Neumann Bottleneck
Connection speed between a computer’s memory and its processor determines the speed of a computer Program instructions often can be executed much faster than the speed of the connection; the connection speed thus results in a bottleneck Known as the von Neumann bottleneck; it is the primary limiting factor in the speed of computers instructions executed fast Connection with memory is slow von Neumann bottleneck


Download ppt "Concepts of Programming Languages"

Similar presentations


Ads by Google