lecture four: compiling, testing, and naming Flashcards
(53 cards)
What is Step 1 in the process?
Preprocessing,
What are the two main activities in Step 2: Compilation?
Lexical analysis and parsing
These activities are essential for converting source code into a format suitable for execution.
What does Step 3: Linking involve?
Combines compilation units and libraries, generates executable
Linking is the final step that creates an executable program from the compiled code.
Fill in the blank: Step 1 includes _______.
preprocessor commands
Preprocessor commands are directives that instruct the compiler to perform specific actions before actual compilation.
True or False: Step 2 involves generating executable code.
False
Step 2 focuses on lexical analysis and parsing, not on generating executable code.
What is generated in Step 3?
Executable
The executable is the final output that can be run on a computer.
What is the purpose of Lexical Analysis?
Finds tokens (names, symbols) and builds Symbol Table
What does Syntactic Analysis accomplish?
Parses code using grammar and builds Abstract Syntax Tree (AST)
What does Semantic Analysis involve?
Type resolution and semantics
What types of errors can be generated during analysis?
Syntax errors and warnings
What is generated after Semantic Analysis?
Intermediate Representation (LLVM IR)
Is Intermediate Representation platform dependent or independent?
Platform independent
What is the role of the Preprocessor?
Includes .hpp files, evaluates #ifndef, #define, and instantiates templates
Is the Preprocessor platform dependent or independent?
Platform independent
At what level is optimization typically done?
IR level
What does Code Generation convert IR into?
Platform specific assembler
What does the assembler convert to after Code Generation?
Machine code
Is Code Generation platform dependent or independent?
Platform dependent
What is the purpose of Linking?
Links all the separate object files and associated libraries, and creates an executable file
What can occur during the Linking process?
Linker errors
What does Execution involve?
Loader reads exe from disk and loads into memory, CPU executes each machine instruction
What types of errors can occur during Execution?
Runtime errors
What is the objective of software testing?
To cause failures to find faults/errors in the system
Define a Failure in the context of software testing.
An incorrect output for a given input