1/39
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
john von neumann
proposed computers be permanently hardwired with a small set of general operations
1940
programming language
concept for communicating WHAT we want a computer to do
assembly language
set of mnemonic symbols for instruction codes and memory locations
ex: LD R1, FIRST
assembler
program that translates assembly language code to binary machine code
loader
program that loads machine code into computer memory
fortran, formula translation language
__ __ __ popular with scientists/engineers due to its support for algebraic notation and floating numbers
algol
language that provided standard notation for computer scientists to publish algorithms in journals
1960
first language to receive a formal definition, including a grammar
achieve machine independence by requiring an ___ compiler with each type of hardware
compiler
translates programming language statements into machine code
data abstraction
simplifies the behavior and attributes of data for humans
control abstraction
simplifies the properties of the transfer of control
interpreter
directly executes instructions without converting them into machine code
semantics
meaning of a language
describes the effects of executing the code
syntax
similar to the grammar of a natural language; structure
basic data abstraction
hides internal representation of data values
structured data abstraction
groups components from basic data abstractions into a unit
unit data abstraction
data values and the operations that act on those values
provide reusability
usage of classes
basic control abstraction
statements that combine machine instructions into an abstract statement easier to understand
a = b + c, x += 10
structured control abstraction
grouping instructions into blocks of codes
unit control abstraction
standalone collection of procedures
threads, processes, tasks
efficiency
effectiveness in which resources (time, space, memory) are utilized in algorithms and programming
regularity
how well the features of a language are integrated
greater when:
fewer restrictions on use of particular constructs
fewer strange interactions between constructs
fewer surprises in general in the language
helps make programs more readable and maintainable
generality
achieved by avoiding special cases in the availability or use of constructs, and by combining closely related constructs into a single more general one
in c++, you cannot directly compare 2 structures with ==
orthogonality
constructs can be combined in any way, with no unexpected restriction or behaviors
example: function return types
pascal only allows scalar or pointer types as return values
c and c++ allow values of all data types except array types
ada and python allow all data types
uniformity
the consistency of appearance or behavior of language constructs
programmer efficiency
how quickly and easily a person can read and write in a programming language
execution efficiency
primary design criterion; amount of computational resources used by the algorithm
language success
achieves the goals of the designer
attains widespread use in an application area
serves as model for other languages that are successful
principle of least astonishment
languages that satisfy the criterion of regularity are said to adhere to this
prime concerns of early language design
program speed and memory usage
function
a rule that associates to each x from set of X of values a unique y from a set Y of values
domain
the set of X
range
the set of Y
independent variable
the x in f(x), representing any value from the set X
dependent variable
the y from the set Y, defined by y=f(x)
functional programming
provide a uniform view of programs as function, and treat them as data
simpler semantics and model of computation
referential transparency
a function given the same input will always produce the same output without causing any side effects
example:
def add(a, b):
return a + b
first-class data value
functions can be computed by other functions or parameters to other functions
tail recursion
when the recursive steps are the last steps in any function
delayed evaluation
in languages with an applicative order evaluation rule, all parameters to user-defined functions are evaluated at the time of a call
value semantics
names are only associated to values, not memory locations
when you pass a variable to a function, it passes a copy of the value, not the reference to the value