Cambridge AS Level Computer Science 9618 · 5.2 Language Translators

Q16 · 9618/12/M/J/23 Q7

Worked solution from the System Software Paper 1 Theory Fundamentals booklet, Part 2 of 2.

Q169618/12/M/J/23original Q7Structured · 16 marks
Question 7 from 9618/12/M/J/23

Worked solution

(a)(i)

Define a program library:

A set of pre-written (pre-compiled, pre-tested) subroutines [1]

... that can be called in other programs by installing or importing the library [1]

(a)(ii)

Give a benefit (1 mark) and explain it (1 mark). Any two pairs:

The memory needed by the program is smaller [1]

... because the DLL is loaded only once, or only when needed [1]

The executable file is smaller [1]

... because it does not contain all the library routines [1]

Other accepted pairs: no need to recompile the main program when the DLL changes, because changes are made separately; one DLL file can be shared by several programs, saving memory; the programmer does not need to maintain it inside the program.

(b)

Choose an interpreter (no mark for the choice). Justify, any three of these:

The developer can make changes in real time and debug at each stage [1]

The effect of changes is seen immediately [1]

The developer can test an unfinished program in small parts, and if one section fails, others can still be tested [1]

This avoids dependent errors (also scores if the marks above are not already full)

A compiler is also accepted if justified: it finds many errors at once and makes an executable that can be tested many times without recompiling.

Only three marks are available.

(c)

Complete the table:

FeatureDescription
BreakpointsStop the code at a set line to check the progress or values
Dynamic syntax checksHighlight or underline syntax errors as the code is typed
Context-sensitive promptsSuggest code to add or complete statements automatically
Single steppingRun the code one line at a time so values can be checked

Breakpoints [1]

Dynamic syntax checks [1]

Context-sensitive prompts [1]

Single stepping [1]

(d)

Explain the use of AI. Any three of these:

The program uses speech recognition [1]

... which identifies key words or phrases that are spoken [1]

... and matches them to a database [1]

... and generates the most likely word, sentence or command (also scores if the marks above are not already full)

Only three marks are available.

KEY IDEAA library and DLL save effort and memory; an interpreter suits unfinished code, and AI speech recognition matches sounds to known words.
TOTAL 16 marks

Official mark scheme

Mark scheme for 9618/12/M/J/23 question 7
VIDEO
▶ Starts at Q7 (1:17:40)

Starts at Q7 (1:17:40) · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.