METHOD AND DEVICE FOR DETERMINING WHETHER A SERIES OF END SYMBOLS CAN BE GENERATED BY A CONTEXT-FREE GRAMMAR

Abstract: "Method for determining whether a series of end symbols can be generated by a context-free grammer, a multimodular device for the implementation of the method, and a translation machine comprising such multimodular device." A description is given of a method and a device for determining the permissibility of a series of a1 ... an end symbols as being derivable by means of a set of production rules on the basis of a context-free grammer G The derivation takes place by assigning dotted rules to elements Ti, j (O ≦ i ≦ j ≦ n) of a recognition matrix y means of scan, complete and predict operations. The number of operations is of the order of (n³). In a first embodiment (n+1) processing modules are set up and the successive operations can be limited to a number of the order of (n²). In a second embodiment 1/2(N+1) (n+2)-1 processing mod­ ules are set up and the successive operations can be limited to a number of the order of (n). The method may be applied in a translation machine.

Description: The invention relates to a method to be used in parsing a language for determining the permissibility of a series of a1..an end symbols to be translated as being deriavable by means of a set of production rules on the basis of a pre-determined context-free grammar G, by assigning dotted rules to elements Ti, j (O ≦ i ≦ j ≦ n) of a recognition matrix, which dotted rules indicate the derivability of a series of end symbols a(i+1), a(i+2)..aj, in which respect the assignation to element Ti,j (i≠j) takes place on the basis of dotted rules assigned to element Ti, (j-1) by performing a scan operation on said latter element, and of dotted rules assigned to a first series of element pairs Ti,(j-1)/T(j-1),j; Ti,(j-2)/T(j-2),j; ...; Ti,(i+1)/T(i+1),j; Ti,i/Ti,j by performing complete operations over said respective element pairs, and the assignation to element Tj,j on the basis of dotted rules assigned to a second series of elements (TO,j..T(j-1),j) by performing predict operations over said respective elements. The investigation therefore gives an anwer to the question: can the series of elements be generated by the relevant grammar? Or also: is the relevant series of elements a sentence of the language that can be constructed with the aid of the relevant context-free grammar. In the literature this investigation is known as - Parsing -. As general background references to the technology of parsing the following two books are cited: A. Aho et al., "The Theory of Parsing, Translation and Compiling", Vol. 1: parsing, Prentice-Hall 1972, or also S.L. Graham et al., "Parsing of General Context-free Grammars", Advances in Computers, Vol. 14, Academic press, 1976. However, the present invention does not improve on the theory of parsing per se, but only to the technological realization of such parsing. A test of the above permissibility is a first step before a translation operation can be carried out. The translation may be that between two natural languages, in so far as these are completely context-free, between two artificial languages (for example computer languages) or, with the above-mentioned restriction, between an artificial language and a natural language. Earley's method for carrying out such a test is given on pages 320-322 of the first book cited. This method requires a great many operations and its performance on a sequential computer is very time-consuming. It can be proved that for a series of end symbols consisting of n elements the number of operations is of the order of (n³). An object of the invention is to structure the performance of this method in such a way that the processing speed can be substantially increased when it is mapped on a multimodulator device. In itself, an advantageous structure of a network of processing modules in which the method referred to can be implemented is described in the non-prepublished NL-A-8600218 assigned to the same applicant. In this reference a network of processing modules is described in which at a limited degree G of the network (number of connnecting lines per module) the maximum distance between two arbitrary modules (diameter of the network) expressed in the number of communcation lines needed for this remains limited between two modules. A first method and a first system according to the invention is set out in claims 1 and 4, respectively. The inventors have realized that a parallelism increasing in accordance with the value of n can be achieved because, particularly in the complete operations, other combinations of matrix elements are taken as a starting point over and over again. The number of these combinations is of the order of n for each matrix element, and it can be proved that because of the n-fold parallelisation of the operations the total processing time becomes of the order of (n²), in which respect an acceleration becomes possible, certainly for higher values of n, at the price of a more complicated device/organization. In particular, the necessary performances of the predict operations constitute another delaying factor because no satisfactory degree of parallelism can be achieved for carrying these out. On close consideration, it proves that although the predict operations admittedly produce a useful limitation in the number of dotted rules assigned as intermediate results, the end result of the algorithm is invariable as regards the effect of the predict operations. A second method and a second system according to the invention is set out in claims 3 and 5, respectively. If possible and necessary, the assignation results are now used for complete operations even if further assignation results must first be obtained at other matrix elements for the ultimate assignation to the relevant matrix element. It can be proved that as a result of this n²-fold parallelisation of the operations the total processing time now becomes of the order of (n), as a result of which a further acceleration of the implementation becomes possible, certainly in the case of higher values of n. It is possible to cause the choice between the three different versions to be controlled each time by the value of n. In the latter case, too, the price of acceleration in processing is again a more complicated device/organisation. The invention also relates to a multimodular device for the implementation of the method. When used in a translation machine, first the data structure to be translated is entered into or appropriate storage device. Such data structure usually consists of a sequence of expressions or sentences. For each expression (bounded by certain limitors, such as a semicolor, a full stop or a carriage return control signal for a printer) the parsing method is executed separately. Thereafter (if the parsing is successful) for each expression a derivation rule as based on the syntax of the input language in question is known. Thereafter, the translation proper is effected in that partial expressions, words, or even the whole expression in the input language are translated into corresponding partial expressions, words, or whole expressions in the output language. In the art, this is known as "syntax driven code generation". Translation between two computer languages (context-free) is often not too difficult. Translation between natural languages is notoriously complicated because the level of correspondences between a source expression and a destination expression jumps between the word level, the partial expression level (e.g. bounded by interpunctions such as commas), and the full expression to and fro. Sometimes the level of correspondence is still higher, at a multi-expressions-level. Still more difficult is the situation when a certain expression or word has double meanings. For brevity, the present disclosure does not embark on a discussion on parsing and translation, as a general solution with respect to natural languages will probably never been found. After translation, the sequence of destination expressions is output in a suitable way, e.g. stored or printed. The present invention also relates to a translation machine comprising input means for receiving a sequence of source expressions, a multi-modular device according to the above, a translator for under control of assigned allowability rules generating a sequence of destination expressions, and output means for outputting the sequence of destination expressions. Further advantageous aspects are recited in dependent claims. BRIEF DESCRIPTION OF THE FIGURES: The invention is further explained, partly on the basis of some figures. The explanation first comprises what a context-free grammar is, then the content of the investigation of the permissibility as already mentioned, then the purport of Earley's algorithm, next the modifications to this algorithm and finally the implementation in a multimodular device. In the figures: figure 1 gives an example of a recognition matrix for Earley's algorithm; figure 2 gives a figuristic clarification of a "dotted rule"; figure 3 gives a figuristic clarification of the "scan" operation according to Earley; figure 4 gives a figuristic clarification of the "complete" operation according to Earley; figure 5 gives an indication of the sequence of the operations in the algorithm; figure 6 gives a mapping on a multimodular device; figure 7 gives a second mapping on a multimodular device; figure 8 gives a block diagram of a processing module. WHAT IS A CONTEXT-FREE GRAMMAR? A context-free grammar consists of two sets of symbols, a start symbol, and a set of production rules, and can thus be written as a 4-tuple G=(N, Sigma, P, S). The symbols are basic elements, for example, characters, letters or mathematical symbols. The definitions of the components of the grammar are as follows: Sigma is a finite set of end symbols; N is a finite set of non-end symbols, there are no symbols which form part of both lists N and Sigma; S is the start symbol and is part of the set N; P is a finite set of production rules whereby a non-end symbol can be translated into a series of zero or more further symbols, which further symbols all form part of the lists Sigma or N (in the latter case, a next production rule can then again be used for further translation). A production rule such as this can be written as "A → alpha", and in this respect A is a symbol from the list N and alpha is a series of zero or more symbols, each of which forms part of the lists N or Sigma. The context-free aspect of the grammar is determined by the fact that each production rule has only one non-end symbol as its starting point. The start symbol is also permissible as a starting point for the production rules. In principle, it is permissible to derive an increasingly longer series of (other) symbols from a symbol of N by means of repeated application of one or more production rules. If alpha, beta and gamma are each a series of zero or more symbols each from Sigma or N, and B is a symbol from N, and there is a production rule whereby B can be converted into beta, then the series - alpha beta gamma - is "directly derivable" from the series - alpha B gamma -. A series of zero or more implementations of a "direct derivation" (which is permissible in B) is called a "transitive and reflexive closure". A language L(G) which is generated by the grammar G consists of end symbols which, according to the above-mentioned "closure" rule, can be derived from the start symbol. For the sake of brevity, the structure of the production rules and the representation of the various symbols will not be dealt with in detail here. THE CONTENT OF THE INVESTIGATION OF PERMISSIBILITY: The problem -Parsing- consists of the specification of a program that gives a binary (yes/no) answer to the question of whether a series of symbols W can be generated by the grammar (G), and thus forms an element of the language L(G) : b = W IN L(G). Here G, as stated, is a context-free grammar. W is a series of symbols a1..an, while all the ai belong to the list of end symbols. In fact, it means: going from the start symbol S and by (repeated) application of the production rules look for a possible way to generate the current series. A very elementary search method would be to form the sequence a1..an by a trial and method in repeatably applying these rules in a tree structure, which is known as "backtracking". But that involves a great deal of searching. THE EARLEY ALGORITHM: Figure 1 shows the organisation of a recognition matrix according to Earley's method. After the execution of the method method, the elements of the matrix each contain zero or more so-called dotted rules. A dotted rule in matrix element Ti,j indicates that the series of symbols a(i+1)...aj is permissible in the relevant grammar. At the start of the method all the matrix elements are empty. The recognition matrix for a series of n end symbols to be checked contains (1/2)(n+1)(n+2) elements which can be ranked according to a triangle. For all Ti,j we have O ≦ i ≦ j ≦ n. Consideration of the above immediately shows that the matrix can also be oriented in each of the three other possible ways. The definition of a dotted rule is: if -alpha beta- can be directly derived by applying a production rule of the relevant grammar (i.e. the set of production rules P comprises A → alpha beta), then -A → alpha beta- is called a dotted rule. This dotted rule is assigned to the "matrix element" Ti,j if two conditions are satisfied, which are shown in pictorial form in figure 2. The first condition is that the series a(i+1)..aj can be derived directly or indirectly from alpha. The second condition is that the sequence -gamma A delta- can be derived directly or indirectly from the start symbol S and, in addition, the series a1..ai is directly or indirectly derivable from gamma. In figure 2, the derivability is indicated by a trapezium in each case. It proves that no relevance can be attached to the series of elements which can be derived from beta and delta. This is indicated by the position of the dot in the expression for the dotted rule: as regards what comes after the arrow but before the dot, it is known that it can derive a "part" of the series of symbols a1..an. The expression after the dot must then be further considered (N.B. the "part" of the series can also imply an empty sub-series). This definition leads to the following. If a dotted rule of the form "S → alpha.", is assigned to the element To,n, then the series of end symbols a1..an can be derived directly or indirectly from the start symbol S. Hence the series of end symbols a1..an forms a permissible part of L(G). It is also pointed out that each element Ti,j zero, can contain one or more dotted rules. "Zero" means that no derivation of the series a1..an would run along it. "One or more" means that a derivation of the series a1..an can, in fact, run along it. If this number is greater than one, it will generally turn out during the further implementation of the method that only one dotted rule remains because it is found that paths of which other dotted rules form part come to a dead end. If it proves that matrix element TO,n contains two or more dotted rules of the form "S → alpha."at the end of the implementation, this means that the grammar is ambiguous. This is generally undesirable, but it has no relation to the invention and is not further considered here. THE THREE OPERATIONS ACCORDING TO EARLEY: First of all, the method comprises the scan operation. This is explained in pictorial form on the basis of figure 3. Now let us assume that a dotted rule is assigned to element Ti,(j-1) of the recognition matrix which indicates that -alpha.a beta gamma-, can be directly derived from B, in which respect a is the end symbol aj and epsilon can be derived directly or indirectly from beta. Here epsilon is a series of zero symbols. Then the dotted rule -B → alpha a beta.gamma- may be assigned to the directly adjacent element Ti,j. In this way the dot is therefore moved to the right over one end symbol position (aj). For the performance of this operation it is only necessary for the assignation of dotted rule(s) to the immediately adjacent element Ti,(j-1) to be known. In addition, for each dotted rule in element Ti,(j-1) this operation may, or may not produce its own dotted rule in element Ti,j. The method also comprises the "complete" operation. In general terms, the object of the method is to place in the element Ti,j the dotted rule which generates the series of end symbols a(i+1)..aj. Now let us assume that in element Ti,k there is a dotted rule which generates a series of end symbols a(i+1)..ak; and in elementTk,j a rule which generates the series of end elements a(k+1)..aj (i ≦ k ≦ j). Here, k can therefore possess one (or more) of a series of values. The question now arises whether the two last-mentioned dotted rules can be combined. This question is answered as follows (see figure 4): Assume that the dotted rule B → alpha.A beta gamma is assigned to Ti,k and, in addition, the series epsilon (empty series) can be derived directly or indirectly from beta, and assume that a dotted rule which indicates that a series of exclusively end elements can be derived directly or indirectly from A, then to the element Ti,j there may be assigned the dotted rule which gives the direct derivation: B → alpha A beta.gamma. Here too, therefore, it proves that the object of the method can be summarized as the attempt to move the dot further and further to the right. To this end, for the assignation to element Ti,j the information from the following pairs of elements (and in sequence from the top downwards) must be combined: Ti,(j-1) and T(j-1),j Ti,(j-2) and T(j-2),j Ti,(j-3) and T(j-3),j . . . . . . Ti,(i+1) and T(i+1),j Ti,i and Ti,j Pair-wise, therefore, these are always a matrix element on the same row and a matrix element in the same column as matrix element Ti,j, until finally both matrix elements in the pair are located on the same row of the matrix. The matrix element Tj,j makes no contribution to the "complete" operation. The method further comprises the "predict" operation. Let us assume that any element Ti,j, (i=O,1..(j-1)) contains a dotted rule -B → gamma.C delta-. This means that the series of end symbols a1..aj can be derived directly or indirectly from gamma. It can now be proved that element Tj,j (the bottom element in the relevant column) contains all the dotted rules -A → alpba.beta- to which the following applies: the empty series of epsilon end symbols can be derived directly or indirectly from alpha and, in addition, A is an element of the first set of C. In addition, element Tj,j cannot contain any more dotted rules. For this predict operation it is therefore necessary to assign all the matrix elements TO,j, T1,j..T(j-1),j which are located in the same column. Figure 5 gives an indication of the sequence of the operations in the method when one single processing module is present. The matrix elements are now only provided with a consecutive number 1..28 and are represented as connected into a chain. The mapping on Ti,j is a one-to-one correspondence. First, the assignation to element 1 (T0,0) is determined in figure 5. This works as a predict operation on the start symbol S. Then element 1 is ready (notation PS). Then the assignation to element 2 is determined, first with the scan operation relating to element 1 (notation S1) and then the complete operation on the pair of elements 1,2 (notation C1/2)- Then element 2 is ready. Then the assignation to element 3 is determined with only the predict operation on element 2 (notation P2). Then element 3 is ready. Then the assignation to element 4 is determined, first with the scan operation on element 3 (notation S3) and then the complete operation on the pair of elements 3,4 (notation C3/4). Then element 4 is ready. Then the assignation to element 5 is determined, first with the scan operation over element 2 (S2), then the complete operation over the pair of elements 2,4 (notation C2/4) and finally over the pair of elements 1,5 (notation C1/5). Then element 5 is ready. Then the assignation to element 6 is determined with the predict operation over the elements 5 and 4 (P4, P5). The sequence of performanae between these is arbitrary. Then element 6 is ready. Then the assignation to element 7 is determined, first with the scan operation over element 6 (S6) and then the complete operation over the pair of elements 6,7 (C6/7). Then element 7 is ready. Then the assignation to element 8 is determined, first with the scan operation over element 4 (S4), then the complete operation over the pair of elements 4,7 (C4/7) and finally the complete operation over the pair of elements 3,8 (C3/8). Then element 8 is ready. Then the assignation to element 9 is determined, first with the scan operation over element 5 (S5), then in succession the complete operations over the pairs of elements 5/7, 2/8, 1/9 (C5/7, C2/8, C1/9). Then element 9 is ready. Then the assignation to element 10 is determined with the predict operation (in arbitrary sequence) over the elements 9, 8 and 7 (P9, P8, P7). After that all the elements in the first four columns are ready. The operations for the further columns proceed in a corresponding manner. For a series of n end symbols there are 1/2*(n+1)*(n+2) elements. The number of operations per element varies from 1 (element 1) to j+1 for the elements T(j-1),j; T(j-2),j...To,j, respectively. For a series of n end symbols the number of operations is therefore of the order of (n³). In a single sequential machine the sequence is therefore as indicated. In this respect, each matrix element Ti,j is given a consecutive number Z and they are processed in the sequence of their consecutive numbers. The figure gives another expression for the consecutive number as a function of the indices i,j. FIRST EXAMPLE OF AN EMBODIMENT OF A MAPPING ON A MULTIMODULAR DEVICE Figure 6 gives the mapping of this method on a multimodular device in which each row of matrix elements has its own processing module which determines the assignations to the various matrix elements of this row. The operations are designated as already discussed; in every case, each operation can only take place when the necessary input data have been acquired. Sometimes the sequence can be chosen. The indices of the operations indicate the modules of which the end results, whether provisional or otherwise , have been used. It is assumed that the transmission of end results between the processing modules is instantaneous. When an element of the recognition matrix has been completed, this is indicated by a horizontal dashed line accompanied by the consecutive number of the relevant matrix number. The chart is drawn up according to the principle that each operation must be carried out "as soon as possible". It that moment the assignation results which are needed for this operation must therefore be available in the relevant processing module. This means that as far as necessary the assignation results must be communicated directly to these processing modules, in other words, in such a way that the latter do not have to wait unnecessarily. Now, however, the operations P16-P19 can also be carried out later, for example on lines 32, 33, 34, and 35 respectively, and the operations S17, C17/27 can also be carried out on lines 39 and 40, respectively. The assignation result for module 8 is obtained, for example, on line 13. This is used in the other modules: module MO for the first time on line 14, module M3 also on line 14, modules M2, M4, M5 and M6 unused. The communication to the last-mentioned modules can be omitted, if required. Corresponding requirements apply to the other modules. Generally speaking, assignation results must be communicated to all the processing modules which relate to lower row numbers (for the subsequent performance of complete operations) and to the processing module relating to the lowest matrix element of the relevant column of matrix elements (for the subsequent performance of the relevant predict operations). The scan operations use only assignation results which are generated in the relevant processing module itself. The number of lines for n+1 columns (n end symbols) is equal to (n+1)², hence the total processing time is of the order of n². The above does not mean that all the lines take the same amount of time. This depends on the number of dotted rules which are used as start results in the relevant processing module, on the structure of the grammar, and so on. The statement about the processing time therefore only indicates an order of magnitude. The total number of operations for six end symbols is equal to 99 and the acceleration here is therefore approximately a factor of 2. In spite of this the utilization of capacity is low and in column MO does not even reach 60%. Another important characteristic in the above is that the content of element Ti,j of the recognition matrix never depends on the content of any element Tk,(j+p), in which p > O and k is permissible. The processing modules referred to above can be realized in various ways on a device. In the first place, each processing module can be realized as a particular subdevice. On the other hand, it is also possible for this mapping to be combined programmatically for a series of matrix elements be done to a particular single sub-device. The processing then becomes slower by as much as is needed for controlling the information transports associated with this more flexible mapping. For example, the operations summarised for module M5 can also be carried out on lines 29-38 by module M4, and the operations summarised for module M6 can be carried out on lines 41-49 by module M4. Further projections can be read off from the figure. In particular, if there is a large number of processing modules, so that long series of end symbols can be processed, it is possible to limit the equipment at the expense of only a slightly longer processing time: this is then still of the order of (n²). SECOND EXAMPLE OF AN EMBODIMENT OF A MAPPING ON A MUTIMODULAR DEVICE Next, a second method is discussed for mapping the Earley method on a multimodular device. Here, the method is changed slightly. In the unchanged form no acceleration is possible above the chart presented in figure 6: each line in this contains at least one operation which cannot take place before at least one operation has been carried out in the immediately preceding line, and the same applies to the latter operation. The Earley method states that: matrix element Ti,j contains the dotted rule -A → alpha.beta- if, and only if, the following applies: a. the series of end symbols a(i+1)..aj can be derived from alpha; and b. -gamma A delta- can be derived from start symbol S, in which respect the series of end symbols a1..ai can be derived from gamma. The change in the method relates to the omission of condition b. The consequences are: 1. More dotted rules can be assigned for all the matrix elements than was possible with the original method; these each then form part of respective dead-end paths. 2. All the predict operations are eliminated, so that the assignations to the diagonal elements Tj,j can be carried out directly. The saving in work is illusory, however, because the effect mentioned in point 1 carries much more weight. The assignation to element Tj,j is noted as D1,3,6,10... according to the numbering in figure 5, and is further referred to here as a pseudo-predict operation since only the locally available information is used for this purpose. 3. If a complete operation can be performed, this is carried out immediately. A dotted rule -S → alpha.- is now assigned to matrix element TO,n (if necessary), while the series of end elements a1..an can be derived from alpha. It follows from this that the assignation to matrix element TO,n is invariant for the above-mentioned modification of the method. Each matrix element (series 1..28 in figure 5) is now provided with its own processing module. If necessary, this can be omitted for matrix element 28 because the result of the relevant pseudo-predict operation is not used anywhere. Figure 7 indicates the sequence of the operations. The notation is as in the earlier figure 6, while as the last index it is indicated for which matrix element the operation is intended, and hence also which processing module carries out the relevant processing operation. For example, C13/16,19 means the complete operation on the basis of the assignation results in matrix elements 13 and 16, and carried out in and by module 19. The first line indicates that the assignation is carried out for the matrix elements Tj,j by means of the pseudo-predict operation. These are then ready. The second line indicates that the assignation results for the matrix elements are used for a scan operation and on the third line for a complete operation. The fourth line indicates a further scan operation and so on. The operations for one or more matrix elements are always completed on the first, third, sixth, tenth, fourteenth, eighteenth and twenty-second lines. These results are then supplied to the relevant modules as quickly as possible, but in any event before the relevant modules need this information. In the diagram in figure 5 this means communication in the direction of lower row numbers and higher column numbers; for the diagonal elements Ti,i, however, communication is only in the direction of higher column numbers. Up to and including the twelfth line of the first column (C9/11,14) the sequence of operations is identical to that in figure 6 and consequently no acceleration is obtained. The next operation in this column in figure 6 is C5/12,14. From the diagram in figure 7 it can be seen that this operation, however, can already be carried out immediately after the sixth line because then the assignations to elements 5 and 12 have already been completed. The same applied to the complete operations C8/17,19 and C12/23,25. These can be carried out at will on the seventh to the tenth line inclusive. If required, a maximum of up to seven processing modules can then be active simultaneously. As a result, lines eleven to fourteen inclusive are sufficient for the ultimate assignation to the elements 14, 19 and 25. The matrix elements 20 and 26 each require six operations. Four of these are carried out on lines fifteen to eighteen inclusive and in every case two on one of the lines eleven to fourteen inclusive selected arbitrarily. Modules 20 and 26 must each carry out two operations on these four lines. Matrix element 27 requires seven operations. Of these, four are carried out on lines nineteen to twenty-two inclusive, two on lines fifteen to eighteen inclusive, and one on lines eleven to fourteen inclusive. It can be proved that: a) for each increase in n by one unit above the value n = 2 (six matrix elements) the first column of figure 7 contains only four extra lines; b) the number of advance operations which therefore take place earlier than corresponds to the time in figure 6 is at most two operations for each module for every four extra lines as stated in a). It is further pointed out that it is also assumed in figure 7 that all the separate operations require the same amount of time. In practice, this will not be the case. If the results of an assignation, hence an assigned dotted rule, are transmitted immediately to further modules for use, a further acceleration can occur which may be considerable. This acceleration cannot, however, be given in the notations in figures 6 and 7 because it is not known a priori where such an acceleration can take place. For example, an assignation of zero dotted rules in element 8 may mean that operations S8,13; C8/11,13; C2/8,9; C8/17,19; C8/24,26 do not produce any further assignation. In particular, the first three of these form part of a critical path, so that omitting them, if required, can immediately imply an acceleration. It therefore proves that the number of lines increases linearly by n, and hence the total processing time is also of the order of (n). The statement made at figure 6 with regard to the mapping of processing modules on sub-devices also applies here: a saving on components can be obtained by using sub-devices for various processing modules. In practice it has been found that, particularly for successive operations with changing values of n, a very complicated selection and control diagram is then necessary. It has also been found that for small values of n the mapping on one single processing module according to the state of the art is frequently the most advantageous. For an intermediate range of values for n it often proves that the set-up according to figure 6 is the most advantageous. For large values of n the set-up according to figure 7 is the most favourable. For that reason, when sufficient processing modules are available, if n is in the low range the known method is used, for n in the intermediate range the method according to 6 is used, and if possible, for the range of large values of n the method according to figure 7 is used. The value of n is always communicated to all the processing modules which select their own working mode under its control. DESCRIPTION OF A SUB-DEVICE ON WHICH A PROCESSING MODULE IS MAPPED Figure 8 shows an elementary block dlagram of a sub-device, or module. This contains two input elements W(west) and S(south) in order to receive information relating to assigned dotted rules from modules located on the left in the matrix or modules located lower within the matrix. In addition, the module may send information on assigned dotted rules to modules located higher in the matrix or modules located to the right in the matrix, respectively. Furthermore, there is an input/-output control element I/O, a memory MEM, a processor PROC and a program memory PROG. The specific operation of such a module down to the instruction level is not treated further for brevity. Each module has available the end element aj (which can be supplied in the same way as the information of the dotted rules, or in some other way) and its own ordinal number i (and j, if applicable). Information received on dotted rules assigned is stored, provided with the related ordinal numbers i,j, in the memory MEM with addressing by an I/O control element, which for this purpose is activated via the dashed lines from elements W and 5. If a dotted rule is received, element I/O transmits an activation signal via the control line REQ/ACK to the processor PROC. This addresses in memory MEM the dotted rule received latest and, in so far as a complete operation to be carried out is concerned, all the other dotted rules in MEM of which the index numbers are relevant. The dotted rules are received in element PROC and the production rules in the program memory PROG are scanned in succession in order to detect whether a new dotted rule can be assigned from this. When all the production rules have been interrogated, or earlier if a new dotted rule has been found, a "ready" signal is sent over line REQ/ACK to the I/O element. In the event of a NO assignation a following dotted rule which may have arrived in memory MEM is then investigated. In the event of a positive assignation, the relevant dotted rule is supplied under the control of element I/O via memory MEM to the output elements N(north) and E(east) and from there to further modules, if present. Control signals to this effect are outputted from element I/O to elements N, E along dashed lines. For the sake of simplicity, no handshake mechanisms between the various modules have beenshown. In addition, those dotted rules received, which may be relevantfor further modules are sent immediately from elements W and/or S, via memory MEM to elements N and/or E. In the same way, the results of the pseudo-predict operations are transmitted via the element E and scan operations are performed on assignation results which arrive via the element W. Various interconnections have been shown between elements PROC and PROG for addresses (A) and instructions (I) and between elements PROC and MEM for addresses (A) and data (D), respectively. A double-read capability for the memory may increase data throughtput. The module described is suitable for incorporation in an organisation according to figure 7. In this respect, unused connections are not activated. The module for matrix element TO,n has a connection to the outside world in order to signal the ultimate permissibility. The following changes must be provided for the purpose of the organisation in figure 6: a) the connection elements W and E need not be active because only one column of modules is present b) connection element N operates bi-directionally in order, respectively, to receive the predict information and to transmit the complete information c) the same applies to connection element S. When the selection is taking place, for example, between the organisation in figures 6 and 7, respectively, one column of modules is activated (figure 6) and the other is set to non-active, or all are activated, respectively (figure 7).

