Intro to Program Vis Flashcards

1
Q

Identify the 2 kinds of abstractions

A

Data abstraction: info in a program

Control abstraction: what’s happening in a program (execution)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Identify the 3 levels of abstraction

A

Basic: hardware
Structured: global (???)
Unit: big things (files)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Examples of basic, control abstraction

A

assign, add

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Examples of basic, data abstraction

A

integer, float

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Examples of structured, control abstraction

A

subroutines, idioms, code blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Examples of structured, data abstractions

A

data structures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Examples of unit, control abstractions

A

objects (as behaviour), filters, aspect patterns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Examples of unit, data abstractions

A

objects (as data), files, modules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Examples of meta properties

A
authors
diffs
version history
file size
code quality
comments
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Examples of static properties

A

calls and assignments that COULD be made (present in the code itself)
# lines of code
types (in a typed language)
program dependence (which objects depend on which other objects)
metrics: cohesion, coupling, complexity
text itself, including comments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Examples of analysis you can do with static properties

A
call graphs
control flow graphs
data flow graphs
architectural conformance checks
pattern finding
reachability
keyword tagging
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Examples of dynamic properties

A
runtime behaviour
emergent properties of the code
threads
memory usage
the stack
performance
dynamic types
symbol table entries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Examples of analysis you can do with dynamic properties

A
bounds checking
code coverage
memory overrun
types
invariant detection
object allocation on stack
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Lexical analysis: what is

A
  • looks at presence or absence of stuff
  • can use regex
  • doesn’t look at syntax at all
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Lexical analysis: good for…?

A
  • meta properties
  • pattern recognition
  • keywords
  • comments
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Syntactic analysis: what is

A
  • identification of structure: patterns and idioms
  • checks that involve contextual information
  • can be used for grammar & conformance checking
  • requires AST-like structure
17
Q

Syntactic analysis: good for…?

A
  • code hierarchy information: class hierarchy, method call relationships, def-use chains
18
Q

Semantic analysis: what is

A

identification of meaning

requires symbol table => either a running system or a hand-run system

19
Q

Semantic analysis: good for…?

A
  • type checking
  • object binding
  • definite assignment