PL Flashcards
primitive, composite data types
primitive: basic data types (int, float, boolean)
building blocks
directly stores values in memory
composite: (array, class, interface)
structures to build with
can store multiple values
integer types
signed: positive, negative, zero
more positive and negative values
int8..64
unsigned: only non-negative whole numbers
more positive values
uint8..64
memory usage: 8..64 bits
operations: basic arithmetic operations
enumeration types
enumeration types: usage, definition, implementation, benefits.
common derived types
common derived types: arrays, pointers, classes and structures.
compiler
compiler:
source,
front end(syntax analyzer, semantics analyzer),
intermediate code generator,
back end(mach ind optimizer, code generator, mach dep optimizer),
machine code.
loader
loader: loading, preparing and execution for files.
source program,
translator,
object modules,
linker,
binary program,
(loader, data)
binary program,
result.
implementation methods
implementation methods:
execution,
compilation,
interpretation,
hybrid.
code execution
code execution:
source code,
compiler,
object node, library,
linker,
executable program.
compiler architecture
compiler architecture:
source program,
lexical analyzer,
syntax analyzer,
semantics analyzer,
intermediate code generator,
code optimizer,
code generator,
target program.
front end vs back end
front end: checks if the program written correctly
back end: translation into assembly.
advantages of compiling:
advantages of compiling:
free from lexical errors,
free from syntax errors,
free from semantics errors,
even complex programs are fast,
risks reduced.
composite data types
composite data types: complex data structure.
character string, pointers, user defined data types, files.
structured data types
structured data types: create new data types and operations.
records, arrays, lists, sets.