Programming language processing system with program translation performed by term rewriting with pattern matching5530863Abstract A programming language processing system for a computer language processing system wherein a program described in a high level programming language is translated into another program written in lower level programming language. In one embodiment of the invention, a specification of a programming language incorporates a concept of handling various basic words classified by parts-of-speech including nouns, adjectives, conjunctions, and various logic words. The program described by the programming language is converted into an internal expression form based on a sentence structure which can be converted to a binary tree. In accordance with a logic synthesis rule for term-rewriting based on a pattern collation, a logic expressed by the internal expression form is subject to conversion to a lower level program description wherein the parts-of-speech are deleted. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
______________________________________
Description by Language L
______________________________________
' storehouse generation : s ' .ident.
the. storehouse : s = be
' container generation : c ' .ident.
the. container : c = be
' wine bottle accommodation : c : m : n' .ident.
many : n. bottle : b = be
WHERE
the. bottle : b = of - the. brand : m and
the. bottle : b = in - the. container : c
' container sent in : c : s ' .ident.
the. container: c = in-the. storehouse: s
' customer order : k : m :n ' .ident.
REPEAT n
WHEN some. (of-the. brand: m). bottle: b
= in some. storehouse: s
the. bottle: b= in-the. customer: k and
the. bottle: b= not-in-the. storehouse: s
' empty container automatically sent out ' .ident.
WHILE ever
WHEN for some.(in-some.storehouse:s).container:c
all. bottle=not-in-the.container:c
the. container: c= not-in-the. storehouse: s
______________________________________
The example described in the above is a complete specification description written in language L for a storehouse control system of a wine dealer. If the above specification is given to language L processing system, executable codes are generated automatically, and if a command is taken in, the operation is started. The program reads as follows. The whole program constitution of storehouse control is described as follows. `storehouse generation: s` .ident.P 1 `container generation: c` .ident.P 2 `wine bottle accommodation: c: m: n` .ident.P 3 `container sent in: c: s` .ident.P 4 `customer order: k: m: n` .ident.P 5 `empty container automatically sent out` .ident.P 6 The above can be read as "the wine dealer storehouse control system is made by processing the commands in the number of 6 (which is given in quotation marks), and the meanings of these commands are represented by P1, P2, - - - , P6." The characters in a row which is given in quotation marks is a command character row itself to be effected as an entry by an operator, and ": variable" is a parameter of that command. In the descriptive portion of the individual command, for example, the storehouse generation can be read as "storehouse generation command means that one storehouse having a name indicated by "s" is generated (be)." This command is only for setting up a circumstance of the given problem. A command for the wine bottle accommodation is read as "Wine bottle accommodation command means that wine bottles in the specified number ("many: n") having a specified brand ("of-the. brand: m") is accommodated in the container ("in-the. container: c"). Customer order is read as "customer order means that: the wine bottle having a specified brand is in storehouse in somewhere ("WHEN some. (of-the. brand: m).bottle: b=in-some. storehouse: s"); the wine bottle is delivered to the customer ("the. bottle:b=in-the.customer:k"); and the bottle is not in the storehouse ("the.bottle:b=not-in-the.storehouse:s"), and customer order also means that the above execution is repeated as many times as that of the required bottle number ("REPEAT n")." It should be noted that conjunction WHEN used in this command has a meaning wherein if a condition described in the command is not satisfied, processing is kept in synchronization (standby) until the condition is satisfied. The conjunction WHEN and adjective "in" in this example of the program exhibits in particular an important function. Function of WHEN is described in the foregoing, and function of "in" is to act as a relation having a kind of transitivity (a relation having a kind of transitivity is defined in the dictionary of language L). For example, from a transitivity of the adjective "in", language L makes reasoning that if a bottle is put in a container, and the container is sent to a storehouse, then the bottle also is put in the storehouse, and that if a bottle is sent out from a storehouse to a customer somewhere, the bottle is not in any container in the storehouse. The above meaning is given as a logical result. The complicated system control of the wine dealer storehouse is easily expressed only by the use of the simple description as described above and by the organic utilization of language meaning. Furthermore, the difference from the conventional method for software development will be described as follows. In the conventional processing for development, it is an ordinary method to share the command processing of six portions with six persons respectively. In this case, since the six portions have a close relation with each other, it is necessary to determine a mutual interface condition in advance and then to exercise a combined test in the whole system after completion thereof. The software development method as described above is applied in the same manner also for the case that the whole system is developed by only one person. To the contrary, according to the present invention, conformation process for mutual interface and whole consistency is not required. This is in most part attributed to the vocabulary sharing and the function of the conjunction WHEN, logical quantifier such as "all", "some", etc. FIGS. 3A and 3B are diagrams illustrating a relation between program and process. A mutual interface problem of programs arising at the time of the software development and a mutual interaction in execution process of software system both are illustrated in FIGS. 3A and 3B in a way of combination. Symbols Px such as Pa, Pb, - - - show programs (process) respectively, and arrow marks illustrate these mutual interfaces. [EXAMPLE 2: Declarative Description of Mathematical Function by Language L] Problem Writing out a program by which a solution of "Fibonacci function" or "MacCarthy 91 function can be obtained.
______________________________________
Description by language L
______________________________________
`Fibonacci:a` .ident.
FOR the.numeral:a,some.function:f
f<a>=answer
WHERE
f<0>=1 and
f<1>=1 and
for all.numeral:x
f<x+2>=f<x+1>+f<x>
`91 function a` .ident.
FOR the.numeral:a,some.function:f
f<a>=answer
WHERE
for all. numeral:x
((x>100.fwdarw. f<x>=x-1)and
(x .ltoreq. 100 .fwdarw. f<x>=f<f<x+11>>))
______________________________________
Most of the above described expressions are so basic as to be found in a mathematical text book, and in other words, any consideration for algorithm is unnecessary. Needless to say, not only such as mathematical function but also any of a restraint description in language L can be expressed by the above type program. Moreover, in comparison with the conventional language, the advantages will be shown in particular with respect to an adjective, logical quantifier, synchronization conjunction WHEN, and real existential word "nil". The comparison example clearly indicates a complexity and the decreased yield of production in the use of the conventional computer-directed language, as shown in the following. From these examples, it is rational and not luxurious one to demand a realization of such an executable description language. [EXAMPLE 3: Function of Language L Adjective (Relation Description)] Assuming a program for processing that "- - - put a certain apple on a certain desk". The following shows a difference between the descriptions by the conventional language and by language L. The difference shows that the case in language L is apparently much more concise than the conventional one. In language L, a data definition is unnecessary.
______________________________________
Description Description
by Conventional Language
by Language L
______________________________________
program= program=
R1.fwdarw.apple.ON:=R2
the.apple:a=on-the.desk:d
R2.fwdarw.desk.ON:=R1
data definition=
data apple
field ON
data desk
field ON
______________________________________
[EXAMPLE 4: Function of Logical Quantifier in Language L] Assuming a program for processing that "- - - put a certain apple on the blue desk". Following shows a difference data between the conventional language and language L. The difference shows that the case of language L is apparently more concise with respect to the conventional one.
______________________________________
Description Description
by Conventional Language
by Language L
______________________________________
program= program=
R1:=TOPTABLE.apple some.apple=
if R1 .noteq. 0 then
on-some.blue.desk
begin
R2:= TOPTABLE.desk
until R2=0
begin
if R2.fwdarw.desk=blue then
exist
R2:= R2.fwdarw.desk.NEXT
end
if R2 .noteq. 0 then
begin
R1 .fwdarw.apple.ON:=R2
R2 .fwdarw.desk.ON:=R1
end
end
data definition=
data TOPTABLE
field apple
field desk
data apple
field ON
field NEXT
data desk
field ON
field NEXT
______________________________________
[EXAMPLE 5: Function of Synchronization Conjunction WHEN in Language L] When language L is used, how the synchronization conjunction WHEN in language L simplifies the description of a dynamic or parallel system compared with the conventional language, will be understood in a simple example as follows. Assuming a dynamic system comprising 6 programs, that is: a program A where if "p" and "q", or "s" are reached, then "u" is executed; a program B where if "q" and "r" are reached, then "v" is executed; a program P where "p" is executed; a program Q where "q" is executed; a program R where "r" is executed; and a program S where "s" is executed. Now the comparison of the case in the conventional language with language L will be shown as follows. The description by the conventional language below is extremely difficult to understand (reader may not easily imagine to reversely obtain the originally given specification from this program group), and in addition, the conventional description tends to be mistook. Contrary to this, the language L description is so written as to trace substantially along with the given problem (how the description in language L is executable and operable, will follow in detail in a later chapter in this specification).
______________________________________
Description by the Conventional Language
program A= program B=
wait(A) wait(B)
u v
program P= Program Q=
p q
if q or s if r
then then
post(A) Post(B)
if p or s
then
post(A)
program R= Program S=
r s
if q post(A)
then
post(B)
Description by the Language L
Program A= Program B=
WHEN(p and q) or s WHEN q and r
u v
Program P= Program Q=
p q
Program R= Program S=
r s
______________________________________
[EXAMPLE 6: Function of Real Existential Word "nil"] Assuming a processing when a job scheduler in an operating system terminates a certain job. In such a case, the job scheduler not only has to terminate the job but also in advance make a processing to send back all resources such as memory, external storage, and the like which have been assigned to this job. The external storage is assumed to have as usual a hierarchy structure such as member/file/volume. Such a job scheduler written in both the conventional language and language L is shown as follows. Description by Conventional Language (For clear understanding of an existential "nil", a basic word and a sentence structure are used in this example, but not in the conventional language. If this "nil" arrangement is not made, this kind of program becomes more complicated.)
______________________________________
Job scheduler =
for all.(of-the.job).member
begin
the.member=not-of-the.job
end
for all.(of-the.job).file
begin
the.file=not-of-the.job
end
for all.(of-the.job).volume
begin
the.volume=not-of-the.job
end
for all.(of-the.job).memory
begin
the.memory=not-of-the.job
end
the.job=nil
Description by Language L
job scheduler=
the.job:j=nil
______________________________________
More specifically, language L uses the real existential word (non-real-existential word) "nil", which is defined in language L as a word having an agreement that if a certain thing becomes "nil" (becomes non-real-existential state), the thing comes to have no relation with any other entity (existence). As will be seen in the above job scheduler, such a concise description can be enough to execute the processing. In order to supplement the foregoing, in the problem of this job scheduler, if there is given in addition a condition that if a file is assigned to a job, but still intended for the use of the job and at this time another job comes to wait, then immediately the file is assigned to that other job (such a case often appears in ordinary processing). Thus, integrated functions of both the above additional condition and the synchronization conjunction WHEN remarkably increase a superiority of the description by language L compared with the conventional way. [3] Logic System Organization of the Language L Language L is based on "a natural language". In more detail, language L is constituted on the basis of a high order intentional logic to depend on a logic organization (hereinafter referred to as a logic) as extended by introducing dynamic logic and concept of sort. [3.1] Syntax (1) Type: A set of type of language L is a minimum set T to satisfy the following condition, 1 e,t T 1' c,p,u.sub.t, .about., u.sub.n T 2 if a T and b T, then <ab> T 3 if a T, then <sa> T A semi-ordered relation.ltoreq.is defined on the set of type of language L, and satisfying the below conditions. (a) u.sub.t, .about., u.sub.n .ltoreq.e (b) if v.ltoreq.a and w.ltoreq.b, then <vw>.ltoreq.<ab> (2) Primitive Symbol: .ident.(equality), .lambda.(abstraction), .uparw.(intention, .dwnarw.(extension), [(left parenthesis), ](right parenthesis), and, for each type "a", enumerable constants "C.sub.a.sup.1, C.sub.a.sup.2," and enumerable variables "x.sub.a.sup.1, x.sub.a.sup.2 " are prepared. Further, a constant of type <e.sup.n t> (this expresses `relation` intuitively) is classified into either of a base relation or derivative relation. The constant <e.sup.n t> is an abbreviation of <e<e . . . <et>>. (3) Consistent wff: A set "Wa" of consistent wff of type "a" in language L is defined recursively in following. 1 X.sub.a W.sub.a for all variables X.sub.a of type "a" in language L. 2 C.sub.a W.sub.a for all variables C of type "a" 3 if A W.sub.<ab> and B W.sub.a, then <A B> W.sub.b. 4 if A W.sub.b and x W.sub.a, then .lambda.x,A W.sub.<ab>. 5 if A, B W.sub.a, then <A.ident.B] W.sub.t. 6 if A W.sub.a, then .uparw.A W.sub.<sa>. 7 if A W.sub.<sa>, .dwnarw.A W.sub.a. 8 if A W.sub.t, .circleincircle.A W.sub.p. 9 if A W.sub.p, and B W.sub.p, then [A B] W.sub.p. .circle. 10 if x W.sub.e (x is variable), then x W.sub.<sp>. .circle. 11 if A W.sub.t, [.about.A] W W.sub.t. .circle. 12 if A W.sub.t and B W.sub.t, then [A B] W.sub.t. .circle. 12 ' if a W.sub.p and B W.sub.p, then [A and B] W.sub.p. .circle. 13 if A W.sub.t and B W.sub.t, then [A B] W.sub.t. .circle. 13 ' if A W.sub.p and B W.sub.p, then [A or B] W.sub.p. .circle. 14 if A W.sub.t and B W.sub.t, then [A.fwdarw.B] W.sub.t. .circle. 14 " if A W.sub.t and B W.sub.p and C W.sub.p, then [IF A B C] W.sub.p. .circle. 15 if x.sub.A W.sub.A (x is variable) and B W.sub.t and C W.sub.p then [II x.sub.A B C] W.sub.p .circle. 15 ' if x.sub.A W.sub.A (x is variable) and B W.sub.t and C W.sub.p then [II x.sub.A B C] W.sub.p .circle. 16 if x.sub.A W.sub.A (x is variable) and B W.sub.t and C W.sub.p then [.SIGMA.x.sub.A B C] W.sub.p .circle. 16 ' if x.sub.A W.sub.A (x is variable) and B W.sub.t and C W.sub.p then [.SIGMA.x.sub.A B C] W.sub.p .circle. 17 if D W.sub.c and x.sub.A W.sub.A (x is variable) and B W.sub.t and C W.sub.p, then [.THETA.D x.sub.A B C] W.sub.t .circle. 17 ' if D W.sub.c and x.sub.A W.sub.A (x is variable) and B W.sub.t and C W.sub.p, then [.THETA.D x.sub.A B C] W.sub.t .circle. 18 if C W.sub.c and A W.sub.p, then [REPEAT C A] W.sub.p .circle. 19 if A W.sub.t and B W.sub.p, then [WHEN A B] W.sub.p .circle. 20 if A W.sub.t and B W.sub.p, then [WHILE A B] W.sub.p .circle. 21 if A W.sub.e, [be A] W.sub.t .circle. 22 if A W.sub.e, [nil A] W.sub.t .circle. 23 if A W<e.sup.n t>, [not A] W.sub.t <e.sup.n t> .circle. 24 if x W.sub.e (x is variable) and A W.sub.t and B W.sub.c, then [sum x A B] W.sub.c [3.2] Semantics (1) Model: A model "M" of logical language L is an order pair <D, I, m>. Where: D: non-empty enumerable infinitive set I: a set of the natural number, on which an ordinary mathematical axiom is established m: function capable of assignment of "D.sub.<sa> " to respective constant element, satisfying the following formula 1 as for all base relation C<e.sup.n t>, m(C <e.sup.n t>) (0, 1)=.phi. 2 m(C.sub.e)(<i,j>)=m(C.sub.e)(<0, 1>) 3 m(C <e.sup.n t>) (<i, j>)=m(C <e.sup.n t>) (<i, k>) An interpretation domain of logic L is determined as follows. 1 D.sub.e =D 1' D.sub.ui D where D.sub.ui is enumerable infinitive set, and if v.ltoreq.w, then D.sub.v D.sub.w. 2' D.sub.c =I 3 D.sub.t ={1, 0} 4' D.sub.p ={1, 0} 5 D.sub.<ab> ={f.vertline.f:D.sub.a .fwdarw.D.sub.b } 6' D.sub.<sa> ={f.vertline.f:S.fwdarw.D.sub.a }where S={<i, j>.vertline.i,j I, i<j} this hereinafter referred to as the same (2) Assignment: A variable assignment function is prepared to permit an element "D.sub.a " to correspond each variable "x.sub.a ". (3) Valuation function: In the case a valuation function "v" can give meaning value relative to a model "M," "<i, j> S", and variable assignment function ".alpha." to a given consistent wff, such a valuation function "v" is defined recursively as shown below. V (M,<i, j>,, W) is abbreviated to Vi,j, .alpha.(W) . 1 Vi,j, .alpha.[x.sub.a ]=.alpha.[x.sub.a ] 2 Vi,j, .alpha.[C.sub.a ]=(m (C.sub.a))(<i, j>) 3 Vi,j, .alpha.[A.sub.ab B.sub.a ]=Vi,j,.alpha.[A.sub.ab ](Vi,j, .alpha.[B.sub.b ]) 4 Vi,j, .alpha.[.lambda.x.sub.a A.sub.b ]= a function on from D.sub.a to D.sub.b wherein a value in X M.sub.a is equal to Vi,j,.alpha. [A.sub.b ]. where .alpha.'=.alpha. (x/X). ".alpha.'=.alpha. (x/X)" represents the same variable assignment function as ".alpha.", except the case it assigns "X" to "x". 5 Vi,j, .alpha. [A.sub.a .ident.B.sub.a ]=1 iff Vi,j, .alpha. [A.sub.a ]=Vi,j, .alpha. [B.sub.a ] 6 Vi,j,.alpha. [.uparw.A.sub.a ]= function from S to D.sub.a wherein a value in <i',j'> S is equal to Vi',j', .alpha. [A.sub.a ] 7 Vi,j, .alpha. [.dwnarw.A.sub.<sa> ]= Vi,j,.alpha. [A.sub.<s<sa>> ] (<i, j>) 8 Vi,j, .alpha. m n [.circleincircle.A.sub.t ]=1 iff k where j<k I, and Vj,k,.alpha. [A.sub.t ]=1 9 Vi,j,.alpha. [A.sub.p z,1 B.sub.p ]=1 iff i<j'<i'<j is conditioned to j',i' I, accordingly Vi,j',.alpha. [A.sub.p ]=1 and Vi',j, .alpha. [B.sub.p ]=1 .circle. 10 Vi,j,.alpha. [.dwnarw.(x.sub.A)]=1 iff Vi,j,.beta. [be A.sub.A ]=1 where .alpha.(x.sub.A)= Vi,j,.beta. [A.sub.A ] .circle. 11 Vi,j,.alpha. [.about.A.sub.t ]=1 iff Vi,i,.alpha. [A.sub.t ]=0 .circle. 12 Vi,j,.alpha. [A.sub.t B.sub.t ]=1 iff Vi,j,.alpha. [A.sub.t ]=1 and Vi,j,.alpha. [B.sub.t ]=1 .circle. 12 ' Vi,j,.alpha. [A.sub.p and B.sub.p ]=1 iff Vi,j,.alpha. [A.sub.p ]=1 and Vi,j,.alpha. [B.sub.p ]=1 .circle. 13 Vi,j,.alpha. [A.sub.t B.sub.t ]=1 iff Vi,j,.alpha. [A.sub.t ]=1 or Vi,j,.alpha. [B.sub.t ]=1 .circle. 13 ' Vi,j,.alpha. [A.sub.p or B.sub.p ]=1 iff Vi,j,.alpha. [A.sub.p ]=1 or Vi,j,.alpha. [B.sub.p ]=1 .circle. 14 Vi,j,.alpha. [A.sub.t .fwdarw.B.sub.t ]=1 iff Vi,j,.alpha. [A.sub.t ]=0 or Vi,j,.alpha. [B.sub.t ]=1 .circle. 14 ' Vi,j,.alpha. [IF A.sub.t B.sub.p C.sub.p ]=1 iff if Vi,j,.alpha. [A.sub.t ]=1, then Vi,j,.alpha. [B.sub.p ]=1 if Vi,j,.alpha. [A.sub.t ]=0, then Vi,j,.alpha. [C.sub.p ]=1 .circle. 15 Vi,j,.alpha. [II X.sub.A B.sub.b C.sub.t ]=1 iff for all variable assignment function .alpha.', and except assignment to X.sub.A, Vi,j,.alpha.' [be X.sub.A ]=1 and Vi,j,.alpha.' [B.sub.t ]=1, then Vi,j,.alpha.' [C.sub.t ]=1 .circle. 15 ' Vi,j,.alpha. [II X.sub.A B.sub.t C.sub.p ]=1 iff for all variable assignment function .alpha.', and except assignment to X.sub.A, Vi,j,.alpha.' [be y.sub.A ]=1 and Vi,j,.alpha.' [B.sub.t ]=1, then Vi,j,.alpha.' [C.sub.p ]=1 .circle. 16 Vi,j,.alpha. [.SIGMA.X.sub.A B.sub.t C.sub.t ]=1 iff for all variable assignment function .alpha.', and except assignment to X.sub.A, Vi,j,.alpha.' [be X.sub.A ]=1 and Vi,j,.alpha.' [B.sub.t ]=1, and Vi,j,.alpha.' [C.sub.t ]=1 .circle. 16 ' Vi,j,.alpha. [.SIGMA.X.sub.A B.sub.t C.sub.p ]=1 iff for all variable assignment function .alpha.', and except assignment to X.sub.A, Vi,j,.alpha.' [be X.sub.A ]=1 and Vi,j,.alpha.' [B.sub.t ]=1, and Vi,j,.alpha.' [C.sub.p ]=1 .circle. 17 Vi,j,.alpha. [.THETA.D.sub.c X.sub.A B.sub.t C.sub.t ]=1 iff the same as in the case of ".alpha.", except relative to different assignment value of X.sub.A Assignment functions .alpha..sub.1 .about..alpha..sub.D different from each other are provided. Vi,j,.alpha.k [be y.sub.A ]=1 and Vi,j,.alpha.k [B.sub.t ]=1 and Vi,j,.alpha.k [C.sub.t ]=1 where "k" satisfies 1.ltoreq.k.ltoreq.D .circle. 17 ' Vi,j,.alpha. [.THETA.D.sub.c X.sub.A B.sub.t C.sub.p ]=1 iff the same as in the case of ".alpha.", except relative to different assignment value of X.sub.A Assignment functions .alpha..sub.1 .about..alpha..sub.D different from each other are provided. Vi,j,.alpha..sub.k [be y.sub.A ]=1 and Vi,j,.alpha..sub.k [B.sub.t ]=1 and Vi,j,.alpha..sub.k [C.sub.p ]=1 where "k" satisfies 1.ltoreq.k.ltoreq.D .circle. 18 Vi,j,.alpha. [REPEAT A.sub.c B.sub.p ]=1 iff "i=i.sub.1 <j.sub.1 <. . . ,<i.sub.A <j.sub.A =j" is conditioned to "i.sub.1, j.sub.1, . . . , i.sub.A,j.sub.A ". V i.sub.k, j.sub.k, .alpha., [B.sub.p ]=1 where "k" satisfies 1.ltoreq.k.ltoreq.A .circle. 19 Vi,j,.alpha..sub.k [WHEN A.sub.t B.sub.p ]=1 iff if Vi,j,.alpha. [A.sub.t ]=1 then Vi,j,.alpha. [B.sub.p ]=1 if Vi,j,.alpha. [A.sub.t ]=0 then Vi+1,j,.alpha. [WHEN A.sub.t B.sub.p ]=1 .circle. 20 Vi,j,.alpha. [WHILE A.sub.t B.sub.p ]=1 iff "i=i.sub.1 <j.sub.1 <. . . , <i.sub.m <j.sub.m =j" is conditioned to "i.sub.1, j.sub.1, . . . , i.sub.m j.sub.m ". Vi.sub.k, j.sub.k, .alpha., [A.sub.t ]=1 and Vi.sub.k, j.sub.k, .alpha., [B.sub.p ]=1 where "k" satisfies 1.ltoreq.k.ltoreq.m .circle. 21 Vi,j,.alpha. [be A.sub.e ]=1 iff Vi,j,.alpha. [nil A.sub.e ]=1 .circle. 22 Vi,j,.alpha. [not A<e.sup.n t>B<e.sup.n >]=1 iff Vi,j,.alpha. [A<e.sup.n t>B<e.sup.n >]=0 .circle. 23 Vi,j,.beta. [#A.sub.<et> ]= the number of elements of Vi,j,.beta. [A.sub.<et> ] .circle. 24 Vi,j,.alpha.,.beta. [sum x.sub.e A.sub.t B.sub.c ]= sum of B.sub.c for all x.sub.e satisfying A [3.3] Relation to Programming Concept A basic concept of ordinary programming can be respectively positioned in this logical system organization as described below: 1 Logical expression formula (wff): A consistent wff of a type "t" (propositional wff) 2 Program: A consistent wff of a type "p" (act formula wff) 3 Program name: A constant of type "<e.sup.* p>" or type "p" 4 Specification description (description of programming system): A consistent wff of a type "t" in the following. (.uparw.C.sub.p .tbd..uparw.D.sub.p) . . . (.uparw.E.sub.t .tbd..uparw.F.sub.t) . . . 5 A command "C" is written at the time of "i": A model constraint is also given as shown below. j .epsilon.I.(Vi, j, .alpha.[C]=1) where "C" is a constant of type <e.sup.n p> or type "p". Specifying parameters of the command corresponds to determining the variable assignment function .alpha.. 6 An execution of programming system: Under given model constraint, obtaining the model (solution) responsive to the given specification (axiom, theory). [4] Sentence Structure and Meaning of Language L The sentence structure of language L is one provided with "syntax-sugar" on the logic L as shown in the paragraph [3]. A syntax and semantics rule thereof is described in Appendix-1. Although a BNF rule is not written in the Appendix-1 for preventing complexity, various kinds of simplified expressions are allowed in a "where" type sentence. For example, the following two expressions are equal. 1 for all.PEN:x where the.PEN:x=red for some.DESK:y where the.DESK:y=tall the.PEN:x=on-the.DESK:y 2 all.red.PEN:x=on-some.tall.DESK:y
__________________________________________________________________________
Appendix-I Syntax and Semantics Rules
__________________________________________________________________________
<<Specification>> : := <<Definition Row>>
<<Definition Row>> : := <<Definition>> .vertline.
<<Definition Row:A>> <<Definition:B>>
A.sub.t B.sub.t
<<Definition>> : :=
` <<Program Name:A>> ` .ident. <<Action: B>> .vertline.
( .uparw.A.sub.p ) .ident. ( .uparw.B.sub.p )
the. <<Noun:A>> : <<Variable:x>> .ident. <<Action:B>> .vertline.
( x.sub.A ) .ident. ( .uparw.B.sub.p )
<<Basic Proposition:A >> .ident. <<Proposition:B >> .vertline.
( .uparw.A.sub.t ) .ident. ( .uparw.B.sub.t )
<< Basic Action:A >> .ident. <<Action:B>>
( .uparw.A.sub.p ) .ident. ( .uparw.B.sub.p )
<<Program Name>> : := << Part of Program Name >> .vertline.
<<Program Name>> << Part of Program Name >> .vertline.
<< Part of Program Name >> ::=
<<Character String>> : <<Variable>>
<<Proposition >> ::= <<Simple Proposition>> .vertline.
.about.( <<Proposition:A >> ) .vertline.
.about.A.sub.t
<<Proposition:A >> and <<Proposition:B >> .vertline.
A.sub.t B.sub.t
<<Proposition:A >> or <<Proposition:B >> .vertline.
A.sub.t B.sub.t
<<Proposition:A >> .fwdarw. <<Proposition:B >> .vertline.
A.sub.t B.sub.t
<<Simple Proposition>> ::= <<Basic Proposition >> .vertline.
<<Simple Action >>
for <<Definitive Clause:E >> <<Noun:A>> : <<Variable:x>>
where <<Proposition:B >> <<Proposition:C >>
E.sub.<e<t<tt>>> (x.sub.A, B.sub.t, C.sub.t )
<<Basic Proposition >> ::=
true .vertline. false .vertline. <<Object:x.sub.A >> <<Descriptive >>
<< Basic Action >><<Relation:R>> .vertline.
R.sub.<et> (x.sub.A ) or .about. R.sub.<et> (x.sub.A ))
<<Relation:R>> ( <<Object:x.sub.A >> ) .vertline.
R.sub.<et> (x.sub.A ) or .about. R.sub.<et> (x.sub.A ))
<<Object:x.sub.A >> <<Descriptive >> <<Relation:R>>-
<<Object:y.sub.B >> .vertline.
R.sub.<e<et>> (x.sub.A,y.sub.B)or .about.(R.sub.<e<et>> (x.sub.A,y.sub.B)
<<Relation:R>>
( <<Object:x.sub.A >> , <<Object:y.sub.B >> ) .vertline.
R.sub.<e<et>> (x.sub.A ,y.sub.B)
<<Relation:R>> ( <<Object:x.sub.A >> ,
<<Object:y.sub.B >> , <<Object:z.sub.c >> ) .vertline.
R.sub.<e<e<et>>> (x.sub.a, y.sub.B, z.sub.c)
<<Object:x.sub.a >> <<Comparative:R >> <<Object:y.sub.a >>
R.sub.<a<at>>
<<Action>> ::= <<Simple Proposition:A>> .vertline.
A.sub.p
DO( <<Simple Proposition:S.sub.t >> ) .vertline.
.circleincircle. (S.sub.t) or (if S is a basic Proposition)
E.sub.<e<e<et >>> ( x.sub.a, B.sub.t, .circleincircle. (C.sub.t ))
(if S=E( x.sub.A, B.sub.t, C.sub.t))
BE <<Proposition:A.sub.t >>
.vertline. DO <<Row of Action:A >> END .vertline.
.circleincircle. (A.sub.t)
REPEAT <<Number:C>> <<Action:B>> .vertline.
REPEAT.sub.<c <pp>> (C.sub.c, B.sub.p)
WHEN <<Proposition:A >> <<Action:B>> .vertline.
WHEN.sub.<t<pp>> (A.sub.t, B.sub.p)
WHILE <<Proposition:A >> <<Action:B>> .vertline.
WHILE.sub.<t<pp>> (A.sub.t, B.sub.p)
UNTIL <<Proposition:A >> <<Action:B>> .vertline.
WHILE.sub.<t<pp>> (.about.A.sub.t, B.sub.p)
IF <<Proposition:A >> THEN <<Action:B>> .vertline.
IF.sub.<t<P<PP>>> (A.sub.t, B.sub.P, .circleincircle. (true))
IF <<Proposition:A >> THEN <<Action:B>> ELSE
<<Action:c>>
IF.sub.<t<P<PP>>> (A.sub.t, B.sub.p, C.sub.p)
<<Action:A>> and <<Action:B>> .vertline.
<<Action:A>> or <<Action:B>>
A.sub.p and B.sub.p A.sub.p or B.sub.p
<<Row of Action >> ::= <<Action:A>> .vertline.
<<Row of Action:A >> <<Action:B>>
A.sub.p A.sub.p B.sub.p
<<Object>> ::= the. <<Noun:A>> : <<Variable:x>> .vertline.
x.sub.A
the. <<Noun:A>> : <<Proper Noun:C >> .vertline.
C.sub.A
<<Object:x.sub.A >> . . <<Function:F>> .vertline.
F.sub.<Ab> x.sub.A
<<Function:F>> < <<Object:x.sub.A >> > .vertline.
F.sub.<Ab> x.sub.A
<<Relation>> ::= <<Relative>> .vertline. not- <<Relative>>
<<Definitive Clause >> ::= all .vertline. some .vertline.
.sub.<e<t<tt>>> or .sub.<e<t<pp>>> .SIGMA..sub.<e<t<tt >>> or
.SIGMA..sub.<e<t<pp>>> many. < <<Number:C>> >
.THETA..sub.<c<e<t<tt >>> (C.sub.c ) or .THETA..sub.<c<e<t<tt >>>
(C.sub.c )
<<Number>> ::= <<Numeral>> .vertline. the.NUMBER: <<Variable>> .vertline.
2
# ( <<Noun:A>> : <<Variable:x>> where
<<Proposition:B > > ) .vertline.
#.sub.<e<tc>> (x.sub.A, B.sub.t)
<<Number>> + <<Number>> .vertline. <<Number>> - <<Number>> .vertline.
<<Number>> * <<Number>> .vertline. <<Number>> / <<Number>> .vertline.
sign< <<Number>> > .vertline. abs < <<Number>> >
sum < <<Noun:A>> : <<Variable:x>> where
<<Proposition:B >> , <<Number:C>> )
sum.sub.<e<t<cc>>> (x.sub.a, B.sub.t, C.sub.c)
<<Descriptive >> ::= = .vertline. .noteq.
<<Comparative >> ::= = .vertline. .noteq. .vertline. .ltoreq. .vertline.
<
<<Definitive>> ::= all .vertline. some .vertline. many .vertline. the
<<Noun>> ::= THING .vertline. NUMBER .vertline. FUNC
(the others also definable arbitrarily)
<<Relative>> ::= by .vertline. to .vertline. in .vertline. at .vertline.
of
(the others also definable arbitrarily)
<<Numeral >> ::= numerical strings
<<Proper Noun >> ::= alpha-numerical strings with more
than two alphabets at their heads
<<Variable>> ::= alpha-numerical strings with only
one alphabet at their heads
__________________________________________________________________________
[5] Logic Synthesis in the Language L [5.1] "Mechanism of Logic Synthesis" and "Binary Tree Expression of Program" A logic synthesis of a program in language L is executed in such a manner that a term rewriting system rewrites a program expressed in a form of a binary tree, by utilizing a logic synthesis rule as a term rewriting rule. In the above, it becomes a base of the logic synthesis mechanism of language L that the program of language L is represented by the binary tree. Therefore, although apparent from the sentence structure rule of language L (or logic L), the program in language L which can be represented by the binary tree now will be described in the exercise as follows. EXAMPLE Program in Language L (Simplified Expression) WHILE some.bottle:b=in-some.storehouse:s the.bottle:b=in-the.customer:k regular expression (WHILE(((.SIGMA. bottle:b) T)((.SIGMA. storehouse:s) T) ((in bottle:b) storehouse:s)))) (.circleincircle.((in bottle:b) customer:k)) This binary tree expression is illustrated in FIG. 4. To represent the above regular expression in the binary tree is easily understood from FIG. Next, an application of the logic synthesis rule will be shown on the same exercise. The application example will be shown later. Assuming that a following logic synthesis rule is proposed.
______________________________________
DO (the.X:x=in-the.customer:y)
==>
DO
the.X:x=in-the.customer:y
the.X:x=(not-in)-all.storehouse:s
END
______________________________________
This rule is intuitively meant by "that: a fact wherein the thing of "X" comes to be a relation of "in" with a customer "y", indicates at the same time such an "X" as becomes no relation of "in" with any storehouse; if the descriptive portion wherein the "X" having a relation of "in" with the customer "y" is found, a relative portion of the description should be rewritten such that the "X" has no relation of "in" with any storehouse". The above described rule can be rewritten to the regular expression (approximated form to the regular expression as follows.
______________________________________
( .circleincircle. ((in X:x) customer:y))=>
(( ( .circleincircle. ((in X:x) customer:y)))
((( storehouse:s) T)
( .circleincircle. (((not(in))X:x) storehouse:s))))
______________________________________
Since the same description as the left side in formula of this rule is in the original program, the description in the program is now replaced by the right side of this rule. Then, the variable "X", "x", and "y", are unified with the "bottle", variable "b", and variable "k" respectively. That is, in the original program: (.circleincircle.((in bottle:b) customer:k)) is rewritten as:
______________________________________
(( ( .circleincircle. ((in bottle:b) customer:k)))
((( storehouse:s) T)
( .circleincircle. (((not(in)) bottle:b) storehouse:s)))).
______________________________________
The obtained program is represented by the binary tree as is in the foregoing as follows. In other words, the binary tree as is shown in FIG. 4 is converted to another binary tree shown in FIG. 5 in accordance with a logic synthesis rule. [5.2] Logic Synthesis Rule for conjunction, Logic Operative, Logic Quantifier Language L, as a standard, contains a logic synthesis rule of such as the conjunction, logic operative, logic quantifier. In more detail, the logic synthesis rule erases the conjunction, logic operative, logic quantifier, and the like from language L to replace them with an intermediate language expression which becomes an input to an object language extender. This rule is applied to certainly repeat the above operation while the pattern to be applied is being found.
______________________________________
RB1 : Negation Erase (Propositional Formula)
IF .about. S ==> IF S
THEN P THEN Q
ELSE Q ELSE P
where this expression is limited to a case
that R is a basic adjective.
RB2 : Erase (Propositional Formula)
IF S T ==> IF S
THEN P THEN
ELSE Q IF T
THEN P
ELSE Q
ELSE Q
RB3 : Erase (Propositional Formula)
IF S T ==> IF S
THEN P THEN P
ELSE Q ELSE Q
IF T
THEN P
ELSE Q
RB4 : .fwdarw. Erase (Propositional Formula)
IF S .fwdarw. T ==> IF ( .about.S) T
THEN P THEN P
ELSE Q ELSE Q
RB5 : all Erase (Propositional Formula)
IF A:x B C ==> truth=1
THEN P FORALL(A:x)
ELSE Q IF B .fwdarw. C
THEN noop
ELSE
DO
truth:=0
break
END
IF truth=1
THEN P
ELSE Q
______________________________________
Remarks Expression "(A:x)" is another expression form for "X.sub.a ", and hereinafter this refers to the same.
______________________________________
RB6 : some Erase (Propositional Formula)
IF .SIGMA. A:x B C
==> truth=0
THEN P FORALL(A:x)
ELSE Q IF B C
THEN
DO
truth:=1
break
END
ELSE noop
IF truth=1
THEN P
ELSE Q
RB7 : many Erase (Propositional Formula)
IF .THETA. (n) A:x B C
==> count:=0
THEN P FORALL(A:x)
ELSE Q IF B C
THEN
count:=count+1
ELSE noop
IF count .gtoreq.n
THEN P
ELSE Q
RB8 : all Erase (Act Formula)
A:x B P ==> FORALL(A:x)
IF B
THEN P
RB9 : some Erase (Act Formula)
.SIGMA. A:x B P
==> FORALL(A:x)
IF B
THEN
DO
P
break
END
ELSE
noop
RB10 : many Erase (Act Formula)
.THETA. (n) A:x B P
==> count:=0
FORALL(A:x)
IF count.ltoreq. n
THEN
IF B
THEN
DO
P
count:=count+1
END
ELSE
noop
ELSE
break
RB11 : REPEAT Extension
REPEAT n P ==> count:=1
REPEAT .infin.
IF count .ltoreq. n
THEN
DO
P
count:=count+1
END
ELSE
break
RB12 : WHEN Erase
WHEN A P ==> REPEAT .infin.
DO
IF A
THEN
DO
P
break
END
ELSE
DO
post
unlock
wait
lock
END
END
RB13 : WHILE Erase
WHILE A P ==> REPEAT.infin.
DO
IF A
THEN
DO
P
post
unlock
wait
lock
END
ELSE
break
END
RB14 : UNTIL Erase
UNTIL A P ==> WHILE(.about.A) P
RB15 : WHEN Syntagmatic
WHEN A P ==> WHEN A B
or WHEN B Q IF A
THEN P
ELSE Q
RB16 : and (Act Formula) Erase
P.sub.P and Q.sub.P
==> P.sub.P Q.sub.P
______________________________________
PG,39
Remarks Although the above conversion expression results in distortion of the meaning of "and", the distortion may be in an allowable range in view of the operation. An implementation such as can be performed correctly along with the meaning of "and", will be available. [5.3] Base Formula Extension Rule to Intermediate Language There is described as follows an extension rule for extending into an intermediate language the base formula in a language L program wherein the application of the logic synthesis rule thereto has been terminated. The application of the rule is described in [5.2].
______________________________________
RD1-1 : Base Formula Extension
(General Propositional Formula, Term 1)
______________________________________
IF R(A:x) ==> check(1,R,A,x)
THEN P IF rtn=1
ELSE Q THEN P
ELSE Q
______________________________________
Where R is limited to a case of a basic adjective.
______________________________________
RD1-2 : Base Formula Extension
(General Propositional Formula, Term 2)
______________________________________
IF R(A:x, B:y)
THEN P ==> check(2,R,A,B,x,y)
ELSE Q IF rtn=1
THEN P
ELSE Q
______________________________________
Where R is limited to a case of a basic adjective.
______________________________________
RD2-1 : Base Formula Extension
(General Act Formula, Term 1)
______________________________________
.circleincircle. ==>A:x) do(1,R,A,x)
______________________________________
Where R is limited to a case of a basic adjective.
______________________________________
RD2-2 : Base Formula Extension
(General Act Formula, Term 2)
______________________________________
.circleincircle. R(A:x, B:y)
==> do(2,R,A,B,x,y)
______________________________________
where R is limited to a case of a basic adjective, and is the same as in the case of the adjective on or after term 3.
______________________________________
RD3-1 : Base Formula Extension
(General Negation Act Formula)
______________________________________
.circleincircle. ( .about.(R (A:x))
==> undo(1,R,A,x)
______________________________________
where R is limited to a case of a basic adjective.
______________________________________
RD3-2 : Base Formula Extension
(General Negation Act Formula, Term 2)
______________________________________
.circleincircle. ( .about.(R (A:x, B:y))
==> undo(2,R,A,B,x,y)
______________________________________
where R is limited to a case of a basic adjective, and is the same as in the case of the adjective on or after term 3.
______________________________________
RD4 : Base Formula Extension
(Real Existence Act Formula)
.circleincircle. (be (A:c))
==> makec(A,c)
RD5 : Base Formula Extension
(some Real Existence Act Formula)
.circleincircle. ( .SIGMA. A:x (be (A:x)))
==> name(x)
makex(A,x)
RD6 : Base Formula Extension
(Direct Specific Non-Real-Existence Act Formula)
.circleincircle. ( nil (A:c))
==> unmakec(A,c)
RD7 : Base Formula Extension
(Demonstrative Specific
Non-Real-Existence Act Formula)
.circleincircle. ( nil (A:x))
==> unmakex(A,x)
RD8-1 : Function Extension
(Propositional Formula, Term 1)
IF R (F <A:x>) THEN P ELSE Q
==>
find(F,A,x,v)
IF R (V:v )
THEN P
ELSE Q
______________________________________
where R is a basic adjective.
______________________________________
RD8-2 : Function Extension
(Act Formula, Term 1)
.circleincircle. ( R (F <A:x>))
==> find(F,A,x,v)
.circleincircle. ( R (V:v ))
where R is a basic adjective.
RD8-3 : Function Extension
(Propositional Formula, Term 2)
IF R (F <A:x>, B:y) THEN P ELSE Q
==> find (F,A,x,v)
IF R (V:v, B:y)
THEN P
ELSE Q
______________________________________
where R is a basic adjective. A rule with a parameter position of R reversed is provided (omitted in this description).
______________________________________
RD8-4 : Function Extension
(Act Formula, Term 2)
______________________________________
.circleincircle. ( R (F <A:x>, B:y))
==> find(F,A,x.v)
.circleincircle. ( R (V:v, B:y))
______________________________________
where R is a basic adjective. A rule with a parameter position of R reversed is provided (omitted in this description). The foregoing is the same as in the case on or after term 3, and as in the case of .about.R instead of R.
______________________________________
RD10 : some. FUNC Erase
.SIGMA. FUNC:f A P
==> makefunc(f)
REPEAT .infin.
DO
.circleincircle. A
checkdef(f)
IF rtn=1
THEN
DO
P
break
END
ELSE noop
END
Example ]
Fibonacci Function
FOR some.FUNC:f
==> makefunc(FUNC,f)
where REPEAT .infin.
f<0>=1 and DO
f<0>=1 and DO
for all.NUMBER:x
f<0>=1 and
f<x+2>=f<x+1>+f<x>
f<1>=1 and
FOR the. NUMBER :a
FOR all.NUMBER:x
f<a>=answer f<x+2>=f<x+1>+f<x>
END
checkdef(FUNC.f)
IF rtn=1
THEN
DO
FOR the.NUMBER:a
f<a>=answer
break
END
ELSE noop
END
RD10-1 : DO(A B) Extension
(or.circleincircle. (A B) Extension)
DO( A.sub.t B.sub.t )
==> DO <A> and DO(B)
RD10-2 : DO(A.fwdarw.B) Extension
(or.circleincircle. (A.fwdarw.B) Extension)
DO( A.sub.t .fwdarw. B.sub.t )
==> IF A THEN B ELSE noop
______________________________________
Remarks RA10, RA10-1, and RA10-2 are used for extending into an executable procedure the mathematical logic function which has been declaratively defined.
______________________________________
RD11 : Process Lock Aquisition . Release
______________________________________
C.sub.P .ident. ==> C.sub.P
.ident.
P.sub.P DO
lock
P.sub.P
post
unlock
END
______________________________________
[5.4] Logic Synthesis Execution Example The application example with respect to the logic synthesis rule described in the foregoing will be shown as follows. In the explanation, symbol indicates a part (output) which has been generated or converted by the logic synthesis step just before, and .largecircle. indicates a part (input) to which the logic synthesis rule is applied on the logic synthesis step just after.
______________________________________
Exercise
program .ident.
REPEAT n
WHEN some. (of-the. brand:m).bottle:b
=in-some. storehouse:s
the.bottle:b=in-some. customer:k
DO(the.bottle:x=in-the.customer:y) .ident.
DO(the.bottle:x=not-in-all.storehouse:y) --- 1
Logic Synthesis Progress
Program .ident.
REPEAT n
WHEN some.(of-the.brand:m).bottle:b
=in-some. storehouse:s
the.bottle:b=in-some. customer:k
(only transformed
into an approximated type to the regular sentence
structure.)
Program .ident.
REPEAT n
WHEN for some. bottle:b where the. bottle:b
=of-the.brand:m
for some.storehouse:s
the.bottle:b=in-the.storehouse:s
FOR some.customer:k
the.bottle:b=in-the.customer:k
(the aforegoing 1
is applied as a rewriting rule.)
Program .ident.
REPEAT n
WHEN for some.bottle:b
where the.bottle:b=of-the.brand:m
for some. storehouse:s
the.bottle:b=in-the. storehouse:s
FOR some.customer:k
.largecircle.
the.bottle:b=not-in-all.storehouse:s
(only transformed
into an approximated type to the regular sentence
structure.)
Program .ident.
REPEAT n
WHEN for some.bottle:b
where the.bottle:b=of-the.brand:m
for some. storehouse:s
the.bottle:b=in-the.storehouse:s
FOR some. customer:k
FOR all.storehouse:s
the.bottle:b=not-in-the.storehouse:s
(RD11 is applied )
Program .ident.
lock
REPEAT n
.largecircle.
WHEN for some.bottle:b
where the.bottle:b=of-the.brand:m
for some.storehouse:s
the.bottle:b=in-the.storehouse:s
FOR some.customer:k
FOR all.storehouse:s
the.bottle:b=not-in-the.storehouse:s
post
unlock
( RB12 is applied)
Program .ident.
lock
.largecircle.
REPEAT n
REPEAT .infin.
.largecircle.
IF for some.bottle:b
.largecircle.
where the.bottle:b=of-the.brand:m
.largecircle.
for some.storehouse:s
.largecircle.
the.bottle:b=in-the.storehouse:s
THEN
DO
.largecircle.
FOR some.customer:k
.largecircle.
FOR all.storehouse:s
DO
the.bottle:b=not-in-the.storehouse:s
END
ELSE
DO
post
unlock
wait
lock
END
post
unlock
(RB11, RB9, and RB6 are applied)
Program .ident.
lock
count:=1
REPEAT .infin.
IF count .ltoreq. n
THEN
DO
REPEAT .infin.
truth1=0
FORALL.(bottle:b)
.largecircle.
IF the.bottle:b=of-the.brand:m
THEN
DO
truth2=0
FORALL.(storehouse:s)
.largecircle.
IF the.bottle:b=in-the.storehouse:s
THEN
DO
truth2=1
break
END
ELSE
noop
IF truth2=1
THEN
DO
truth1=1
break
END
ELSE
noop
ELSE
noop
IF truth1=1
THEN
DO
FORALL.(customer:s)
DO
FORALL.(storehouse:s)
DO
.largecircle. the.bottle:b=not-in-the.storehouse:s
END
break
END
break
END
ELSE
DO
unlock
wait
lock
END
count:=count+1
END
ELSE
break
post
unlock
(RDl-1, RD3-2 are applied)
Program .ident.
lock
count:=1
REPEAT .infin.
IF count .ltoreq. n
THEN
DO
REPEAT .infin.
truth1=0
FORALL.(bottle:b)
DO
check(2,of,bottle,brand,b,m)
IF rtn=1
THEN
DO
truth2=0
FORALL.(storehouse:s)
DO
check(2,in,bottle,
storehouse,b,s)
IF rtn=1
THEN
DO
truth2=1
break
END
ELSE
noop
END
IF truth2=1
THEN
DO
truth1=1
break
END
ELSE
noop
ELSE
noop
END
IF truth1=1
THEN
DO
FORALL.(customer:k)
DO
FORALL.(storehouse:s)
DO
undo(2,in,bottle,storehouse,b,s)
END
break
END
break
END
ELSE
DO
unlock
wait
lock
END
count:=count+1
END
ELSE
break
post
unlock
______________________________________
The example described in the foregoing is the result of the logic synthesis processing. In this step, it is apparent that the result shows the conventional language level, that is, the description level of the computer-directed language. [6] Extension to Object Language [6.1] Procedure Extension (Intermediate Instruction and Intermediate Sentence Structure) The program outputted as a result of the logic synthesis which is disclosed in [5], is constituted only with the intermediate instruction and the intermediate sentence structure in language L processing system (this is apparent in that the logic synthesis rule group described in chapter [5] and the term rewriting system accommodated within language L processing system, both continue the rewriting operation by utilizing these rules as a rewriting rule while any of these rules can be kept being applied). Therefore, if these intermediate instruction and sentence structures are completed in the form of respective object language and object systems, the extension to the object language in connection with the procedure part is achieved. As described in [6.2], since the data definition which is required by the procedure part as extended to the object language is generated on the basis of the program obtained from the same logic synthesis result, no difference arises between the procedure part and the data definition part. [6.1.1] Intermediate Instruction 1 countup(x) or x:=x+1 Function: (the same as in the ordinary program language, accordingly omitted) 2 truth(x.1) or x:=1 truth(x.0) or x:=0 Function: (the same as in the ordinary program language, accordingly omitted) 3 check(1,R,A,x) Function: the first, a chain of table A with a start point of THINGS-A field in table THINGS is traced, and table A having the same address as that shown by "x" is intended to be found. If such table A is found, and field A-R value of the table A is "1", then a value "1" is set in return code domain "rtn", and if the field A-R value of the table A is not "1", zero is set in the domain. 4 check(n,R,A1, . . . ,An,x1, . . . ,xn) Function: If A1-An is not NUMBER, a chain of relation cell with a start point of RELATIONS-R field in table RELATION is traced, and then if any of each value of from CELLn-1 field through CELLn-n field is found to equal that of "x1" through "xn" within a group of these relation cells, a value "1" is set in return code domain "rtn", and if not, zero is set in the region. If A1-An is NUMBER, an establishment of R(x1, . . . ,xn) is checked. If R(x1, . . . ,xn) is established, a value "1" is set in return code domain "rtn", and if not, zero is set in the domain. 5 do(1,R,A,x) Function: A chain of table A with a start point of THINGS-A field in table THINGS is traced, and table A having the same address as that shown by "x" is intended to be found. If such table A is found, than a value "1" is set in the field A-R of the table A. If such table A is not found, no operation is made. 6 do(n,R,A1, . . . ,An,x1, . . . ,xn) Function: If A1-An is not NUMBER, a storage region for the relation cell of term "n" type is newly secured, that is, the new cell is connected to a chain of the relation cell with a start point of RELATIONS-R field in table RELATION. The values of from "x1" through "xn" are written in from CELLn-1 field through CELLn-n field of that relation cell, where before executing the foregoing process a "check(n,R,A1, . . . ,An,x1, . . . ,xn)" is performed and if its result is "rtn=1", then no operation is performed. If A1-An is NUMBER, then a suitable value is taken out from constants in "x1-xn" and from already determined variables, and the suitable value is given to the only variable which is not yet determined, so as to establish the condition of "R(x1, . . . , xn)". If the variables not yet determined are found in the number equal to or more than 2, no operation is performed. 7 undo(1,R,A,x) Function: A chain of table A with a start point of THINGS-A field in table THINGS is traced, and table A having the same address as that shown by "x" is intended to be found. If such table A is found, a value zero is set in the field A-R of the table A. If such table A is not found, no operation is made. 8 undo(n,R,A1, . . . ,An,x1, . . . ,xn) Function: A chain of relation cells with a start point of RELATIONS-R field in table RELATION is traced, and if any of each value of from CELLn-1 field through CELLn-n field is found to equal to that of "x1" through "xn" within a group of these relation cells, then such relation ell is removed from the chain, and the relation cell domain is returned. If a corresponding relation cell is not found on the chain, no processing is made. 9 makec(A.c) Function: A storage domain for a table A is newly secured, and such a new table A is connected into the chain of the table A with a start point of THINGS-A in table THINGS. The generated new character row is written in the A-NAME field of the table A. If the table A having a character row "c" in A-NAME field exists on the corresponding chain, no operation is made. .circle. 10 unmake(A,c) Function: A chain of table A with a start point of THINGS-A field in table THINGS is traced, and table A with a character row "c" written in A-NAME field is intended to be found. Such table A is removed from the chain, and a storage domain for the table A is returned. If such table A is not found on the chain, no operation is made. .circle. 11 makex(A,x) Function: First, a character row is generated wherein uniqueness is proved as a proper name of individual. A storage domain for a table A is newly secured, and such a new table A are connected into the chain of the table A with a start point of THINGS-A in table THINGS. The generated new character row is written in the A-NAME field of the table A. An address of the table A is finally effected as an entry to "x". .circle. 12 unmakex(A,x) Function: A chain of table A with a start point of THINGS-A field in table THINGS is traced, and table A having the same address as that shown by "x" is intended to be found. If such table A is found, the table A is removed from the chain, and a storage domain for the table A is returned. If such table is not on the chain, no operation is made. .circle. 13 find(F,A,x,y) Function: If A is not NUMBER, a chain of table A with a start point of THINGS-A field in table THINGS is traced, and table A having the same address as that shown by "x" is intended to be found. If such table A is found, a value of field A-F of the table A is set on "y". If such table A is not found, value zero is set on "y". If A is NUMBER, and F is a function variable, then another value which has been written in a relative position "x" (contents of x is the value) of a mathematical function table in address designated by the contents, is written in "y". If A is NUMBER, and F is a function constant ("abs," "sign," and the like), then a result obtained by applying F to the contents of "x" is set as contents of "y". .circle. 14 makeproc(A) Function: A process is newly produced, and a start point of the process is positioned at the head of the program system which now is used. .circle. 15 call(n,R,A1, . . . ,An,x1, . . . ,xn) Function: A component program corresponding to a combination (An,x1, . . . ,xn) is called, and "x1, . . . ,xn" are parameters for calling the component program. .circle. 16 makefunc(F,f) Function: A domain of the table F of the mathematical logic function is secured, and a numeral value field therein is all initially set in undefined. The address of the secured domain is written in "f". .circle. 17 checkdef(A,f) Function: If a numeral value field of the table F of the mathematical logic function specified by the contents of "f" is not completely undefined, then value "1" is set in a return code domain "rtn", and otherwise zero is set in the domain "rtn". .circle. 18 =(x,y) or x=y Function ()same as in the case of an ordinary program language, and therefore hereunder omitted) .circle. 19 <(x,y) or x<y Function: (same as in the case of an ordinary programming language, and thus hereunder omitted) .circle. 20 .ltoreq.(x,y) or x.ltoreq.y Function: (same as in the case of an ordinary programming language, and thus hereunder omitted) .circle. 21 wait Function: The executing right of a process (task) which is an executing subject of this "wait" sentence, is temporarily abandoned, and a program executing point of the process is transferred to just behind the "wait" sentence. .circle. 22 post Function: The executing right is given to all the processes (tasks) which temporarily abandoned the right. .circle. 23 lock Function: While the executing right is not being occupied by any other processes, the right is forced to be occupied by the executing process of that "lock" sentence. If the executing right is being occupied by any other processes, the executing right of the executing process of such "lock" sentence is forced to temporarily be abandoned, and the executing process of the lock sentence is kept behind waiting to occupy the executing right. In this case, if the executing process of the "lock" sentence itself has already occupied the right, no operation is made. .circle. 24 unlock Function: When the executing process of the "unlock+ sentence has already had the executing right, the right is released, and any one of the processes which is kept waiting to occupy the executing right is forced to occupy the right, and the right is given to that one process. If the executing process of the "unlock" sentence has no executing right, no operation is made. [6.1.2] Intermediate Sentence Structure 1 Juncture Function: (same as in the case of an ordinary program language, and therefore hereunder omitted) 2 If--THEN--ELSE Function: (same as in the case of an ordinary program language, and therefore hereunder omitted) 3 REPEAT.infin.P Function: An execution for P is repeated at infinity. If a "break" sentence is executed in P, to repeat the execution for P is discontinued. 4 FORALL.(A:x) P Function: If A is a common noun except NUMBER, then while a chain of table A with a start point of THINGS-A field in table THINGS is being traced, the operation wherein P is executed every time after addresses of respective table A are set in "x" is repeatedly performed with respect to all the table A on the chain. If A is NUMBER, P is executed with a value zero written in "x", and further . . . is performed until the value "x" reaches a specified value. In any of the above cases, when a "break" sentence appears in P, the repeated operations described in the foregoing are sometimes discontinued before the execution of P with respect to all the table A. It should be noted that the value "x" at the time of receiving the continuous operation of "FOR all" makes possible the function of the indicative in language L. 5 break Function: Through escaping from REPEAT inside at most and a loop of "FOR all:A:x" including this "break" sentence, the program executing point is transferred to just behind the loop. 6 noop Function: Without executing any, the program executing point is transferred to the sentence just behind the "noop" sentence. [6.2] Generating Data Definition Port Based on the program outputted from the result of the logic synthesis which has been described in [5.1] and [5.2], a data definition group is generated so as to satisfy the following condition. 1 Table base is defined. 2 Table THINGS and table RELATION are included in BASE. 3 Table CELL2, CELL3, CELL4, and CELL5 are defined. Field CELLn-NEXT and CELLn-TERM1, and field CELLn-TERM2, . . . field CELLn-TERMn are defined in table CELLn. 4 check(1,R,A,x) or do(1,R,A,x) or undo(1,R,A,x) appears on a program. When A is neither NUMBER nor FUNC, Field of THINGS-A is defined in table THINGS, and table A is defined, and field A-NAME and field A-NEXT and field A-R are defined in field A. 5 In the case that check(2,R,A,B,X,Y) or do(2,R,A,B,X,Y) or undo(2,R,A,B,X,Y) appears on a program, and A and B respective is neither NUMBER nor FUNC, field of THINGS-A is defined in table THINGS, and field of THINGS-B is defined in table THINGS, and table A is defined, and field B-NAME and field A-NEXT are defined in table A, and table B is defined, and field B-NAME and field B-NEXT are defined in table B, and field of RELATIONS-R is defined in table RELATIONS. 6 Further, in general, the case where check(n,R,A,B,X,Y) or do(n,R,A,B,X,Y) or undo(n,R,A,B,X, Y) appears on a program, is to be the same as shown in 5. 7 When find(F,A,x,y) appears on a program and A is not NUMBER, table A is defined, and field A-F is defined in Table. a 8 When make(A,c) or unmake(A,c) appears on a program, table A is defined, and field A-NAME and field A-NEXT are defined in table A. 9 The mathematic logic function tables FUNC and FUNC2 are continuously defined. A four-byte-length numerical field is defined in the number of n in table FUNC. A four-byte-length numerical field is defined in the number of "n.times.n" in table FUNC2. ("n" is determined in each language L processing system.) FIG. 6 is an example illustrating a table definition based on the data definition generated in the embodiment according to the present invention. In FIG. 6, indicates table, .largecircle.(B) below (A) shows field B in table A, and .largecircle.(D) below .largecircle.(C) shows subfield D of field C, respectively. These are a table group generated on the basis of the rule described in the previous paragraph, in particular, FIGS. (3) through (5) are the table group which have been defined by the exercise programs raised in [5.4]. Since this example does not use a term 1 adjective, a field except NAME and NEXT is unexpectedly not defined with respect to the bottle, brand, storehouse, and customer. After definition of the above mentioned table and field, and when programs are actually executed and for example the following situation is completed, then the state of the table will be shown as in FIG. 7. SITUATION EXAMPLE 1 bottles exist in the symbols of "b1" through "b3", brand of "b1" and "b3" is "m1", and brand of "b2" is "m2"; 2 storehouse exists only one in the symbol of "s1"; 3 customers are Mr. k1 and Mr. k2, in the number of two; 4 bottle "b1" was sold to Mr. k2, the rest of the bottles are in storehouse "s1", as is apparent from FIG. 7, bottle "b1" is combined with brand "m1" by "of" relation, and with customer "k2" by "in" relation. [7] Language L Executor the object language extension program outputted through use of the logic synthesis and object language extension in language L, can immediately be executed under the language L executor by compiling that program (if the extension as to the head point of the program at the time of the object language extension is replaced by the contents of the intermediate instruction for control such as "post," "wait," then the operation can be achieved even on an optional object system except the language L executor.) The language L executor and in addition an execution form of each program system under the language L executor are shown in FIG. 8. A procedure of execution is as follows. 1 The first, by START-L command, the language L executor (L-Executor) is started. The started L-Executor is so constituted as to always read the data (that is, command) from the external until a STOP command is given. 2 Next, a name of the program system to be executed enters as a command. When the command is inputted, L-Executor performs two processes as follows. 3 then, every time a command (except STOP) is given, L-Executor performs as follows. (i) The program system is made loading from within the program file which the language L system holds. (ii) En executing table TAB is prepared, and subjected to the initialization processing. This executing table is only one set prepared for the program system to now be executed. The executing table comprises a command buffer area (Tm in FIG. 8), a control region (Tc) utilized by the control use intermediate instructions such as "wait/post", "lock/unlock", and a state storage area (Ts) wherein an execution object program always surveys and reads during its running. In this manner, an execution environment of the object storage program system has come to be completed. (i) The command data to has been read is transcribed as is in the command buffer area within the execution table, and thus one process which makes an executing start point in connection with the head point of the object program system is generated. That is, it should be noted that every time one command for the object program system is inputted, a new process is generated. Therefore the command execution can be performed always in parallel with each other. In this process, when respective processes are finished, then the processes are automatically erased.) 4 The program an operation of which has been started as a process, counts out the command buffer area within the execution table, analyzes the command, transfers a control to a program segment responsive to the command, and in addition delivers parameters thereto (these processes are already accommodated in a head point of the program at the time of extension of the object language). 5 In this manner, although the object program system simultaneously continues the operation under a plurality of processes, in the operation process, the check of and writing into a single execution table are performed respectively. Synchronous control and transmission between processes are performed via this execution table. The above described executor of language L itself shows a typical operating system form provided with a minimum function on which the language L program can be executed, and as in the foregoing, the executor, apart from the above typical case, can be operated even on a desired object system. In this connection, the exercises written in language L wherein an accurate operation has been confirmed, will be shown in the following table. The number of lines for description in the table shows the number of lines of language L required for describing the exercises. The number of lines for extension in the table is one in language C when the program of language L is finally extended to that of the language C.
______________________________________
the Number of
Lines
in Language:
L C
Descrip-
Exten-
No. Problem Contents tion tion
______________________________________
1 Maze Escaping from the
43 605
maze laid out as
desired.
2 Philoso- Five philosophers
43 371
phers seated round table
and take a dinner,
Dinner scrambling forks.
3 Package A plurality of
62 1445
Router packages flow
along complicated
paths to a desti-
nation, colliding
with each other.
4 Wine Responding to 37 1308
Dealer customer's order,
Storehouse by controlling the
Control contents of store-
System house (container,
brand, bottle).
5 Equation Solving five 30 361
of Five element higher
Elements degree simul-
and Higher taneous equation/
Degrees equality.
6 Seat Seat booking sys-
155 1941
Booking tem of new trunk
System line with function
of booking, wait-
ing, alternative
display, etc.
7 Library Lending book 76 1900
Adminis- management,
tration various display
System service, etc.
8 Filing Assignment 62 2150
System management for
all resorces,
such as member/
file/volume etc.
9 Elevator Many elevators are
137 3000
Control operated smoothly
and economically
as a whole.
10 V T A M Simplified 105 3000
transmission
administration
system (including
data transmission,
route selection,
flow control,
dynamic change
command of path)
11 Travelling Network circuiting
63 1135
Salesman short cut is
problem found.
______________________________________
[8] Nature of Language L The characteristics of language L described in the foregoing is as follows. (a) Since the sentence structure of language L approximates to the natural language and is also added with another sentence structure in the form of numerical formula, the language L sentence structure exhibits a high readability and descriptivity, resulting in the advantages rather functional and easy to handle even in comparison with the pure natural language. (b) In utilizing language L, the programers are quitely unconscious of the concept of such as a data structure, algorithm (example: bit, register, module, interruption, and so forth) as in the conventional language. (c) Language L has a standardized language specification by which a static specification and a dynamic specification both can unifiedly be described. Engineers can mutually exchange their intention based on the specification written in language L, and it is possible to automatically resolve various problems on the software technique by way of analyzing the programming sentence. Such a possibility attributes to intention, i.e., inclusion of "meaning" into the language L vocabulary (basic word) approximating the natural language vocabulary. (d) Language L has such a strong internal regular form that the program written by language L better withstands a mechanical processing (program conversion, program synthesis, and the like). (e) The specification written by language L can automatically be logic synthesized, and extended to the object language program (for example, language C). Thereafter, it can immediately be executed. (f) In the case that the program written in the object language is extended from the specification written by language L, not only the procedure part but also the data definition part is simultaneously generated automatically. (g) Language L is a language based on a higher order intentional logic. However, in language L, the higher order intentional logic is extended by introduction of concept both of dynamic logic and of sort. The expression converter 22, the logic synthesizer 23, and the like in FIG. 2 in this embodiment have been implemented by the processor written by a PROlOG language. As is well known, this language is suitable for a process which is accompanied with pattern matching rewriting etc. Needless to say, it is apparent from the explanation in the foregoing in detail that the other language can also be implemented in the same manner. As described above, since a processing time for programming and test at the time of development by the conventional language is greatly reduced, the present invention remarkably improves productivity and reliability in the development such as a operating system, a control use software, various kinds of application software and so forth. In advance of explanation for FIG. 9, the conventional technique before the time of the disclosure of the present invention will be described in the following manner. In the case that software systems are written for operating in parallel, a situation which necessitates the description of the synchronization processes (synchronous processing) frequently appear. Moreover, a difficultly in the dynamic system development lies mostly in the realization of this synchronization processing. Assuming the parallel processing system consisting of programs from A to S as follows. (a) At the instance when a program A becomes a state of p and q, or becomes a state of s, then the program A executes v. (b) At the instance when a program B becomes a state of q and r, the program B executes v. (c) Program P generates a state of p. (d) Program Q generates a state of q. (e) Program R generates a state of r. (f) Program S generates a state of s. If this system is written in the conventional language, the programs P, Q, R, and S on the side in releasing the synchronization state, in order to realize the synchronization processing, are required to be conscious of the programs A and B which are in the synchronization state as well as the condition in which the synchronization state must be released. Accordingly, the description of the program such as the following comes to be required.
______________________________________
(a) program A = (b) program B =
wait(A) wait
u v
(c) program P = (d) program Q =
p q
if q if r
then then
post(A) post(B)
if p or s
then
(e) program R = post(A)
r
if q (f) program S =
then s
post(B) post(A)
______________________________________
In the description by the conventional computer language, the programs on the side in releasing the synchronization state, must be conscious of the programs which are in the synchronization state as well as the condition in which synchronization state is released. Accordingly not only a descriptivity is deteriorated because of the increase of the amount of a description, but also a logic of the completed program has considerably been decreased in its readability. As a consequence, a complexity of the logic in the conventional computer language has been the cause to degrade a reliability of the parallel processing system as described in the aforegoing. It is thus desirable solve the program, to provide a programming language capable of concise description of synchronization processing in the parallel processing system, and to increase yield and quality of production in the parallel processing system development. FIG. 9 is a diagram illustrating a constitution of an example according to the present invention. Numeral 10 depicts a high level source program of a translation object, numeral 11 depicts a synchronization conjunction (WHEN) which is one of the basic words of the high level source program 10, numeral 12 depicts a logic synthesis rule storage which stores logic synthesis rules having a term rewriting rule with the synchronization conjunction, numeral 13 depicts a expression converter/logic synthesis processor, and numeral 14 depicts a logic synthesizing result by the description such as an intermediate language which has been extended in the form more approximating the machine language than the high level source program 10. In the high level source program 10 handled in the present invention, a synchronization use conjunction 11 capable of writing as a synchronization condition the logic expression formula (wff) that can be described by use of the proportional logic or the predicate logic, is introduced as a basic word into the programming language. A rewriting rule which can be used to rewrite into a sentence including the contents as shown in the following, is stored in the logic synthesis rule storage 12 with respect to a description containing the synchronization use conjunction (WHEN) 11. WHEN [synchronization condition] [processing].fwdarw. 1 The following processing is repeated. 2 Whether the logic expression formula (wff) of [standby condition] is true or false, is checked. 3 If true, then [processing] is performed, and to repeat the processing is terminated. 4 If false, then releasing the lock, and waiting an information of an event from the other. According to the information of the event, the processing on and after 2 is repeated. If the synchronization use conjunction 11 is detected at the time of the translation of the high level source program 10, then the expression converter/logic synthesis processor 13 rewrites a sentence containing the synchronization use conjunction 11 in accordance with the logic synthesis rule, and the rewrited result is outputted on the logic synthesis result 14. This logic synthesis result 14 is written to the other known programming language or machine language with reference to the similar rewriting rule and the conventional technique, and if required, the result is made into a module in the executable form by means of the conventional compiler and linker. OPERATION Assuming that at the instance when a state of "q" and "r" is formed, there are simultaneously written a parallel processing system comprising a program P for executing "v", a program Q for generating a state of "q", and a program R for generating a state of "r", in this case for example such a description is programs 10-1, 10-2, and 10-3 as shown in FIG. 9. In the descriptions of the program Q and R, it is satisfactory to describe the only processing for generating the states of "p" and "r", as shown in the figure. On the other hand, in the program P, using the synchronization conjunction (WHEN) 11, there is described a synchronization condition based on the logic formula (wff) annexed to the synchronization conjunction 11 as well as a processing at the time of completion of the synchronization condition. The logic synthesis rule stored in the logic synthesis rule storage 12 is applied to the expression converter/logic synthesis processor 13 when a translation of the programs of 10-1 through 10-3 is performed. In this way, a rewriting to respective logic synthesis results 14-1 through 14-3 is executed. REPEAT, lock, unlock, post, wait etc. in the logic synthesis result 14-1 are as follows. REPEAT: repeating process LOCK: lock process unlock: unlock process post: information of event occurrence wait: synchronization processing for releasing the waiting state based on any information of event occurrence These are a processing function which can be realized by the basic operation included in the ordinary operating system. The program outputted in the logic synthesis result 14 results in executing the synchronization (synchronous) operation and the synchronization releasing operation as intended. That is, the simplified description such as is shown in the high level source program 10 comes to be reduced to a program which consists of only the basic operation disposed in the ordinary operating system. USAGE EXAMPLE OF SYNCHRONIZATION CONJUNCTION The present invention relates particularly to a processing part of the synchronization use conjunction in language L processing system. The practical usage example of such conjunction is as follows. Assuming that a parallel processing containing programs of from A through S is produced as undermentioned. (a) Program P, at the instance of becoming a state of p and q, or a state of s, executes u. (b) Program B, at the instance of becoming a state of q and r, executes v. (c) Program P, generates a state of p. (d) Program Q, generates a state of q. (e) Program R, generates a state of s. (f) Program S, generates a state of s. The description of the above system using language L can be made together with the synchronization conjunction WHEN as in the following.
______________________________________
program A =
WHEN (p and q) or s
u ... ... ... ...
(a)
program B =
WHEN q and r
v ... ... ... ...
(b)
program P =
p ... ... ... ...
(c)
program Q =
q ... ... ... ...
(d)
program R =
r ... ... ... ...
(e)
program S =
s ... ... ... ...
(f)
______________________________________
Now, if the logic synthesis rule (RB12) as to "WHEN erasing" shown in [5.2] paragraph is applied to this description of program A-(a) in language L, the logic synthesis result as shown in FIG. 10(a) is obtained, Thereafter, the logic synthesis rules such as in RB2, RB3 are applied, however the processing in detail will be apparent from the foregoing explanations, and thus hereunder omitted. In the same manner, applying the logic synthesis rule (RB12) to the description of program B-(b) in the language L, the logic synthesis result as shown in FIG. 10(b) is obtained. In the description of a programs of from P through S, applying the extension rule of the base expression formula (RD12) as in [5], the extension results as shown in FIGS. 10(c) through 10(f) are obtained. From the result shown in FIG. 10, the results apparently reveal a reduction to a program which consists of only the basic operation within the conventional language and ordinary operation system. Moreover, a function in detail as to the basic operation such as "lock," "unlock," "post," "wait," "REPEAT" etc. will also be explained in [6.1]. Through the use of the conventional technique, the description in the above can automatically easily be written in the object language, and thus a desired parallel processing system can be produced. An additional explanation appears to be hereunder unnecessary with respect to the intended synchronization (synchronous) operation and synchronization releasing operation executed by these programs. As described above, according to the present invention, when the specification for software in the parallel operation is written, the description of the synchronization (synchronous) processes which essentially frequently appear can be concisely described using the conjunction WHEN, and accordingly yield and quality of the production and easiness in the maintenance in the development of the parallel processing can considerably be improved. In advance to the explanation for FIG. 11, the conventional technique before the disclosure of the present invention, will be described as follows. In the logic description of software, set operations such as "all things satisfying a certain condition are . . . ed (all operation)", "from among things, a certain one satisfying a certain condition are . . . ed (some operation)", or "from among things, some things satisfying a certain condition are . . . ed (many operations)", appear frequently. In the conventional language, the description of programs which clearly specify a range of times to be repeated has to be made as a repeating processes referred to as "DO loop" or "FOR loop". For example, in the case of "- - - put all red books on a certain desk.", the procedure description having the following meaning is required in the conventional language. 1 Processing on and after 2 is repeated for all books. 2 Whether the book is red or not, is checked. 3 If the red book is found, following processings 4 and 5 are executed. 4 A certain desk is taken out from all desks. 5 The book is put on the desk. 6 If a book checked by 2 is not red, a next book is taken out, and then processing returns to 2. 7 After finishing processing for all books repeating process is terminated. In the description by the conventional computer language, a processing accompanied with a set operation must be written in the form of the repeating process, and therefore a required expression for the conventional computer language is quite different from the natural language which a human being uses. If such a set operation is expressed simplifiedly and concisely in the form approximating the usage of the natural language, and furthermore can be executed finally on the computer, then it seems to realize a marked and rapid improvement of readability and descriptivity with respect to the programs. However, even if these set operations will be standardized by the conventional language, the standardized form can be realized to a certain degree in only the simple and regular form using for example an application of macro description technique and the like. Although the description specifying such a set operation may appear even in any expression form that the predicative logic may permit, a flexibility in repose thereto be unavailable. The object of the present invention is to resolve the above described problem, in particular to provide the program language capable of concise description for a set operation which may frequently appears in the software logic specification, and more paticularly to improve a readability and descriptivity of the programs. FIG. 11 is a diagram illustrating a constitution according to the present invention. In the figure, numeral 10 depicts a high level source program which becomes an translation object, numeral 11-1 and 11-2 respectively indicate a logic quantifier including the set operation which is a basic word of the high level | ||||||
