Cards (10)

  • Compilers
    Translate code into a form that can be executed, but do not execute the code
  • Compiled code

    Executable code in a form that cannot be read by a human or readily reverse-engineered
  • Most commercial software applications are distributed as compiled code so that the source code is protected. This is advantageous for commercial developers who make money from their code.
  • Compiler
    1. Takes the source code as its set of instructions
    2. Puts the source code through a series of processes to produce executable code
  • Stages of compilation
    • Lexical analysis
    • Syntax analysis
    • Semantic analysis
    • Code generation
    • Optimisation
  • A disadvantage of compilation is that any compilation errors are reported at the end of the compilation process. This is a disadvantage for large programs, as errors may be interlinked.
  • If any errors are found, the program will need to be rectified and then compiled again; this process is repeated until the program is free from errors
  • When the program has successfully compiled, the executable file will not need to be translated again (unless the source code is changed)
  • Advantage of compiled code
    Faster running times, as no further translation is required
  • Advantage of using a compiler
    The user does not need a translator (i.e. interpreter) to be installed on their computer