4080 Midterm

studied byStudied by 103 people
5.0(3)
get a hint
hint

simplicity

1 / 61

Studying Progress

0%
New cards
62
Still learning
0
Almost done
0
Mastered
0
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

New cards
2
New cards

orthogonality

the way different constructs can be combine, and how simple these combinations are to understand

New cards
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)

New cards
4
New cards

portability

to what degree can the program created in the language be moved from one system to another

New cards
5
New cards

cost

cost of using the language in a project (development, compilation, maintenance, execution)

New cards
6
New cards

expressivity

how easy it is to come up with different solutions to a problem

New cards
7
New cards

von neuman architecture

most common form of computer architecture on modern machines

New cards
8
New cards

compiler

take source code and turn it into machine code

New cards
9
New cards

interpreter

program that takes source code and executes it

New cards
10
New cards

virtual machine

code is compiled into byte code (instructions are sent to a simulated computer)

New cards
11
New cards

syntax

how we create the program

New cards
12
New cards

lexicon

alphabet, rules for names, reserved words, case sensitive

New cards
13
New cards

grammar

rules to create valid sentences

New cards
14
New cards

semantics

the meaning of what is used to create the program

New cards
15
New cards

variable

a name of a memory location of a particular data type that can be destructively updated

New cards
16
New cards

binding

connection between a name and a property

New cards
17
New cards

memory binding

(memory allocation) process of reserving and associating with a name

New cards
18
New cards

static memory allocation

memory is allocated before execution by the compiler (fast runtime)

New cards
19
New cards

dynamic memory allocation

memory is allocated while program is running (overhead when finding memory during runtime)

New cards
20
New cards

process memory block

stack/heap/data/text

New cards
21
New cards

type binding

association of a name to a type (lexical/syntactic/semantic/translation/optimization/transcription)

New cards
22
New cards

static typing

name are assigned a type before the program is run

New cards
23
New cards

dynamic typing

name is assigned a type while the program is running

New cards
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

New cards
25
New cards

scope bind

process of associating a name with he a scope

New cards
26
New cards

scope

region/block area in the code where names are visible

New cards
27
New cards

static scope

(lexical scoping) the scope of a name is defines while the code is being written with lexical features

New cards
28
New cards

dynamic scoping

visibility of names is determined during run time by looking at the stack activation records.

New cards
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

New cards
30
New cards

expression

sequence of symbols that yields a value (arithmetic / boolean)

New cards
31
New cards

arithmetic expression

deals with numbers

New cards
32
New cards

boolean expression

deals with relational and logical expressions

New cards
33
New cards

operator

a syntactic feature in a language that represents a function that takes input and produces a value

New cards
34
New cards

unary

deals with 1 operand ex: !

New cards
35
New cards

binary

deals with 2 operands

New cards
36
New cards

ternary

deals with 3 operands ex: ?

New cards
37
New cards

N-ary

deals with N amount of operands

New cards
38
New cards

prefix

operator is place before the operands ex: + 3 4

New cards
39
New cards

infix

operator is place between the operands ex: 3 + 4

New cards
40
New cards

suffix

operator is place after the operands ex: x++

New cards
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

New cards
42
New cards

primitive type

part of the definition of the language, not made of other types, atomic (int, float, char, bool)

New cards
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

New cards
44
New cards

arithmetic expression

any expression that yields a numerical type ( + , - , / , ** , % )

New cards
45
New cards

order of evaluation

in what order are operands evaluated L>R or R>L

New cards
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)

New cards
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

New cards
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

New cards
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…

New cards
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

New cards
51
New cards

type conversion

when a program requires to convert a numerical type into another

New cards
52
New cards

type coercion

conversion is implicit / automatic

New cards
53
New cards

casting

(explicit type coercion) conversion is explicit and performed with syntactic features from the language

New cards
54
New cards

mixed-mode expression

an expression where then is more than one type of operand

New cards
55
New cards

overflow

when an arithmetic expression results in a number greater than the maximum representable number in the current data format

New cards
56
New cards

underflow

occurs then a floating point operation results in a number that is less than the minimum representable number (mantissa + exponent)

New cards
57
New cards

relational expression

greater than, less than, equal to, not equal to

New cards
58
New cards

logical expression

and, or, not , implication

New cards
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

New cards
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

New cards
61
New cards

mutability

when it is possible to change string length and content

New cards
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

New cards

Explore top notes

note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 228 people
Updated ... ago
5.0 Stars(3)
note Note
studied byStudied by 5263 people
Updated ... ago
4.8 Stars(43)
note Note
studied byStudied by 50 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 199 people
Updated ... ago
5.0 Stars(2)

Explore top flashcards

flashcards Flashcard49 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard45 terms
studied byStudied by 128 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard70 terms
studied byStudied by 36 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard49 terms
studied byStudied by 139 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard49 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard61 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard34 terms
studied byStudied by 60 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard44 terms
studied byStudied by 26 people
Updated ... ago
4.0 Stars(1)