5.2. Language Translators Flashcards
1
Q
Assembler
A
- Software that translates assembly language
statements into machine code (binary) for execution - The mnemonics used translates into machine
opcodes - Process simple because assembly language has a oneto-one relationship with machine code.
2
Q
Compiler
A
- Translates a high-level
language program to
machine code. - Creates a .exe file which can
be easily distributed. - Once compiled, .exe file does
not need to be compiled
again, resulting in faster
execution. - Reports all errors at the end
of compilation: difficult to
locate errors∴ development
process long. - Only be produced when all
errors are fixed. - Used when development is
completed.
3
Q
Interpreter
A
- Translates and executes a
high-level language program,
line-by-line. - No .exe file created.
- Execution very slow –
translated each time program
run. - Debugging easier/faster,
since it stops translating
when it reaches an error. This
allows real time error
correction. - Can run program any time,
even before code finished. - Used during development
4
Q
Two-step translation
A
- Java and some other high level language programs
may require two-step translation, i.e., they will be partially compiled and partially interpreted - Java code first translated to bytecode by Java compiler
- Bytecode finally interpreted by the Java Virtual
Machine to produce machine code
5
Q
Integrated Development Environment (IDE) features
A
Coding, Initial Error Detection, Presentation, Debugging
6
Q
Coding
A
- Context-sensitive prompts: Displays choice of
keywords and available identifiers appropriate at
current insertion point and provides choices in
alphabetical order - Highlights undeclared/unassigned variable
identifiers
7
Q
Initial Error Detection
A
- Dynamic syntax checks: Automatic checking and
highlighting of syntax errors, as soon as line typed - Type checking & parameter checking
8
Q
Presentation
A
- Prettyprint: Automatic indentation and colorcoding of keywords
- Expand and Collapse code blocks: Saves excessive
scrolling if collapsed, and easy to see global
variable declarations and main program body
when collapsed
9
Q
Debugging
A
- Single stepping: Executes program line-by-line to
see the effect of each statement on variables - Breakpoints: Pauses program at a specific line to
ensure program operates correctly up to that line - Variables/expressions Report Window: Monitors
variables for comparing values.