Errors and Debugging Flashcards
Define
Lexical Analysis
The program looks at each word, and matches each to a token in the lexicon. The output of this is called the lexeme
Define
Syntactical Analysis
The lexeme is checked, ensuring that it is in the right order. This checks that the code can be run, flagging issues like missing commas.
Define
Lexical error
Occurs when a sequence of characters does not match the pattern of any token, and typically happens during the execution of a program.
Define
Syntax error
Incorrect use of the language itself, like missing a comma or a quotation mark, or misspelling a word.
Define
Logic error
The code runs, but doesn’t do so as intended - it isn’t doing what you wanted it to do
Define
Runtime error
An error that occurs while the program is running after being successfully compiled.
Define
Module Testing
Testing a module independantly, isolated from the rest of the system.
Define
Program Testing
Making sure the ‘pieces’ of the software work together, the interfaces between them work, and the program can interact with other systems, like hardware and operating systems.
Define
System Testing
Testing the whole system.
Define
Prototype
An enactable model or mock-up of a software system that enables evaluation of features and functions in an operational scenario.
Define
Reverse engineering
The process of examining a system to find out how it works and create something similar or work on it further.
Define
Stubs
A small routine that takes the place of a yet to be written subroutine or is substituted for an existing subroutine when attempting to locate the cause of an error. Stubs allow for the flow of execution to be checked before lower level subroutines are coded. They can also be used to temporarily replace subroutines when attempting to locate the source of an error.
Define
Flags
A Boolean variable used to check if a section of code has been executed. The flag is initialized to false and the set to true if the section of code is executed. By examining the value of the flag, the programmer can determine the execution path through the code. Knowing the execution path is of great assistance when diagnosing the source of bugs. Often a flag will be used to confirm that a particular condition has been met.
Define
Bug
An error in a program that causes it to malfunction.
Define
Debugging Output Statements
Processes that can be strategically placed within the code to indicate execution has passed through that point. They can also be used to display the contents of variables at particular points in the code. These statements are removed once source code has been tested and the bugs removed.