The Evolution of Programming Languages .


26 views
Uploaded on:
Description
The Evolution of Programming Languages. CS 351. Ij. 1. Customized Digital Computer . Oj. Task j. Task k. Ik. Ok. Rig different circuit for each task . 2. Stored Program Computing.
Transcripts
Slide 1

The Evolution of Programming Languages CS 351 Mark Hennessy Dept. Software engineering NUIM CS351

Slide 2

Ij 1. Altered Digital Computer Oj Task j Task k Ik Ok Rig distinctive circuit for every assignment Mark Hennessy Dept. Software engineering NUIM CS351

Slide 3

2. Put away Program Computing von Neumann demonstrated the presence of a Universal Machine ( equipment ) that can be altered utilizing control contributions to complete distinctive undertakings. Programming is the encoding of the undertaking to control this machine. encoding(Tj) Ij Oj Mark Hennessy Dept. Software engineering NUIM CS351

Slide 4

Imperative Languages Model of Computation ALU + Memory + Input + Output (von Neumann design) Levels of Abstraction (" Human Interface ") Machine Language Binary Representation of the assignment Assembly Language Symbolic Representation of the undertaking Mark Hennessy Dept. Software engineering NUIM CS351

Slide 5

Imperative Languages - FORTRAN Stands FOR mula TRAN slantion. Created in the 1950\'s as the main abnormal state programming dialect i.e utilized a compiler. Hi World Example: C FORTRAN IV WAS ONE OF THE FIRST PROGRAMMING C LANGUAGES TO SUPPORT SOURCE COMMENTS WRITE (6,7) 7 FORMAT(13H HELLO, WORLD) STOP END Mark Hennessy Dept. Software engineering NUIM CS351

Slide 6

Imperative Languages – ALGOL 60 Stands for ALGO rithmic L anguage Defined in 1960 and was the first to present elements still being used today: block structure and punctuation characterized by a linguistic use. methodology Absmax(a) Size:(n, m) Result:(y) Subscripts:(i, k); esteem n, m; exhibit a; whole number n, m, i, k; genuine y; remark irrefutably the best component of the lattice an, of size n by m is exchanged to y, and the subscripts of this component to i and k; start number p, q; y := 0; i := k := 1; for p:=1 step 1 until n do for q:=1 step 1 until m do if abs(a[p, q]) > y then begin y := abs(a[p, q]); i := p; k := q end end Absmax Mark Hennessy Dept. Software engineering NUIM CS351

Slide 7

Imperative Languages - C The best ALGOL sort dialect. Lexical variable degree and recursion A static sort framework which averts numerous negligible operations Function parameters are for the most part gone by esteem (cruise by-reference is accomplished in C by expressly passing pointer values) Heterogeneous total information sorts ( struct in C) which permit related information components to be consolidated and controlled as a unit A little set (around 30) of saved watchwords Mark Hennessy Dept. Software engineering NUIM CS351

Slide 8

Functional Languages Imperative projects are concerened with programming a progression of guidelines that change the condition of program towards giving the arrangement. Practical Programming is worried with survey a program as a progression of scientific capacities. Based upon the maths model of Lambda Calculus , created by Turing, Church and Kleene in the 1930\'s. Church\'s proposal says that there is nobody type of calculation that is any more capable than another. This remain constant as we are examining Paradigms! Stamp Hennessy Dept. Software engineering NUIM CS351

Slide 9

Functional Languages Turing built up a model of calculation called the Turing Machine … . TCS course. Church created lambda math. This depends on the thought of parameterised expressions, which shapes the premise of Functional Programming. Passing contentions to strategies. Check Hennessy Dept. Software engineering NUIM CS351

Slide 10

Functional Programming Introduced into programming the ideas of: First class and higher request capacities Polymorphism Lists Recursion Constructors Garbage Collection Mark Hennessy Dept. Software engineering NUIM CS351

Slide 11

Functional Programming Difference amongst FP and Imperative programming: IP: "To register the gcd of an and b , verify whether an and b are equivalent. In the event that so print one of them and exit. Generally supplant the bigger one by their distinction and rehash." FP: "The gcd of an and b is characterized to be a when a=b , and to be the gcd of c and d when a!=b , where c is the littler of an and b and d is their distinction. To register the gcd of a given combine of numbers, grow and streamline this definition until it wraps up. Stamp Hennessy Dept. Software engineering NUIM CS351

Slide 12

Functional Languages - Lisp Stands for Lis t P rocessing Same vintage as Fortran and ALGOL. Takes into consideration operations on records Eg car(0, 2, 4, 6) = 0 Eg cdr(0, 2, 4, 6) = (2, 4, 6) Lisp Program for factorials: (defun factorial (n) (if (<= n 1) 1 (* n (factorial (- n 1))))) Mark Hennessy Dept. Software engineering NUIM CS351

Slide 13

Functional Languages - ML Stands for Meta Language Functional Language with punctuation nearer to what you are acquainted with. Will do practicals with it! (CaML). CaML Program for factorials. let rec fac n =    if n <= 1    then n    else n * fac(n-1);; Mark Hennessy Dept. Software engineering NUIM CS351

Slide 14

Logic Programming Designed to permit scientific maxims demonstrate a hypothesis. In view of the possibility of a Horn condition H <- B 1 , B 2 ,… .B n The bolt signifies "if" and the commas signify "and" We will think about Logic programming through Prolog Mark Hennessy Dept. Software engineering NUIM CS351

Slide 15

Logic Programming - Prolog Name gets from the French programmation en logique . Dates from the mid 1970\'s. Based upon Predicate Calculus, the framework utilizes backtracking . Case Prolog Program for Factorials: factorial(0,1). factorial(N,F) :- N>0, N1 is N-1, factorial(N1,F1), F is N * F1. Stamp Hennessy Dept. Software engineering NUIM CS351

Slide 16

Object Oriented Programming Current worldview. We compose classes with the end goal that information is shrouded, thoughts are dreamy and code is re-usable! In principle… . Simula - > Smalltalk & Ada - > C++ - > Java Sub ideal models Aspect Oriented Programming Generic Programming through Templates We will utilize C++ to demonstrate some progressed OO components and non specific programming. Check Hennessy Dept. Software engineering NUIM CS351

Slide 17

Scripting Another type of writing computer programs is by means of scripting. Colossal measure of scripting dialects, Awk, sed, Bash, Javascript, UnrealScript and so forth We will intoduce scripting by means of Bash and Python in this course. Python utilizes dynamic writing and components a perfect punctuation. Multi Paradigm! Stamp Hennessy Dept. Software engineering NUIM CS351

Slide 18

Scripting - Python Indentation is vital! Test factorial capacity: def fac ( num ): if num == 1: return 1 else : return num * fac(num-1) Mark Hennessy Dept. Software engineering NUIM CS351

Recommended
View more...