CPSC 3520

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

1/119

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:11 PM on 9/21/23
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

120 Terms

1
New cards

Moore's Law

Stated 1965 by Gordon Moore, computer hardware doubles in performance every 18 months (factor of 100 every 10 years). No corollary for software. Postulates doubling computer hardware every 18 months.

2
New cards

Babbage Difference Engine

Digital device operated on discrete digits. Early mechanical computer

3
New cards

ENIAC

First programmable general-purpose electronic digital computer. Early tube-based computer.

4
New cards

Program

A syntactically and semantically correct string from a language.

5
New cards

Programming Language

Notational system for human-machine interaction

6
New cards

Formal Grammar

Rules defining syntax

7
New cards

Alphabet

The list of symbols that can be used to form words and sentences

8
New cards

Generative

Mode of using grammar where the grammar is used to create a string of terminal symbols using P; a sentence in the language of the grammar is thus generated.

9
New cards

Analytic

Mode of using grammar where given a sentence together with the specification of G, one seeks to determine if the sentence was generated by G and if so, the structure of the sentence

10
New cards

G(Vt,Vn,S,P). What is Vt?

a set of terminal or primitive symbols, these are the elemental 'building blocks' of the grammar

11
New cards

G(Vt,Vn,S,P). What is Vn?

a set of non-terminal symbols or variables which are used as intermediate quantities in the generation of an outcome consisting solely of terminal symbols

12
New cards

G(Vt,Vn,S,P). What is P?

a set of productions which govern how strings may be formed, gives grammar its 'structure'

13
New cards

G(Vt,Vn,S,P). What is S?

a starting symbol

14
New cards

L(G)

Language generated by grammar G, is the set of all strings which satisfy that each string consists solely of terminal symbols from Vt of G and each string was produced from S using P of G

15
New cards

V*

is denoted the closure set of V and V+ = V* - {E} is often called the positive closure of V

16
New cards

T0 Language

all grammars, all touring computable languages

17
New cards

T1 Language

context sensitive grammars (CSG)

18
New cards

T2 Language

context free grammars (CFG), push-down automata

19
New cards

T3 Language

regular grammars, finite-state automata

20
New cards

Context-sensitive language

