Concepts of Programming Language Quiz 1
What does BASIC stand for? What were the main developing goals?
BASIC - Beginner's All purpose symbolic instruction code Goals: Easy for user not math or science major. Easy to read, write and develop.
LISP = LISt Processing Language
-AI research -Recursive data type: s-expression -Syntax based on lambda calculus -Pioneered functional programming -Status - still dominant language for AI
COmmon Business Oriented Language
-Based on FLOW - MATIC -Grace Murray Hopper developed FLOW-MATIC
Simula 1962-67
-Coroutines - a kind of subprogram -Classes (data plus methods) and objects -Inheritance -Dynamic binding
BASIC - Beginner's All purpose symbolic instruction code
-Designed by Kemeny & Kurtz at Dartmouth -Design goals: easy HW turnover, easy for non science people, free and secure, pleasant and friendly
Pascal (1971)
-Designed by Wirth ---Quit Algol 68 cinnuttee -Small, simple -Improved case statements -Widely used for teaching in 80s
FORTRAN = FORmula TRANslator
-Developed at IBM -Always among the most efficient compilers, producing fast code
What happened in the 1950's
-FORTRAN = FORmula TRANslator -COmmon Business Oriented Language -Contributions -COBOL -LISP = LISt Processing Language APL = A Programming Language
Contributions
-First language required by DoD -Banks used it -Long names (up to 30 characters) with hyphens -Data division
Everything wrong with machine code (1940)
-Poor readability -Poor modifiability -Expression coding tedious -Inherit deficiencies of hardware (no index/floating point numbers)
1949 Pseudocodes
-Possibly first attempt at higher level language -Aka SHORTCODE -ASCII -UNIVAC I and II -Expressions were coded left to right
What happened in the 1960's
-Simula 1962-67 -BASIC - Beginner's All purpose symbolic instruction code -Algol
What happened in the 1940's
-Von Neumann Architecture -ENIAC programed with patch cards -Everything wrong with machine code -1949 Pseudocodes
What happened in the 1970's
1971 -Pascal -Designed by Wirth -Quit Algol 68 cinnuttee -Small, simple -Improved case statements -Widely used for teaching in 80s 1972 C - Dennis Ritchie
Algol
Algol 58 features -Concept of type was formalized -Names could have any length -Arrays could have any number of subscripts -Parameters were separated by mode (in & out) -Subscripts were placed in brackets -Compound statements (begin ... end) -Semicolon as a statement separator -Assignment operator was := if had an else-if clause
List different implementation methods for programming languages and explains how each of them works. You can use either diagram or textual description to explain (8 points)... Hint: Direct execution by hardware os one of the these implementation methods
Direct execution by hardware e.g., native machine language Compilation to another language e.g., C compiled to Intel Pentium 4 native machine language Interpretation: direct execution by software e.g., csh, Lisp, Python, JavaScript Hybrid: compilation then interpretation Compilation to another language (aka bytecode), then interpreted by a 'virtual machine', e.g., Java, Perl Just-in-time compilation Dynamically compile some bytecode to native code (e.g., V8 JavaScript engine)
What are the three levels of computer languages? Please briefly describe them as well
High level - human readable Assembly - partial english Machine - binary (0's, 1's)
Briefly describe the four levels of Java access control for methods and variables?
Protected, private, public and default (powerpoint 2, slide 19)
What are the four major language evaluation criteria? Briefly describe them
Readability Writability Reliability Cost
List Programming Application Domains with examples
Scientific application- fortran Business Application - MySQL Systems Programming - GCC Scripting language Special purpose language
Draw a simple diagram (with notations) to demonstrate the Von Neumann Architecture
Secondary Storage | | RAM | | input device --- Cache --- output device
What are the BIG FOUR programming language paradigm? Please give an example of each.
a. Imperative or Procedural (fortran, C) b. Object - Oriented (smalltalk, java) c. Functional (Lisp, ML) d. Rule Based (Prolog, Jess)
What are the major drawbacks for the machine code that was developed in the 1940s?
•Poor readability •Poor modifiability •Expression coding was tedious •Inherit deficiencies of hardware, e.g., no indexing or floating point numbers