concepts in programming languages

30
Concepts in Programming Languages By: Ms. Michelle Ramirez

Upload: vipa2008

Post on 26-Nov-2015

64 views

Category:

Documents


0 download

TRANSCRIPT

  • Concepts in Programming LanguagesBy: Ms. Michelle Ramirez

  • What is Programming Language?a system of signs used by a person to communicate a task / algorithm to a computer, causing the task to be performed. is more of a set of commands that is formulated by the user and executed by the computer.

  • Brief History of PLFORTRAN First successful PL Short for FORmula TRANSlation.Designed by John Backus in 1956Some Characteristics:DO LoopsBlock if statementsImprove array notation

  • ALGOL-60Short for ALGOrithmic LanguageJohn Backus and Peter Naur improve ALGOL in 1960- hence the suffix of Algol-60, written in their final report called BNF form (Backus and Naur Form)Considered to be the most ingenious language definition efforts in the early days of PLCharacteristics:Block StructureCompound statementsRecursive procedure callsNested if

    Brief History of PL

  • Brief History of PLLispDeveloped in the late 1950s by John McCarthyIt is still one of the most used even beating the popularity of FORTRAN at present.Some characteristics:Is the first major language to support lists processingIs the first major language to support recursionIs the first functional languageUse variables to represent parameters, rather than storage.Use the lambda calculus notation.

  • COBOLStands for Common Business Oriented Language Designed by the Conference on Data Systems and Languages (CODASYL) in 1960 Characteristics:Handles large files of data safelyMoves data around safelyDoes not have any need for complex mathematical functions.Easy to program

    Brief History of PL

  • APLShort for A Programming LanguageDesigned during the late 1950s by Kenneth Iverson of Harbard University but the first implementation was not available until the early 1960sCharacteristics:All operators have the same priorityMultiple expression are evaluated from left to right

    Brief History of PL

  • SNOBOLShort for String-Oriented Symbol LanguageDesigned in 1962 by a research group at Bell Laboratories as an aid to their own applications in symbolic formula manipulationsCharacteristics:String manipulation operationsPattern matchingDynamically typedInterpretive language

    Brief History of PL

  • BASICDesigned by Thomas Kurtz and John Kemeny of Dartmouth College in 1963 as an easy-to-learn, interactive language.An acronym for Beginners All Purpose Symbolic Instruction Code.Major deficiencies:No declaration of variables, hence poor error checkingSingle character variable namesNo support for subprogramsPoor control structuresLimited data structuring capabilitiesBrief History of PL

  • Algol-WNicklaus Wirths contribution toward Algol-68 is Algol-W.Already block structured, recursive and parameters are no longer passed by nameJovialAcronym for Jules Own Version of the International Algorithmic LanguageWas used in programs embedded in aircraft avionics, tactical and strategic missiles, munitions, and space systems.Brief History of PL

  • PL/IPL/I = FORTRAN + COBOL +AlgolNamed after FORTRAN-VIIncluded the nested block structure and recursion of ALgol-60, the file and record structures and error handlers of COBOL, and the formatted I/O of FORTRAN.Brief History of PL

  • SIMULA-67Short for SIMUlation Language, was designed and implemented by Ole-Johan Dahl and Kristen Nygaard at the Norwegian Computing Center between 1962 and 1967.Designed originally as a language for discrete event simulationIt was the first introduced object-oriented programming concepts like classes and objects, inheritance and dynamic binding.Brief History of PL

  • Algol-68One main contribution of Algol-68 is the forced closure which eliminates the ambiguity problems cause by dangling else statements.It had no abstract data types or separate compilation.PascalDesigned by Nicklaus Wirth in 1969Designed to be small and primarily for teaching programming.Important features: case statement, user-defined types, sets, records, pointers and highly portableBrief History of PL

  • C* CPL (Cambridge Programming Language)* BPCL (Basic Combined Programming Language)Dennis Ritchie transformed B into C in 1972 by restoring some of the CPL features.There are several types like int, float, char etc..Has been the basis of most object-oriented languages like C++ and JavaBrief History of PL

  • PrologStands for Programming Logic Was largely developed by Robert Kowalski at Edinburgh, Maarten van Emden at Edinburgh and Alain Colmeraueur at Marseilles.A powerful language for artificial intelligence and non-numerical programming in general. Considered the highest level programming language in use today.Features:Use of logic to represent a worldUse of a resolution theorem prover to reason about that world Restriction to a class of formula for which the theorem prover is efficientUse of logical/mathematical variables, rather than variables representing storageEmphasis on list-processing data structuresBrief History of PL

  • SmalltalkA language designed by the Learning Research Group at Xerox Palo Alto Research Center. A very strong in the telecommunication application. Has been used for business information systems, it is embedded in an oscilloscope and it has been used to manage telephone system of an entire country.Brief History of PL

  • Modula-2Descendant of its ancestors Pascal and Modula.Emerged to correct the errors of Pascal and extends Pascal with the important module concept and those of multiprogramming.ADAIn 1985 ADA 95 was introduced to satisfy the present and future needs of users from a whole variety of application areas.Four areas were given attention in ADA 95(barnes, 1996), namely: object oriented programming, program libraries, interfacing and tasking.

    Brief History of PL

  • C++Provide support for creating and using data abstractionsProvides support for abject-oriented design and programming.Provides various nice improvements over existing C constructsProvides a collection of predefined classes, along with the capability of user-defined classes.Brief History of PL

  • JavaDesigned in 1991 by a group of Sun Microsystems engineers led by James Gosling. The original intention was to develop a language for consumer devices that is hardware-independent.There are two types of applications in Java:The standalone application which run as a normal program on the computerThe applet which run inside web browser.

    Brief History of PL

  • Programming Language ParadigmsWhat is Paradigm? pattern for modeling and solving problems.Two language Paradigm (according to Wegner-1989)Imperative Languages Declarative Languages

  • Programming Language ParadigmsImperative Languages specify how a computation is performed by sequences of changes to the RAM. There are 3 types:Block-structured languages the procedure is the principal building block of the program. The state of computation are represented by the stack with the active procedure being found at the top. For example:Algol-60, Algol-68, Pascal and C

  • Programming Language ParadigmsObject-based paradigms describe languages that employ objects. For example: ADA, modules of Modula and objects of SmalltalkDistributed Programming Paradigms refer to languages for loosely coupled systems that support a group of programmers working on a particular program simultaneously and communicating through message passing over a communication channel.

  • Programming Language ParadigmsDeclarative Languages specify what is to be computed. Logic Programming based on a subset of predicate calculus. Example: PrologFunctional Languages operate only through functions which return one values given a list of parameters. Example: Lisp

  • Application of Programming LanguagesFor scientific computation FORTRAN, Algol-60, Algol-68For data processingCOBOLFor artificial intelligenceLisp, PrologFor text processingSNOBOL, ICONFor system programmingC, ADA, ModulaGeneral-purposePL/I

  • Generations of Programming LanguagesFirst Generation Languages includes low-level languages like machine and assembly languageSecond Generation Languages composed mainly of languages designed during the early 1960s. ALGOL-60, BASIC, COBOL and FORTRAN

  • Generations of Programming LanguagesThird Generation Languages are those high-level language that came out and perfected in the late 1960s up to the presentPL/I, Pascal, Modula-2, C, ADA, Lisp, APL, ML, Prolog, C++, Objective-C, Smalltalk, Object Pascal, Eiffel, ADA-95 and JavaFourth Generation Languages domain specific languagesVisual programming environments VB, Delphi, Visual Age, Visual C++Database Systems Natural, SQL, Access, FoxPro, dBase, AdaBase.Expert System shells OPS5, EMYCIN, CLIPS, EXSYSSpreadsheet Languages Excel, QuattroPro, Lotus 1-2-3

  • Evaluation Criteria of Programming LanguagesReadabilityWritabilityReliabilityCostSimplicityOrthogonalityAdequacySyntaxAbstractionAssertionsHierarchical decompositionModular decompositionSequencingData ManipulationRedundancy

  • Levels of Programming LanguagesLow-levelMachine Language lowest level since it is machine-specific and is not designed for a specific structure of a problem.Assembly Language a structurally similar to machine languages except that the sequences of 1s and 0s are replaced by mnemonic names for the operator part of the instruction and numeric and alphabetic symbols are used for the operands.Middle-levelHigh-level designed to facilitate the writing solutions to problems they are designed to solve.

  • Methods of ImplementationCompilation a method where the high-level language is translated into another implemented language usually assembly or machine language. (Compiler)High-level language -> machine languageHigh-level language-> assembly language -> machine languageHigh-level language -> intermediate language -> assembly or machine languageInterpretation a method where we simulate, through a program running on another host computer, a computer whose machine language is the high-level language. (Interpreter)

  • Syntax, Semantics and PragmaticsSyntax is the form in which programs are writtenSemantics the meaning given to the various syntactic constructsPragmatics refers to the history and some implementation methodology specific to the language

    Basic is the most used language on microcomputers up to the late 1980sAlgol-W is not compatible in Algol-68 but closely related.Jovial is another attempt to improve Algol-60Original version of ADA is called ADA 83Original version of ADA is called ADA 83Original version of ADA is called ADA 83Paradigm the way we think of problems and how they are going to be solved.

    Languages in this paradigm are considered at a higher level than in the imperative languages.