restricts productions to ααiβ → αβiβ, meaning βi replaces αi in the context of α and β where α, β ∈ (VN ∪ VT )∗ , αi ∈ VN and βi ∈ (VN ∪ VT )∗ − {#}

21
New cards

Context-free language

production restrictions are α1 = S1 ∈ VN, |S1| ≤ |β2|

22
New cards

Regular Language

productions are of the form a -> by where Where a is an element of VN, b is an element of VT and g is an element of VN U

23
New cards

Finite State Automata

machine that has a finite set of states, a set of transitions between states, and input tape and an output tape. The machine reads one symbol (which is then discarded) each cycle from the input tape. The symbol read is used with the current state to decide what state to go to next, and a single symbol is written to the output tape. Neither tape can be read ahead or behind the current position on the tape.

24
New cards

Push-down automata

Includes all of the same features as a finite state automata, plus a stack structure. In each cycle, in addition reading, writing, and changing state, the machine can either push or pop symbols onto or off of the stack. There is not normally any ability to peek at the stack, though in some compiler implementations the ability to peek at the stack and look ahead in the input affords some degree of optimization.

25
New cards

Regular Expression

are a shorthand notation for describing the strings from regular languages, and thus the languages themselves

26
New cards

Atom: A symbol from the alphabet is a RE: a

Represents matching the symbol

27
New cards

Concatenation: two RE adjacent to one another is a RE: ab

Represents one RE followed by the other RE

28
New cards

Alternation: two RE separated by a vertical line is a RE: a|b

Represents selection of one RE or the other RE

29
New cards

Kleene star: an RE followed by an asterisk is a RE: a*

Represents zero or more copies of the RE

30
New cards

Parenthesization: a RE in parenthesis is a RE: (a)

Represents grouping and scope for other operators

31
New cards

Lexical

structure that indicates the constraints on the tokens, or lexical units, which define the basic "words" or (multi-symbol) terminals of the language.

32
New cards

Syntax

Defines how tokens are combined into sentences

33
New cards

Semantics

Defines the logical meaning of sentences

34
New cards

Parser

A grammatical recognizer. Parsing is to see if the string of tokens is derivable according to the non-lexical syntax of the language

35
New cards

Scanner

Scanning is used to see if we can recognize all terminals in the program.

36
New cards

Top-down parse

Filling the interior of the tree from the top down (from the root of the tree)

37
New cards

Bottom-up parse

Working from the bottom up (begin with the terminal symbols)

38
New cards

Imperative Language

Composed of step-by-step instructions for the computer. C or Java (aka procedural programming)

39
New cards

Declarative Language

The desired result is described directly (Prolog)

40
New cards

Functional Language

Have a mathematical style. Applies functions to arguments (ML)

41
New cards

Rule-Based Language

Programs are composed by a set of rules.

42
New cards

Event-driven language

Entities (objects, services, etc) communicate indirectly by sending messages to one another through an intermediary

43
New cards

Parallel Language

Either uses message passing to communicate or manipulates shared memory variables

44
New cards

What does BNF stand for?

Backus Naur Form

45
New cards

What is BNF?

A language for writing programming language grammars

46
New cards

What does CFL stand for?

Context Free Language

47
New cards

What is CFL?

A language generated by a context-free grammar and gets accepted by a pushdown automata

48
New cards

What does CNF stand for?

Chomsky Normal Form

49
New cards

What is CNF?

Each production of G must be in either A -> BC or A -> a form

50
New cards

What does CYK stand for?

Cocke-Younger-Kasami

51
New cards

What is CYK?

A parsing approach which will parse string x in a number of steps proportional to |x|^3. Requires the CFG to by in CNF.

52
New cards

Dynamic programming

Breaking down an optimization problem into simpler sub-problems and storing the solution to each sub-problem so that each one is only solved once

53
New cards

Token

Lexical units which define the basic "words" or multi-symbol terminals of the language (aka basic component of source code e.g. operators, constants, etc.)

54
New cards

Terminal

(A) Primitive symbols. Elementary symbols of the language defined as a part of a formal grammar

55
New cards

Non-terminal

(letter) are replaced by groups of terminal symbols according to the production rules.

56
New cards

Identifier

A name for a variable or type

57
New cards

Reserved Word

Cannot be used an an identifier (int)

58
New cards

Expression

Syntatic entity in a programming language that may be evaluated to determine its value

59
New cards

Conditional

if statements

60
New cards

Production

rules that govern how strings may be formed

61
New cards
Moore's Law
Stated 1965 by Gordon Moore, computer hardware doubles in performance every 18 months (factor of 100 every 10 years). No corollary for software. Postulates doubling computer hardware every 18 months.
62
New cards
Babbage Difference Engine
Digital device operated on discrete digits. Early mechanical computer
63
New cards
ENIAC
First programmable general-purpose electronic digital computer. Early tube-based computer.
64
New cards
Program
A syntactically and semantically correct string from a language.
65
New cards
Programming Language
Notational system for human-machine interaction
66
New cards
Formal Grammar
Rules defining syntax
67
New cards
Alphabet
The list of symbols that can be used to form words and sentences
68
New cards
Generative
Mode of using grammar where the grammar is used to create a string of terminal symbols using P; a sentence in the language of the grammar is thus generated.
69
New cards
Analytic
Mode of using grammar where given a sentence together with the specification of G, one seeks to determine if the sentence was generated by G and if so, the structure of the sentence
70
New cards
G(Vt,Vn,S,P). What is Vt?
a set of terminal or primitive symbols, these are the elemental 'building blocks' of the grammar
71
New cards
G(Vt,Vn,S,P). What is Vn?
a set of non-terminal symbols or variables which are used as intermediate quantities in the generation of an outcome consisting solely of terminal symbols
72
New cards
G(Vt,Vn,S,P). What is P?
a set of productions which govern how strings may be formed, gives grammar its 'structure'
73
New cards
G(Vt,Vn,S,P). What is S?
a starting symbol
74
New cards
L(G)
Language generated by grammar G, is the set of all strings which satisfy that each string consists solely of terminal symbols from Vt of G and each string was produced from S using P of G
75
New cards
V*
is denoted the closure set of V and V+ = V* - {E} is often called the positive closure of V
76
New cards
T0 Language
all grammars, all touring computable languages
77
New cards
T1 Language
context sensitive grammars (CSG)
78
New cards
T2 Language
context free grammars (CFG), push-down automata
79
New cards
T3 Language
regular grammars, finite-state automata
80
New cards
Context-sensitive language
restricts productions to ααiβ → αβiβ, meaning βi replaces αi in the context of α and β where α, β ∈ (VN ∪ VT )∗ , αi ∈ VN and βi ∈ (VN ∪ VT )∗ − {#}
81
New cards
Context-free language
production restrictions are α1 = S1 ∈ VN, |S1| ≤ |β2|
82
New cards
Regular Language
productions are of the form a -> by where Where a is an element of VN, b is an element of VT and g is an element of VN U
83
New cards
Finite State Automata
machine that has a finite set of states, a set of transitions between states, and input tape and an output tape. The machine reads one symbol (which is then discarded) each cycle from the input tape. The symbol read is used with the current state to decide what state to go to next, and a single symbol is written to the output tape. Neither tape can be read ahead or behind the current position on the tape.
84
New cards
Push-down automata
Includes all of the same features as a finite state automata, plus a stack structure. In each cycle, in addition reading, writing, and changing state, the machine can either push or pop symbols onto or off of the stack. There is not normally any ability to peek at the stack, though in some compiler implementations the ability to peek at the stack and look ahead in the input affords some degree of optimization.
85
New cards
Regular Expression
are a shorthand notation for describing the strings from regular languages, and thus the languages themselves
86
New cards
Atom: A symbol from the alphabet is a RE: a
Represents matching the symbol
87
New cards
Concatenation: two RE adjacent to one another is a RE: ab
Represents one RE followed by the other RE
88
New cards
Alternation: two RE separated by a vertical line is a RE: a|b
Represents selection of one RE or the other RE
89
New cards
Kleene star: an RE followed by an asterisk is a RE: a*
Represents zero or more copies of the RE
90
New cards
Parenthesization: a RE in parenthesis is a RE: (a)
Represents grouping and scope for other operators
91
New cards
Lexical
structure that indicates the constraints on the tokens, or lexical units, which define the basic "words" or (multi-symbol) terminals of the language.
92
New cards
Syntax
Defines how tokens are combined into sentences
93
New cards
Semantics
Defines the logical meaning of sentences
94
New cards
Parser
A grammatical recognizer. Parsing is to see if the string of tokens is derivable according to the non-lexical syntax of the language
95
New cards
Scanner
Scanning is used to see if we can recognize all terminals in the program.
96
New cards
Top-down parse
Filling the interior of the tree from the top down (from the root of the tree)
97
New cards
Bottom-up parse
Working from the bottom up (begin with the terminal symbols)
98
New cards
Imperative Language
Composed of step-by-step instructions for the computer. C or Java (aka procedural programming)
99
New cards
Declarative Language
The desired result is described directly (Prolog)
100
New cards
Functional Language
Have a mathematical style. Applies functions to arguments (ML)