AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Classification of programming languages and translators: interpreter

    An interpreter is a translator that reads source code and carries out its instructions directly, one statement at a time, without first producing a separate saved machine-code file.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 16 of 19

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    An interpreter is a translator that reads source code and carries out its instructions directly, one statement at a time, without first producing a separate saved machine-code file. It translates and executes each line as it reaches it, so an error is usually reported at the point where execution stops. This makes interpreters useful during development, because a programmer can run a program quickly, see output and fix faults without a separate compile step. The trade-off is that translation work is repeated on every run and the program generally runs more slowly than compiled code. A learner should be able to pick 'interpreter' from a description such as 'translates and runs one line at a time, stopping at the first error', and distinguish it from a compiler, which translates the whole program before it runs.

    What earns the marks

    • Identifies an interpreter as a translator that translates and executes source code one statement or line at a time.
    • States that an interpreter does not produce a separate saved machine-code file as its output.
    • Explains that execution stops or an error is reported when a faulty line is reached.
    • Recognises that interpreted programs are typically slower to run because translation happens during each run.
    • Distinguishes an interpreter from a compiler, which translates the whole program before execution.
    • Links interpreters to development and testing, where quick repeated runs help find faults.

    Common mistakes and how to put them right

    • Confusing an interpreter with a compiler.

      Put it right: An interpreter translates and runs code line by line rather than translating the whole program first.

    • Believing an interpreter produces a standalone executable file.

      Put it right: It executes source code directly without saving a separate machine-code file.

    • Thinking an interpreter finds all errors before running.

      Put it right: It typically stops when it reaches a line containing an error.

    • Assuming interpreted code always runs faster.

      Put it right: Repeated translation during each run usually makes it slower than compiled code.

    Exam tips

    • Learn a one-sentence definition of interpreter and a one-sentence contrast with compiler, then use the wording that matches the question.
    • When a scenario mentions running code line by line or stopping at the first error, link it explicitly to an interpreter.
    • If asked to compare, give one advantage and one drawback of an interpreter rather than only a definition.

    Try the lesson

    The start of the Classification of programming languages and translators: interpreter lesson, made from checked teaching notes for this specification point.

    Have a go first

    A programmer wants to run a high-level language program one line at a time, stopping as soon as an error is found. Which type of translator does this?

    There is more to this lesson

    The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of Classification of programming languages and translators: interpreter

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge