GoConqr has a new look! Let us know what you think.

Flashcards

Organization of Programming Languages Chapter 1

James Herd Computer Science 2 English 71 cards

Organization of Programming Languages Chapter 1

Cards in this deck (71)

  1. 1Reasons for studying concepts of programming LanguagesIncreased ability to express ideas
    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
    Overall advancement of computing
  2. 2(Programming Domains) Scientific ApplicationsLarge number of floating point computations; use of arrays
    Fortran
  3. 3(Programming Domains) Business applicationsProduce reports, use decimal numbers and characters
    COBOL
  4. 4(Programming Domains) Artificial IntelligenceSymbols rather than numbers manipulated; use of linked lists
    LISP
  5. 5(Programming Domains) Systems ProgrammingNeed efficiency because of continuous use
    C
  6. 6(Programming Domains) Web SoftwareEclectic collection of languages: markup (e.g., HTML), scripting (e.g., PHP), general-purpose (e.g., Java)
  7. 7Readabilitythe ease with which programs can be read and understood
  8. 8Writabilitythe ease with which a language can be used to create programs
  9. 9Reliabilityconformance to specifications (i.e., performs to its specifications)
  10. 10Costthe ultimate total cost
  11. 11Evaluation Criteria: Readability Overall simplicitymanageable set of features and constructs
    Minimal feature multiplicity
    Minimal feature multiplicity
    Minimal operator overloading
  12. 12Evaluation Criteria: Readability OrthogonalityA relatively small set of primitive constructs can be combined in a relatively small number of ways
    Every possible combination is legal
  13. 13Evaluation Criteria: Readability Data typesAdequate predefined data types
  14. 14Evaluation Criteria: Readability Syntax ConsiderationsIdentifier forms: flexible composition
    Special words and methods of forming compound statements
    form and meaning: self-descriptive constructs, meaningful keywords
  15. 15Evaluation Criteria: Writability Simplicity and orthogonalityFew constructs, a small number of primitives, a small set of rules for combining them
  16. 16Evaluation Criteria: Writability Support for abstractionThe ability to define and use complex structures or operations in ways that allow details to be ignored
  17. 17Evaluation Criteria: Writability ExpressivityA set of relatively covenient ways of specifying operations
    Strength and number of operators and predefined functions
  18. 18Orthogonalitya relatively small set of primitive constructs
    a small set of rules for combining them to build the control and data structures of the language
    Every possible combination is legal and meaningful
    the more orthogonal the design, the fewer the exceptions (hence the simpler the lang)
    the meaning of an orthogonal feature is independent of context (eg., a pointer in C)
    IBM Mainframe
    VAX
  19. 19Evaluation Criteria: Reliability Type checkingtesting for type errors
  20. 20Evaluation Criteria: Reliability Exception handlingintercept run-time errors and take corrective measures
  21. 21Evaluation Criteria: Reliability AliasingPresence of two or more distinct referencing methods for the same memory location
  22. 22Evaluation Criteria: Reliability Readability and Writabilitya language that does not support "natural" ways of expressing an algorithm will require the use of "unnatural" approaches, and hence reduce reliability
  23. 23Evaluation Criteria: CostTraining programmers to use the language
    Writing programs (closeness to particular applications)
    Compiling programs
    Executing Programs
    Language implementation system: availability of free compilers and run times
    Reliability: poor reliability leads to high costs
    Maintaining programs (Most Cost)
  24. 24PortabilityFeature that made Java popular
    the ease with which programs can be moved from one implementation to another
    (Compare Java with Swift on portability)
  25. 25GeneralityThe applicability to a wide range of applications
  26. 26Well-definednessThe completeness and precision of the language's official definition
    WORA -> write once, run anywhere
  27. 27Influences on Language Design (Von Neuman)Computer Architecture- Most languages were developed around the this prevalent computer architecture
  28. 28Influences on language Design (Program Design)New software development methodologies (.eg., object-oriented software development) led to new programming paradigms and by extension, new programming languages
  29. 29Von NeumanVery well known computer architecture
    Imperative languages, most dominant because of Von Neuman computers
    Data and programs stored in memory and separated from the CPU
    Instuctions and data are piped from memory to CPU
  30. 30Imperative languagesVariables model memory cells
    assignment statements model piping
    iteration is efficient
  31. 31—Von Neuman ArchitectureVon Neuman Architecture
  32. 32initialize the program counter repeat forever fetch the instruction pointed by the counter increment the counter decode the instruction execute the instruction end repeatFetch-execute-cycle (On an Von Neumann architecture computer)
  33. 33Programming Methodologies Influences 1950s and early 1960sSimple applications; worry about machine efficiency
  34. 34Programming Methodologies Influences Late 1960sPeople efficiency became important: readability, better control structures
    structures programming (got rid of "goto" statement)
    top-down design and step-wise refinement (Break problem down from abstracted idea)
  35. 35Programming Methodologies Influences Late 1970sProcess-oriented to data-oriented
    data abstraction
  36. 36Programming Methodologies Influences Middle 1980sObject-oriented programming
    Data abstraction + inheritance + polymorphism
    OOP is the most used approach to writing applications
  37. 37Language CategoriesImperative
    functional
    logic
    Markup/programming hybrid
  38. 38Imperative languageCentral features are variables, assignment statements, and iteration
    include languages that support object-oriented programming
    Include scripting languages
    include the visual languages
    EX: C, Java, Perl, JavaScript, Visual BASIC, .NET, C++
  39. 39Functional LanguagesMain means of making computations is by applying functions to given parameters
    Ex: LISP, Scheme, ML, F#
  40. 40Logic LanguagesRule-based(rules are specified in no particular order)
    Ex: Prolog
  41. 41Markup/Programming hybridMarkup languages extend to support some programming
    HTML -> helps you write programming langs
    Ex: JSTL, XSLT
  42. 42Reactive ProgrammingBased on observation, "we will do better if we listen to each other"
    let each component of the program listen
    Model, view, controller
  43. 43Design Trade-Offs Reliability vs. cost of executionEx: java demands all references to array elements be checked for proper indexing, which leads to increased execution costs
  44. 44Programming Methodologies Influences Readability vs. WritabilityEx: APL provides many powerful operators (and a large number of new symbols), allowing complex computations to be written in compact program but at the cost of poor readability
  45. 45Writability (flexibility) vs. reliabilityEx: C++ pointers are powerful and very flexible but are unreliable
  46. 46Implementation MethodsCompilation
    Pure Interpretation
    Hybrid Implementation Systems
  47. 47Implementation Methods CompilationPrograms are translated into machine language; includes JIT systems
    use: Large commercial applications
  48. 48Implementation Methods Pure InterpretationPrograms are interpreted by another program known as an interpreter
    use: Small programs or when efficiency is not an issue
  49. 49Implementation Methods Hybrid Implementation SystemsA compromise between compilers and pure interpreters
    use: Small and medium systems when efficiency is not the first concern
  50. 50—Layered View of Computer
    the operating system and language implementation are layered over machine interface of a computer
    Layered View of Computer the operating system and language implementation are layered over machine interface of a computer
  51. 51CompilationTranslate high-level program(source language) into machine code (machine language)
    slow translation, fast execution
  52. 52Compilation processPhases:
    lexical analysis
    Syntax analysis
    Semantics analysis
    Code generation
  53. 53Lexical analysis:Compilation phase that converts characters in the source program into lexical units
  54. 54Syntax analysis phaseCompilation phase that transforms lexical units into parse trees which represent the syntactic structure of programs
  55. 55Semantic Analysis phaseCompilation phase that generates intermediate code
  56. 56Code generation phaseCompilation phase where machine code is generated
  57. 57—Compilation processCompilation process
  58. 58Compilation Terms: Load module(executable image): the user and the system code together
  59. 59Compilation terms: Linking and Loadingthe process of collection system program units and linking them to a user program
  60. 60Von Neumann Bottleneckthe connection speed between the computer's memory and it's processor determines the speed of the computer
    the program instructions often can be executed much faster than the speed of the connection
    the primary limiting factor in the speed of computers
  61. 61Pure interpretationNo translation
    Easier implementation f programs (run-time errors can easily and immediately be displayed)
    slower execution (10 to 100 times slower than compiled programs)
    often requires more space
    Now rare for traditional high- level languages
    Significant comeback with some Web scripting languages (e.g., JavaScript, PHP)
  62. 62—Pure interpretation ProcessPure interpretation Process
  63. 63Hybrid Implementation SystemA compromise between compilers and pure interpreters
    a high-level language program is translated to an intermediate language that allows easy interpretation
    ex: Perl programs are partially compiled to detect errors before interpretation
    ex: initial implementations of java were hybrid; the intermediate form, byte code, provides portability to any machine that has byte code interpreter and a run-time system(together, these are called Java Virtual Machine)
  64. 64Java Virtual Machine vs. Java Run time environmentMore libraries in run time environment
    Interpreted as the same
  65. 65—Hybrid implementation ProcessHybrid implementation Process
  66. 66Just-in-Time Implementation SystemsInitially translated programs to an intermediate language
    then compile the intermediate language of the subprograms int machine code when they are called
    Machine code version is kept for subsequent calls
    JIT systems are widely used for Java programs
    .NET languages are implemented with a JIT system
    In essence, JIT systems are delayed compilers
  67. 67PreprocessorsMicro substitution mechanisms
    Preprocessors macros (instructions) are commonly used to specify that code from another file is to be included
    A preprocessor processes a program immediately before the program immediately expand emmbedded preprocessor macros
    A well-known example: C preprocessor
    expands #include, #define, and similar macros
  68. 68Programming EnvironmentsA colletion of tools used in software development
    Unix
    Microsoft Visual Studio.NET
    NetBeans
  69. 69Programming Environments Unixan older operating system and tool collection
    Nowadays often used through a GUI (eg., CDE, KDE, or GNOME) that runs on top of UNIX
  70. 70Programming Environments Microsoft Visual Studio.NETa large, complex visual environment
    used to build Web applications and non-Web applications in any .NET language
  71. 71Programming Environments NetBeansRelated to Visual Studio .Net, expect for applications in Java

Information

Description
2 Computer Science Flashcards on Organization of Programming Languages Chapter 1, created by James Herd on 17/02/2019.
Created by
James Herd
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?