GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

1.8

Cj L Englisch

1.8

Inhalt der Mindmap

1.8

  1. Translation of code

    • A translator converts the source code/high level code into a low level code ready for execution
    • Assembler
      • A assembler program converts a program written in assembly language into machine code
    • Compiler
      • A compiler translates the entire high level programming language into machine code prior to execution
      • High level lines of code can translate to many different machine code commands, whereas one assembly line of code translates to one command in machine code.
      • Adv: Executable code executes faster
      • Compiled program can be re-run without further translation.
    • Interpreter
      • An interpreter converts high level language code one line at a time, into machine code.
      • Adv: Useful for debugging
      • Interpretation has to be repeated each time the program is run
  2. Compilation process

    • Lexical Analysis
      • Comments/spaces are removed
      • Keywords, constants and identifiers replaced by tokens
      • Symbol table is created holding the address of variables
        • Identifier and reserved word table produced
    • Syntax Analysis
      • Tokens checked to see if they match the spelling/grammar expected using standard language definitions
      • If syntax errors are found, error messages are produced
      • Uses BNF rules/ syntax diagrams
    • Semantic analysis
      • Variables are checked to ensure that they have been properly declared and used
      • Variables are checked to ensure they are of the correct data type
      • Operations checked to ensure they are legal for the type of variable being used (e.g. the result of an integer division is stored as an integer)
    • Code generation
      • Machine code is generated
      • A linker editor makes sure previously compiled libraries are loaded into the program at compilation
    • Code Optimisation
      • The code is improved if necessary to make it more efficient
    • Errors
      • Translation errors occur when source code is being compiled
        • Examples: Syntax errors, semantic errors
      • Execution errors occur when the program is running
        • Examples: Truncation error, logical error (negative number for age), rounding error

Bilder und Dateien der Mindmap

  • 1.8
  • 1.8

Informationen

Beschreibung
Mindmap am 1.8, erstellt von Cj L am 27/04/2019.
Erstellt von
Cj L
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck