Programming Languages Big Review

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/60

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:28 AM on 10/14/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

61 Terms

1
New cards

Six reasons to study programming language concepts

Increased ability to express ideas; improved background for choosing appropriate languages; increased ability to learn new languages; better understanding of the significance of implementation; better use of languages already known; overall advancement of computing.

2
New cards

Scientific domain needs and representative language

Large numbers of floating-point computations, arrays | Fortran

3
New cards

Business domain needs and representative language

Reports, decimal numbers, characters | COBOL

4
New cards

Artificial Intelligence domain needs and representative language

Symbols rather than numbers, linked lists | LISP

5
New cards

Systems domain needs and representative language

Efficiency, because of continuous use | C

6
New cards

Web software domain needs and representative language

Eclectic mix: markup, scripting, general purpose | HTML, PHP, Java

7
New cards

The four principal language evaluation criteria

Readability, writability, reliability, cost

8
New cards

Readability factors

Overall simplicity (manageable feature set, minimal feature multiplicity, minimal operator overloading), orthogonality, data types, syntax considerations

9
New cards

Writability factors

Simplicity and orthogonality, support for abstraction, expressivity

10
New cards

Reliability factors

Type checking, exception handling, aliasing, readability and writability

11
New cards

Cost factors

Training programmers, writing programs, executing programs, reliability, maintaining programs

12
New cards

Von Neumann Architecture

Data and programs stored in memory, memory separate from CPU, instructions and data piped from memory to CPU

13
New cards

Von Neumann Bottleneck

The memory-processor connection speed is the primary limiting factor in computer speed

14
New cards

Fetch-execute cycle

Initialize the program counter, then repeat forever: fetch instruction pointed by counter, increment counter, decode instruction, execute instruction

15
New cards

Four language categories

Imperative, Functional, Logic, Markup/programming hybrid

16
New cards

Reliability vs. Cost of Execution trade-off

Example: Java array bounds checks raise execution cost to improve reliability

17
New cards

Readability vs. Writability trade-off

Example: APL's powerful operators and new symbols are compact but hard to read

18
New cards

Writability/Flexibility vs. Reliability trade-off

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

19
New cards

Compilation phases (in order)

Lexical analysis (characters to lexical units), syntax analysis (lexical units to parse trees), semantic analysis (generate intermediate code), code generation (machine code)

20
New cards

Pure interpretation characteristics

No translation; easier implementation; 10 to 100 times slower than compiled programs; made a comeback with web scripting languages (JavaScript, PHP)

21
New cards

Hybrid implementation systems

Translate to an intermediate language that allows easy interpretation; faster than pure interpretation (e.g., Java byte code + JVM)

22
New cards

JIT (Just-in-Time) compilers

Translate to intermediate language, then compile subprograms into machine code when called; machine code kept for subsequent calls (delayed compilers)

23
New cards

Preprocessors

