Fourth-Generation Languages or 4GL's [1,5] are a very special breed of languages. In a literature search on 4GL's [3], it was found that they are almost ignored in the Computer Science literature, but widely covered in the trade press and information systems journals, where the interest centers on the cost, productivity and impact on the organization rather than the syntax or semantics of 4GL's [2,4,8]. A paper in which the authors have actually tried to use a 4GL is an exception [6]; It is an ominous sign that it paints a far less rosy picture than the average 4GL paper. Even the n-th rate textbook (n>=2), which is typical for languages like Fortran end Basic, is not available for most 4GL's (spreadsheets and database languages, which are sometimes included in the 4GL family, are an exception). Thus, an addendum to a well-known classification scheme for programming languages [7] might read:Fourth Generation Languages: Reputedly the best cars on the market, but you cannot make a test drive or even see a showroom model, beacause the salesman only talks to your manager. The only thing you get to see is a glossy brochure comparing this make'8 speed and gasoline consumption on freeways with other cars' in downtown traffic.In my view, the principal reason for the success of 4GL's lies in the fact that they are used to solve a restricted set of problems. In this context it should be noted that 4GL's, like COBOL, but unlike Pascal and Fortran are "file" or "database" language; that means they not only use files for input or output, but also use files instead of programmer-designed data structures to store intermediate results. This restricts both COBOL problems and 4GL problems to file handling problems, the latter containing only the simple variety. As should expected, ~GL's are somewhat more efficient in solving this type of problem than COBOL, but the principal gain of using a 4GL lies in the necessary simplification of the problem definition. We will describe four typical mechanism for simplification: (i) change of input specifications, (ii) change of output specifications, and (iii) neglect of computing efficiency.
Change of input specificationsWe start from the following problem:A plant produces a product in batches. Production of a batch takes a whole number of days. Between two batches at least one day is needed for cleaning. For each 30-day period, compute the number of days the plant has been used and the number of products produced. The input file contains the date of the first and the last day of the batch and the number of products in the batch. This is a typical problem for an undergraduate course in computer programming. Of course, the difficulty is in assigning the days and products to periods if the start and end of a batch are in different time periods.
83