4080 Midterm

5.0(3)
studied byStudied by 125 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/61

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

62 Terms

1
New cards
simplicity
language with a minimal set of features, with rules on how to apply them and combine them as simply and clearly as possible
2
New cards
orthogonality
the way different constructs can be combine, and how simple these combinations are to understand
3
New cards
level of abstraction
the features provided to create abstractions (C\=simple with low lv of ab. while Java\=not simple with high lv of ab)
4
New cards
portability
to what degree can the program created in the language be moved from one system to another
5
New cards
cost
cost of using the language in a project (development, compilation, maintenance, execution)
6
New cards
expressivity
how easy it is to come up with different solutions to a problem
7
New cards
von neuman architecture
most common form of computer architecture on modern machines
8
New cards
compiler
take source code and turn it into machine code
9
New cards
interpreter
program that takes source code and executes it
10
New cards
virtual machine
code is compiled into byte code (instructions are sent to a simulated computer)
11
New cards
syntax
how we create the program
12
New cards
lexicon
alphabet, rules for names, reserved words, case sensitive
13
New cards
grammar
rules to create valid sentences
14
New cards
semantics
the meaning of what is used to create the program
15
New cards
variable
a name of a memory location of a particular data type that can be destructively updated
16
New cards
binding
connection between a name and a property
17
New cards
memory binding
(memory allocation) process of reserving and associating with a name
18
New cards
static memory allocation
memory is allocated before execution by the compiler (fast runtime)
19
New cards
dynamic memory allocation
memory is allocated while program is running (overhead when finding memory during runtime)
20
New cards
process memory block
stack/heap/data/text
21
New cards
type binding
association of a name to a type (lexical/syntactic/semantic/translation/optimization/transcription)
22
New cards
static typing
name are assigned a type before the program is run
23
New cards
dynamic typing
name is assigned a type while the program is running
24
New cards
explicit vs implicit typing
if the language requires the use of a syntactic feature to specify the type then the language is explicit
25
New cards
scope bind
process of associating a name with he a scope
26
New cards
scope
region/block area in the code where names are visible
27
New cards
static scope
(lexical scoping) the scope of a name is defines while the code is being written with lexical features
28
New cards
dynamic scoping
visibility of names is determined during run time by looking at the stack activation records.
29
New cards
symbol table
symbol/l-value: value of the memory location that will hold the variable you want to store/r-value: actual value you want to store
30
New cards
expression
sequence of symbols that yields a value (arithmetic / boolean)
31
New cards
arithmetic expression
deals with numbers
32
New cards
boolean expression
deals with relational and logical expressions
33
New cards
operator
a syntactic feature in a language that represents a function that takes input and produces a value
34
New cards
unary
deals with 1 operand ex: !
35
New cards
binary
deals with 2 operands
36
New cards
ternary
deals with 3 operands ex: ?
37
New cards
N-ary
deals with N amount of operands
38
New cards
prefix
operator is place before the operands ex: + 3 4
39
New cards
infix
operator is place between the operands ex: 3 + 4
40
New cards
suffix
operator is place after the operands ex: x++
41
New cards
type
the … of a name is a property that describes the nature of the data associated with the name, and how it should be handled
42
New cards
primitive type
part of the definition of the language, not made of other types, atomic (int, float, char, bool)
43
New cards
user defined type
a type created by a user, mechanism used to create this type is high complexity can go from simple enumeration to abstract data types ADT
44
New cards
arithmetic expression
any expression that yields a numerical type ( + , - , */ , ** , % )*
45
New cards
order of evaluation
in what order are operands evaluated L>R or R>L
46
New cards
precedence
a mechanism to sort ambiguous expressions by creating hierarchy of operands where the position of the hierarchy determines the relative binding strength of the operator (1. expo 2. mod 3. mul/dif 4. add/sub)
47
New cards
parentheses
if order of evaluation and precedence yields an expression with semantics different from desired, this can be used to override and impose a particular order of operation
48
New cards
side effect
an expression is said to be … free (aka pure) if the evaluation results in visual change (destructive update) in memory
49
New cards
referential transparency
if substitution if the expression but the value it yields results in a program with the same semantics then it is…
50
New cards
overloading of operands
if the operand performs more than one function depending on the type ex: in java, + can be used: (int + int)addition or (str + str)concatenation
51
New cards
type conversion
when a program requires to convert a numerical type into another
52
New cards
type coercion
conversion is implicit / automatic
53
New cards
casting
(explicit type coercion) conversion is explicit and performed with syntactic features from the language
54
New cards
mixed-mode expression
an expression where then is more than one type of operand
55
New cards
overflow
when an arithmetic expression results in a number greater than the maximum representable number in the current data format
56
New cards
underflow
occurs then a floating point operation results in a number that is less than the minimum representable number (mantissa + exponent)
57
New cards
relational expression
greater than, less than, equal to, not equal to
58
New cards
logical expression
and, or, not , implication
59
New cards
short-circuit evaluation
lazy evaluation which given a logical operation, if the evaluation of the first operand is enough to determine the value , then the second operand is not evaluated
60
New cards
string
a sequence of characters usually enclosed by some syntactical delimiters ex: “ “

implementation:

* array: fixed size
* linked list: slow access to characters
61
New cards
mutability
when it is possible to change string length and content
62
New cards
arrays
simplest data structure in most imperative languages and are indexed sequence of elements on the same type

* allocated in contiguous blocks of memory
* once located, size can not be modified