Midterm CS102: Session 2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Implementation Methods Hybrid Implementation Systems

-A compromise between compilers and pure interpreters -Use: Small and medium systems when efficiency is not the first concern

Language Categories Imperative

-Central features are variables, assignment statements, and iteration -Include languages that support object-oriented programming -Include scripting languages -Include the visual languages -Examples: C, Java, Perl, JavaScript, Visual BASIC .NET, C++

Imperative languages, most dominant, because of von Neumann computers and following features

-Data and programs stored in memory -Memory is separate from CPU -Instructions and data are piped from memory to CPU -Basis for imperative languages

Language Design Trade-Offs Reliability vs. cost of execution

-Example: Java demands all references to array elements be checked for proper indexing, which leads to increased execution costs

Influences on Language Design Computer Architecture

-Languages are developed around the prevalent computer architecture, known as the von Neumann architecture

Language Categories Functional

-Main means of making computations is by applying functions to given parameters -Examples: LISP, Scheme, ML, F#

Language Categories Markup Programming Hybrid

-Markup languages extended to support some programming -Examples: JSTL, XSLT

Implementation Methods Pure Interpretation

-Programs are interpreted by another program known as an interpreter -Use: Small programs or when efficiency is not an issue

Implementation Methods Compilation

-Programs are translated into machine language; includes JIT systems -Use: Large commercial applications

Language Categories logic

-Rule-based (rules are specified in no particular order) -Example: Prolog

Language Design Trade-Offs Readability vs. writability

Example: APL provides many powerful operators (and a large number of new symbols), allowing complex computations to be written in a compact program but at the cost of poor readability

Language Design Trade-Offs Writability (flexibility) vs. reliability

Example: C++ pointers are powerful and very flexible but are unreliable

Influences on Language Design Program Design Methodologies

New software development methodologies (e.g., object-oriented software development) led to new programming paradigms and by extension, new programming languages

Programming Methodologies Influences Middle 1980s

Object-oriented programming -Data abstraction + inheritance + polymorphism

Programming Methodologies Influences Late 1960s

People efficiency became important; readability, better control structures -structured programming -top-down design and step-wise refinement

Programming Methodologies Influences Late 1970

Process-oriented to data-oriented -data abstraction

Programming Methodologies Influences: 1950s and early 1960

Simple applications; worry about machine efficiency

Well-known computer architecture:

Von Neumann

Fetch-execute-cycle (on a von Neumann architecture computer)

initialize the program counter repeat forever fetch the instruction pointed by the counter increment the counter decode the instruction execute the instruction end repeat

Basis for imperative languages

•Variables model memory cells •Assignment statements model piping •Iteration is efficient


Kaugnay na mga set ng pag-aaral

Chapter 15 Microbial Mechanisms of Pathogenicity

View Set

NU471 HESI Comprehensive Practice Test 1: HESI Exit Practice Test 1 - 125 questions

View Set

The Mongols/Ruled by Genghis Khan (A.D.1206- A.D. 1227)

View Set

Communication Process and Styles

View Set