Which of the following is the 5th generation AI programming language?
- (a)SQL
- (b)C++
- (c)C
- (d)Prolog
Correct — D, Prolog.
The keyed answer is Prolog. Its name abbreviates Programmation en Logique, and it was created in 1972 at Marseille by Alain Colmerauer and Philippe Roussel. A Prolog program is a set of facts and rules; the user poses a query and the interpreter searches for a proof on its own.
That is why textbooks place it in the fifth generation: the programmer states what is true and lets the machine infer the answer. Japan's Fifth Generation Computer Systems project, launched in 1982, was built on logic programming of this kind, which is where the label comes from.
The idea to carry away: language generations rank how much of the 'how' the programmer hands to the machine, and Prolog hands over the most.
- (a)SQL — SQL is the standard example of a fourth-generation language: you state what data you want and the database engine works out how to fetch it. That is declarative, but it queries stored tables rather than deriving new conclusions from rules, so it stops one rung below the fifth generation.
It is the right answer when a question asks for a 4GL or for the language used to query a relational database.
- (b)C++ — C++ is Bjarne Stroustrup's object-oriented extension of C, given its name in 1983. Classes and objects change how a program is organised, but the programmer still spells out the procedure step by step, which keeps it in the third generation alongside C.
It is the right answer when a question asks for an object-oriented language or for the language that grew out of C at Bell Labs.
- (c)C — C, written by Dennis Ritchie at Bell Labs around 1972 to build UNIX, is the textbook third-generation procedural language: statements run in the order the programmer lays them down, and every step is spelt out.
It shares Prolog's birth year, which is the hazard here: age is not generation. C is the right answer for questions on the language of UNIX or on Ritchie.
Programming languages are grouped into 'generations' by how far they sit from the hardware. Machine code and assembly are the first two; procedural high-level languages such as C are the third; declarative tools such as SQL, which state the result wanted, are the fourth.
The fifth generation goes further: languages such as Prolog let the programmer state facts and rules, and the system derives answers by logical inference. Because that is the shape of expert-system and AI work, they are called AI or logic programming languages.
The generation ladder belongs to the basic computer-awareness strand of General Studies, sitting beside hardware generations, memory types and networking terms.
Both the hardware ladder and the language ladder use the phrase 'fifth generation', and the bridge between them is Japan's 1982 Fifth Generation Computer Systems project, which paired new parallel hardware with logic programming.
Knowing where each common language sits lets you answer this item, its mirror image (which option is a 4GL), and match-the-following forms from the same short table.
- Prolog, short for Programmation en Logique, was created in 1972 at Marseille by Alain Colmerauer and Philippe Roussel, with Robert Kowalski supplying its logical foundation.
- A Prolog program is a set of facts and rules; the user poses a query and the system searches for a proof by resolution and backtracking.
- Japan's Fifth Generation Computer Systems project, launched in 1982 under MITI, adopted logic programming and developed the Prolog-derived kernel language KL1.
- Textbook ladder: machine code (1GL), assembly (2GL), procedural languages such as C and C++ (3GL), declarative query languages such as SQL (4GL), logic languages such as Prolog (5GL).
- SQL grew out of IBM's SEQUEL, designed by Donald Chamberlin and Raymond Boyce in the early 1970s; ANSI standardised it in 1986.
- C was written by Dennis Ritchie at Bell Labs around 1972 to implement UNIX; Bjarne Stroustrup extended it into C++, so named in 1983.
- LISP, created by John McCarthy in 1958, is the other language commonly linked with AI, though textbooks vary on which generation to place it in.
Each rung hands more of the 'how' to the machine; Prolog, where the system infers answers from rules, is the fifth-generation AI language.
- Reading 'AI language' as 'newest language': C++ appeared after Prolog, but the generation ladder ranks distance from the hardware, not release date.
- Promoting SQL to the fifth generation because it is declarative; stating what data to fetch is fourth-generation, while deriving conclusions from rules is what marks the fifth.
- Mixing the hardware ladder with the language ladder: 'fifth-generation computer' names the machines of the 1982 Japanese project, while 'fifth-generation language' names Prolog-type logic languages.
- Expecting LISP: it is an AI language too, but textbooks differ on its generation, whereas Prolog is the standard fifth-generation example.
The generation idea shows up as a direct identify-the-language item like this one, as its mirror image asking which option is a fourth-generation or high-level language, and as a match-the-following pairing languages with generations.
A related form asks about Japan's Fifth Generation Computer Systems project or about the paradigm, logic programming, that Prolog embodies, so the language, the project and the paradigm are best learnt as one cluster.
MPPSC_2019_PRE_PaperI_Q242019Same ladder, a different rung. MPPSC asks which listed language is high-level, and COBOL, Pascal and BASIC each qualify; UKPSC asks for the fifth-generation language. What is shared is placing a named language on the generation ladder; what differs is that MPPSC's rung, the third generation, holds many languages, whereas Prolog is the specific fifth-generation example.
UKPSC_2023_MAINS_Essay_Q342023A descriptive Mains item from the same commission asking the candidate to introduce 'Programming Language' among other computer terms. The shared ground is the concept of a programming language; it differs in form (an open write-up, not a four-option choice) and in scope, since the ladder from machine code to Prolog would be one part of that introduction rather than the whole answer.
- practice — not a real PYQ
Which of the following is usually classed as a fourth-generation language (4GL)?
- (a)Assembly language
- (b)C
- (c)SQL
- (d)Prolog
Answerc — SQL is the standard fourth-generation example: the user states what data is wanted and the database engine decides how to retrieve it. Assembly is second generation, one step above machine code; C is a third-generation procedural language; Prolog is the fifth-generation logic language. - practice — not a real PYQ
Japan's Fifth Generation Computer Systems (FGCS) project, launched in 1982, chose which programming paradigm as the basis of its software?
- (a)Object-oriented programming
- (b)Logic programming
- (c)Structured procedural programming
- (d)Assembly-level programming
Answerb — FGCS set out to build knowledge-processing machines around logic programming, and its kernel language KL1 descends from Prolog-style Horn clauses.Object-oriented programming (C++, Smalltalk) and structured procedural programming (C, Pascal) are third-generation paradigms, and assembly-level programming is second generation, so a, c and d each name the wrong base.
- practice — not a real PYQ
Which pair correctly matches a programming language with the generation it is usually placed in?
- (a)C — second generation
- (b)Assembly language — first generation
- (c)SQL — fourth generation
- (d)Prolog — third generation
Answerc — SQL is a fourth-generation declarative query language. Machine code is the first generation and assembly the second, so option b is one rung too low; C is third generation, not second; and Prolog is fifth generation, not third. - practice — not a real PYQ
The C programming language was developed at Bell Laboratories around 1972 by
- (a)Dennis Ritchie
- (b)Bjarne Stroustrup
- (c)Alain Colmerauer
- (d)Donald Chamberlin
Answera — Dennis Ritchie wrote C at Bell Labs to implement UNIX. Bjarne Stroustrup, also at Bell Labs, later created C++; Alain Colmerauer led the creation of Prolog at Marseille in 1972; Donald Chamberlin co-designed SEQUEL, the forerunner of SQL, at IBM.