Process a program immediately before compilation to expand embedded macros (e.g., C preprocessor expands #include, #define)

24
New cards

Fortran I (1957) characteristics

First compiled high-level language; designed for IBM 704; scientific applications; machine efficiency most important; no dynamic storage

25
New cards

LISP characteristics

Designed by McCarthy for AI; data in lists rather than arrays; symbolic computation; atoms and lists; syntax based on lambda calculus

26
New cards

ALGOL 60 contributions

Block structure (local scope), two parameter-passing methods, subprogram recursion, stack-dynamic arrays; first machine-independent language; first language whose syntax was formally defined (BNF)

27
New cards

COBOL contributions

First macro facility in a high-level language, hierarchical data structures (records), nested selection, long names, separate data division

28
New cards

SIMULA 67 contributions

Designed for simulation based on ALGOL 60; introduced coroutines, classes, objects, and inheritance

29
New cards

Pascal (1971)

Designed by Wirth for teaching structured programming; small, simple; most widely used teaching language from mid-1970s to late 1990s

30
New cards

C (1972)

Developed by Dennis Ritchie at Bell Labs for systems programming; evolved from B, BCPL, and ALGOL 68; powerful operators, poor type checking; spread through UNIX

31
New cards

Smalltalk

Developed at Xerox PARC by Alan Kay; first full implementation of an object-oriented language (data abstraction, inheritance, dynamic binding); pioneered the GUI

32
New cards

C++ (1980)

Developed by Stroustrup; evolved from C and SIMULA 67; supports both procedural and object-oriented programming

33
New cards

Java (Early 1990s)

Developed by Sun for embedded devices; simplified C++ (no pointer arithmetic, references instead of pointers); portable via JVM and JIT

34
New cards

Prolog

Logic programming language based on formal logic; non-procedural; an intelligent database system that uses an inferencing process to query facts/rules

35
New cards

Ada

History's largest design effort; contributions include packages (data abstraction), exception handling, generic units, and concurrency tasking model

36
New cards

Syntax vs. Semantics

Syntax is the form or structure of expressions, statements, and program units; semantics is their meaning

37
New cards

Lexeme vs. Token

A lexeme is the lowest level syntactic unit of a language (e.g., sum, begin); a token is a category of lexemes (e.g., IDENT)

38
New cards

Recognizers vs. Generators

Recognizers read input strings and decide if they belong to a language (parsers); generators generate sentences of a language (grammars)

39
New cards

Backus-Naur Form (BNF)

Invented by John Backus to describe syntax of Algol 58; equivalent to context-free grammars; uses nonterminals and terminals with rules (LHS -> RHS)

40
New cards

Derivation & Sentential Form

A derivation is a repeated application of rules starting from the start symbol; every string of symbols in a derivation is a sentential form

41
New cards

Parse Tree

A hierarchical representation of a derivation

42
New cards

Grammar Ambiguity

A grammar is ambiguous if it generates a sentential form that has two or more distinct parse trees (fixed by encoding precedence and associativity)

43
New cards

EBNF Extensions

Brackets [ ] for optional parts, parentheses ( ) with vertical bars for alternatives, braces { } for repetitions (0 or more)

44
New cards

Attribute Grammar

A context-free grammar with added attribute values and evaluation functions/predicates; used for static semantics specification and compiler error checking

45
New cards

Synthesized vs. Inherited Attributes

Synthesized attributes are computed from child nodes (bottom-up); inherited attributes are computed from parent/sibling nodes (top-down)

46
New cards

Operational Semantics

Describes meaning by executing statements on a machine (simulated or actual); the change in the state of the machine defines the meaning

47
New cards

Denotational Semantics

Based on recursive function theory; defines mathematical objects for each language entity and functions mapping entities to those objects

48
New cards

Axiomatic Semantics

Based on formal logic (predicate calculus) and assertions ({P} statement {Q}); used for program verification and weakest preconditions

49
New cards

Weakest Precondition

The least restrictive precondition that guarantees the postcondition after a statement executes

50
New cards

Loop Invariant

A condition that is true before and after each iteration of a loop, used in axiomatic semantics to prove loop correctness

51
New cards

Lexical Analyzer (Lexer)

Low-level component based on a regular grammar / finite automaton; groups characters into lexemes and assigns tokens

52
New cards

Parser (Syntax Analyzer)

High-level component based on a context-free grammar / push-down automaton; builds parse trees and checks syntax

53
New cards

Top-Down Parsing

Builds parse tree from root down (leftmost derivation); examples include recursive-descent and LL parsers

54
New cards

Bottom-Up Parsing

Builds parse tree from leaves up (reverse of rightmost derivation); examples include LR parsers using handle pruning and shift-reduce

55
New cards

LL Grammar Disqualifiers

Left recursion and lack of pairwise disjointness (multiple RHSs sharing a FIRST set)

56
New cards

Handle

In bottom-up parsing, the specific right-hand side of a rule that matches the current sentential form and should be reduced next (leftmost simple phrase)

57
New cards

LR Parser Actions

Shift, Reduce, Accept, Error (driven by ACTION and GOTO tables)

58
New cards

PHP Characteristics

Weakly typed, interpreted server-side scripting language; C++-ish syntax; case-sensitive; uses $ for variables

59
New cards

PHP == vs ===

== checks value equality; === checks identical value and type (or same object in OOP)

60
New cards

PHP Prepared Statements

Used in database queries (e.g., prepare, bind_param, execute) to prevent SQL injection ("Bobby tables")

61
New cards

PHP require vs include

Both import code from another file; require halts execution with a fatal error if the file is missing, while include issues a warning and continues