Claims: 1. A method to be used in parsing a language for determining the permissibility of a series of a1..an end symbols to be translated as being derivable by means of a set of production rules on the basis of a pre-determined context-free grammar G, by assigning dotted rules to elements Ti, j, whereby O ≦ i ≦ j ≦ n, of a recognition matrix, which dotted rules indicate the derivability of a series of end symbols a(i+1), a(i+2)..aj, in which respect the assignation to element Ti,j, whereby i≠j, takes place on the basis of dotted rules assigned to element Ti, (j-1) by performing a scan operation on said latter element, and of dotted rules assigned to a first series of element pairs Ti,(j-1)/T(j-1),j; Ti,(j-2)/T(j-2),j; ...; Ti,(i+1)/T(i+1),j; Ti,i/Ti,j by performing complete operations over said respective element pairs, and the assignation to element Tj,j on the basis of dotted rules assigned to a second series of elements, TO,j..T(j-1),j, by performing predict operations over said respective elements, characterized in that n+1 processing modules (MO..Mn) are provided, all of which are assigned to their own row of elements of the recognition matrix and are provided with communication facilities for in the column direction supplying assigned dotted rules to other processing modules, in that the assignation to element Tp,j is carried out by processing module Mp, whereby O ≦ p ≦ n , on the basis of dotted rules assigned by processing modules {Mp,M(p+1)..Mj} directly or indirectly, respectively, to elements Tk,r in which k ≧ p and r ≦ j, and dotted rules assigned as a result to the above-mentioned first and second series of element pairs/elements, in that the assignations to a column of elements Tx,j, whereby O ≦ x ≦ j, are carried out independently of each other and as soon as necessary on the basis of the assignation results present in the respective processing modules Mx, in that the predict operations are carried out in module Mj as soon as the assignations in modules MO..M(j-1) are completed, and in that any assignation result determined by processing module Mi for matrix element Ti,j is immediately supplied to all the processing modules MO..M(i-1),Mj, but for i=O only to Mj. 2. A method according to Claim 1, characterized in that in module Mp the determination of the assignation on the basis of dotted rules assigned to other elements for elements Ti,j, whereby i≠j, takes place by carrying out in succession first the scan operation and then the complete operation on the element pairs of the first series in the sequence of Ti(j-1)/T(j-1),j to Ti,i/Ti,j. 3. A method to be used in parsing a language for determining the permissibility of a series of a1..an end symbols to be translated as being derivable by means of a set of production rules on the basis of a pre-determined context-free grammar G, by assigning dotted rules to elements Ti,j, whereby O ≦ i ≦ j ≦ n, of a recognition matrix, which dotted rules indicate the derivability of a series of end symbols a(i+1), a(i+2) ...aj wherein the assignation to element Ti,j, whereby i≠j, takes place on the basis of dotted rules assigned to element Ti,(j-1) by performing a scan operation on said latter element, and of dotted rules assigned to a first series of element pairs Ti,(j-1)/T(j-1),j; Ti,(j-2)/T(j-2),j ..., Ti,(i+1)/T(i+1),j; Ti,i/Tj,j by performing complete operations over said respective element pairs, characterized in that the assignation to element Tj,j is by effecting a pseudo-predict operation over said element using only locally available information and disregarding predict operations which were based on assignations to other elements Ti,j, in that at least 1/2(n+1)(n+2)-1 processing modules are provided, so that every element of the recognition matrix, except Tn,n, has assigned its own processing module, said modules being provided with row communication facilities and column communication facilities in order to supply assigned dotted rules to processing modules with lower values of i and higher values of j, if present, in that an assignation result formed is supplied directly to all the processing modules in the relevant row or column, respectively, in so far as these latter processing modules need the latter assignation result, and in that an operation which can be carried out on the basis of received assignation results is performed unconditionally with respect to processing stages in other processing modules. 4. A device to be used in parsing a language for determining the permissibility of a series of a1..an end symbols to be translated as being derivable by means of a set of production rules on the basis of a predetermined context-free grammar G, by assigning dotted rules to elements Ti,j, whereby O ≦ i ≦ j ≦ n, of a recognition matrix, which dotted rules indicate the derivability of a series of end symbols a(i+1), a(i+2)..aj, in which respect the assignation to element Ti,j, whereby i≠j, takes place on the basis of dotted rules assigned to element Ti,(j-1) by performing a scan operation on said latter element, and of dotted rules assigned to a first series of element pairs Ti,(j-1)/T(j-1),j; Ti,(j-2)/T(j-2),j; ...; Ti,(i+1)/T(i+1),j; Ti,i/Ti,j by performing respective complete operations on said respective element pairs, and the assignation to element Tj,j on the basis of dotted rules assigned to a second series of elements, TO,j..T(j-1),j, is by performing respective predict operations on the latter elements, characterized in that n+1 processing modules (MO..Mn) are provided, all of which are assigned to their own row of elements of the recognition matrix and are provided with communication facilities for in the column direction supplying assigned dotted rules to other processing modules, in that the assignation to element Tp,j is carried out by processing module Mp, whereby O ≦ p ≦ n , on the basis of dotted rules assigned by processing modules Mp,M(p+1)..Mj directly or indirectly, respectively, to elements Tk,r, in which k ≧ p and r ≧ j, and dotted rules assigned as a result to the above-mentioned first and second series of element pairs/elements, in that the assignations to a column of elements Tx,j, whereby O ≦ x ≦ j, are carried out independently of each other and as soon as necessary on the basis of the assignation results present in the respective processing modules Mx, in that the predict operations are carried out in module Mj as soon as the assignations in modules MO..M(j-1) are completed, and in that any assignation result determined by processing module Mi for matrix element Ti,j is immediately supplied to all the processing modules MO..M(i-1), Mj, but for i=O only to Mj and processing modules (MO..Mn), are bidirectionally connected by an interronnection network, in that each processing module Mi, whereby O ≦ i ≦ n, possesses reception facilities in order to receive the above-mentioned end symnbols, a program memory in order to store a test program with respect to the above-mentioned permissibility, a processing element in order to carry out under the control of the above-mentioned test program an assignation to the series of elements in the recognition matrix Ti,i..Ti,j, and connection facilities in order to receive from processing modules M(i+1)..Mn assignation results relating to elements T(i+1),x; T(i+2),x..Tx,x, whereby i ≦ x ≦ n , in so far as present, for the performance of complete operations and from processing modules MO..M(i-1) if i≠ O for the performance of predict operations, and to communicate itself assignation results to processing modules MO..M(i-1) if i≠ O for the performance of complete operations as soon as the assignation results just mentioned have been determined and to processing modules M(i+1)..Mn for the performance of predict operations as soon as the assignation results just mentioned have been determined. 5. A device to be used in parsing a language for determining the permissibility of a series of a1..an end symbols to be translated as being derivable by means of a set of production rules on the basis of a predetermined context-free grammar G, by assigning dotted rules to elements Ti,j, whereby O ≦ i ≦ j ≦ n, of a recognition matrix, which dotted rules indicate the derivability of a series of end symbols a(i+1), a(i+2) .. aj wherein the assignation to element Ti,j (i≠j) takes place on the basis of dotted rules assigned to element Ti,(j-1) by performing a scan operation on said latter elements, and of dotted rules assigned to a first series of element pairs Ti,(j-1)/T(j-1),j; Ti,(j-2)/T(j-2),j ..., Ti,(i+1)/T(i+1),j; Ti,i/Tj,j by performing complete operations over said respective element pairs, characterized in that the assignation to element Tj,j is by effecting a pseudo-predict operation over said element using only locally available information and disregarding predict operations which were based on assignations to other elements Ti,j, in that at least 1/2(n+1)(n+2)-1 processing modules are provided, so that every element of the recognition matrix, except Tn,n, has assigned its own processing module, said modules being provided with row communication facilities and column communication facilities in order to supply assigned dotted rules to processing modules with lower values of i and higher values of j, if present, in that an assignation result formed is supplied directly to all the processing modules in the relevant row or column, respectively, in so far as these latter processing modules need the latter assignation result, and in that an operation which can be carried out on the basis of received assignation results is performed unconditionally with respect to processing stages in other processing modules, all modules Mi,j, are bidirectionally connected by an interconnection network, in that each processing module Mi,j, whereby O ≦ i ≦ j ≦ n, contains reception facilities in order to receive the above-mentioned end symbols, a program memory in order to store a test program with respect to the above-mentioned permissibility, a processing element in order to carry out under the control of the above-mentioned test program an assignation to the relevant matrix element Ti,j, and first connection facilities in order to receive assignation results from modules Mi,x, whereby i ≦ x ≦ j , in so far as present, second connection facilities in order to receive assignation results from modules My,j, whereby i ≦ y ≦ j, third connection facilities in order to transmit assignation results formed immediately to modules Mi,z (j ≦ z ≦ n), and fourth connection facilities in order to transmit assignation results formed immediately to modules Mw,j, whereby O ≦ w ≦ i. 6. Device according to Claim 5, characterized in that control facilities are available in order to deactivate, under the control of a predetermined range of values of n below a critical value, all the processing modules, except of column of n+1 processing modules and then to cause the processing to take place only in the above-mentioned column. 7. A translation machine comprising input means for receiving a sequence of source expressions, a store connected to said input, a device according to any of Calims 4, 5 or 6 and connected to said store, for testing said permissibility of an expression as representing a series of end symbols, a translator fed by said multimodular device and by said store to receive a source expression and under control of an ultimate assignation result execute a syntax driven code generation for said source expression, and output means fed by said translator for outputting a destination expression thus generated.

Inventors: OERLEMANS, ADRIANUS CORNELIS MARIA, SIJSTERMANS, FRANSISCUS WILHELMUS
Applicants: N.V. PHILIPS' GLOEILAMPENFABRIEKEN
Application year: 1987
Main classification: G06F9
IPC codes: G06F17, G06F9