Programming Languages Overview

cs 255 programming languages n.w
1 / 17
Embed
Share

Explore the fundamentals of programming languages, including concepts, paradigms, syntax, semantics, historical development, and the importance of studying programming language design. Dive into the properties and universality requirements of programming languages to understand their role in computing. Delve into the evolution of high-level programming languages and the parallels between programming linguistics and natural language studies.

  • Programming
  • Languages
  • Syntax
  • Semantics
  • Paradigms

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. CS-255 PROGRAMMING LANGUAGES HARISH TIWARI, SCHOOL OF ENGINEERING, SIR PADAMPAT SINGHANIA UNIVERSITY, UDAIPUR

  2. UNIT 1- Introduction to Programming language Introduction to Programming languages Programming Concepts and paradigms, Syntax, semantics, and pragmatics, Language processors, Historical development. Reasons for Studying Concepts of Programming Languages. Programming Domains, Influences on Language Design. Language Categories. Language Design Trade-Offs. Implementation Methods . Programming Environments. Harish Tiwari, SPSU, Udaipur

  3. 1-31 Introduction Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors. Historical development of programming languages and paradigms. Harish Tiwari, Sir Padampat Singhania University, Udaipur

  4. Programming linguistics 1-4 The first high-level programming languages were designed during the 1950s. Ever since then, programming languages have been productive area of study. On a more academic level, computer scientists search for ways to design programming languages that combine expressive power with simplicity and efficiency. Programming linguistics means the study of programming languages (PLs). This is by analogy with linguistics, the study of natural languages (NLs): Both PLs and NLs have syntax (form) and semantics (meaning). A natural language is just what a human population speaks and writes, so linguists are restricted to analyzing existing natural languages. So NLs are far broader, more expressive, and more subtle than PLs. On the other hand, programming linguists can not only analyze existing programming languages. they can also design and specify new programming languages. they can implement these languages on computers.

  5. Properties 1-5 A programming language must be universal. A programming language should also be reasonably natural for solving problems. A programming language must also be implementable on a computer. In practice, a programming language should be capable of an acceptably efficient implementation

  6. Properties 1-6 A programming language must be universal. capable of expressing any computation. A language without iteration or recursion is not universal. A language of recursive functions (and nothing else) is universal. A PL should be reasonably natural for expressing computations in its intended application area. For example, programming language whose data types are numbers and arrays only, might be natural for solving numerical problems, but would be less natural for solving problems in commerce or artificial intelligence. Conversely, a programming language whose only data types are strings and lists would be an unnatural choice for solving numerical problems.

  7. Properties 1-7 A PL must be implementable. it must be possible to run every program on a computer. Mathematical notation (in its full generality) is not implementable, because in this notation it is possible to formulate problems that cannot be solved by any computer. Natural languages also are not implementable. A PL should be capable of acceptably efficient implementation. efficiency of a programming language implementation is strongly influenced by the computer architecture. FORTRAN, C, and PASCAL programmers might expect their programs to be almost as efficient (within a factor of 2 4) as the corresponding assembly-language programs.

  8. Concepts 1-8 Concepts are building blocks of programs and PLs: values and types variables and storage bindings and scope procedural abstraction data abstraction generic abstraction (not covered in this course) concurrency (not covered in this course).

  9. Paradigms 1-9 A paradigm is a style of programming, characterized by a particular selection of key concepts. There are six major paradigms. Imperative programming: variables, commands, procedures. (example- Fortran, Cobol, Pascal, C, Ada) imperative programming, which is characterized by the use of commands and procedures that update variables. Object-oriented (OO) programming: objects, methods, classes. (C++, Java, C#, Ada) Concurrent programming: processes, communication. (Modula, Ada, Java) Functional programming: values, expressions, functions. (LISP, ML, Haskell) Logic programming: assertions, relations. Scripting languages by the presence of very high-level features.

  10. Syntax, semantics, and pragmatics 1-10 Every programming language has syntax, semantics, and pragmatics. Natural languages also have syntax and semantics, but pragmatics is unique to programming languages. A PL s syntax form of programs how expressions, commands, declarations, and other constructs must be arranged to make a well-formed program. Syntax influences how programs are written by the programmer. How programs are read by other programmers. How programs are parsed by the computer.

  11. Syntax, semantics, and pragmatics 1-11 A PL s semantics meaning of (well-formed) programs how a program may be expected to behave when executed on a computer. Semantics determines How programs are composed by the programmer. How programs are understood by other programmers, How programs are interpreted by the computer. A PL s pragmatics the way in which the PL is intended to be used in practice. Pragmatics include the paradigm(s) supported by the PL. Pragmatics influences how programmers are expected to design. how programmers are implement programs in practice.

  12. Syntax, semantics, and pragmatics 1-12 How an expert programmer thinks, given a programming problem to solve. Firstly, the programmer decomposes the problem. identifying suitable program units (procedures, packages, abstract types, or classes). Secondly the programmer conceives a suitable implementation of each program unit. deploying language concepts such as types, control structures, exceptions, and so on. Lastly, the programmer codes each program unit. Only at this last stage does the programming language s syntax become relevant.

  13. Language processors 1-13 Programming languages that are (more or less) independent of the machines on which programs are executed are called High Level Languages. High-level languages are implemented - By compiling programs into machine language.(C) by interpreting them directly.(java) by some combination of compilation and interpretation.(java)

  14. Language processors 1-14 A language processor is a system for processing programs either executing them or preparing them for execution. Language processors include: compilers interpreters Auxiliary tools source-code editors symbolic debuggers.

  15. Historical development (1) 1-15 The design of each programming language has been strongly influenced by experience with earlier languages. Numerous concepts have been invented, tested, and improved by being incorporated in successive programming languages. Today s programming languages are not the end product of developments in programming language design.

  16. FORTRAN and ALGOL60 were useful for numerical computation, COBOL was another early major high-level language. Its most important contribution was the concept of data descriptions, a It introduced the concept of block structure. Variables and procedures could be declared wherever in the program they were needed. features from all three. of procedures. PASCAL and ALGOL68 were among the first major programming languages with both - A rich variety of control structures (conditional and iterative commands) and ALGOL60 was the first major programming language designed for communicating algorithms. COBOL for commercial data processing. PL/I was an attempt to design a general-purpose programming language by merging In theALGOL68 programmer can declare an array of integers, an array of arrays, or an array It is simple, systematic, and efficiently implementable. FORTRAN was the earliest major high-level language. It introduced symbolic expressions and arrays, and also procedures today s data types. Like FORTRAN, COBOL s control flow was fairly low-level. Also like FORTRAN,COBOL has developed a long way from its original It was also the first major programming language to support recursive procedures. it introduced many new features, including low-level forms of exceptions and concurrency. likewise, the programmer can define a procedure whose parameter or result is an integer, an array, or another procedure. A rich variety of data types (such as arrays, records, and recursive types). Historical development (1) ( subroutines ) with parameters. IFORTRAN has developed a long way from its original design; the latest version was standardized as recently as 1997. design, the latest version being standardized in 2002. This language was huge, complex, incoherent, and difficult to implement. The PL/I experience showed that simply piling feature upon feature is a bad way to make a programming language more powerful and general-purpose. 1-16 1955 Fortran Lisp 1960 Algol60 Cobol 1965 PL/I Simula Algol68 1970 Pascal Smalltalk C 1975 Modula ML 1980 Ada83 1985 C++ OO imperative concurrent functional

  17. Historical development (3) 1-17 1980 Ada83 1985 C++ 1990 Haskell 1995 Ada95 Java 2000 C# 2005 OO imperative concurrent functional

More Related Content