`(12) Patent Application Publication (10) Pub. No.: US 2003/0046061 A1
`Preston et al.
`(43) Pub. Date:
`Mar. 6, 2003
`
`US 20030046061A1
`
`(54) APPARATUS FOR AUTOMATICALLY
`GENERATING SOURCE CODE
`
`(76)
`
`Inventors: Keith R Preston, Woodbridge (GB);
`Caroline A Leathem, Ipswich (GB)
`
`Correspondence Address:
`Nixon & Vanderhye
`8th Floor
`1100 North Glebe Road
`Arlington, VA 22201-4714 (US)
`
`(21) Appl. No.2
`
`10/169,352
`
`(22) PCT Filed:
`
`Jan. 30, 2001
`
`(86) PCT No.:
`
`PCT/GB01/00375
`
`(30)
`
`Foreign Application Priority Data
`
`(EP) ...................................... .. 003007424
`Jan. 31, 2000
`Publication Classification
`
`Int. Cl.7.
`(51)
`(52) U.s.ci.
`................... ..
`
`. G06F 17/27
`
`ABSTRACT
`(57)
`A method of automatically generating software from one or
`more predefined functions in accordance with an input
`statement entered in natural language, the method compris-
`ing the steps of:
`(i) analysing the input statement for its semantic con-
`tent, so as to extract first semantically meaningful
`elements from the input statement;
`(ii) analysing the one or more predefined functions for
`their semantic content, so as to extract one or more
`sets of second semantically meaningful elements
`from the one or more predefined functions;
`(iii) identifying at least one of a condition, an action
`and/or a statement in the input statement;
`(iv) comparing the first semantically meaningful ele-
`ments with the second semantically meaningful ele-
`ments so as to identify one or more predefined
`functions that correspond to one or more action
`and/or statement of the input statement;
`(V) combining at
`least some of the first semantic
`elements in accordance with any conditions identi-
`fied at step (iii) so as to generate corresponding
`condition Variables;
`(Vi) combining fiinctions and condition Variables iden-
`tified at steps (iv) and (V) according to a set of
`predetermined rules in order to generate the soft-
`ware.
`
`Extract utility description
`and input parameter from
`v functional description
`
`Analyse utility
`description for
`semantic
`content
`
`Analyse input
`parameter for
`semantic
`
`content
`
`GOOGLE EXHIBIT 1006
`
`Page 1 of 25
`
`
`
`Patent Application Publication Mar. 6, 2003 Sheet 1 of 13
`
`US 2003/0046061 A1
`
`(2
`U)
`>
`A
`<3;
`2
`<11
`
`E’
`ml?
`US
`0:1;
`Uc
`3
`
`means
`
`Page 2 of 25
`
`
`
`Patent Application Publication Mar. 6, 2003 Sheet 2 of 13
`
`US 2003/0046061 A1
`
`3
`O
`0
`
`Generating
`
`means
`
`2 C
`
`”
`5
`<[
`
`Z<
`
`Page 3 of 25
`
`
`
`Patent Application Publication Mar. 6, 2003 Sheet 3 of 13
`
`US 2003/0046061 A1
`
`Page 4 of 25
`
`
`
`Patent Application Publication
`
`r.W
`
`31£104LI.66hS30026:
`
`US 2003/0046061 A1
`
`
`
`_9m._mcw0>._®3.O
`
`muoo-mcmmc.
`
`.om>_m:<
`
`
`
`mc:mQEoUmmmgmamo
`
`ouoo-
`
`
`
`o_~m_:mc_._
`
`mzopm
`
`Page 5 of 25
`
`
`
`Patent Application Publication
`
`r.W
`
`31£105LI.66hS30026:
`
`US 2003/0046061 A1
`
`m.8:8u.EEouEcm.Em\<:&EmQQQQmmmmzmb*
`
`
`
`domcmq.cm~mSEo:
`
`:m
`
`**\#zm__>__>_.o
`
`
`
`E5#35:::o.a.:Exm.2:«$.59?22.823m.:R*
`
`
`
`
`
`
`
`
`
`:.m5E::|mEo:qmacaw.__m.UEm>>_820>23.5
`
`
`
`“2oEzEmo29.523“.
`
`Smama30>PmkgoxB252an:
`
`\*
`
`two®.t.Ft0oEcmb.\m>>.\Ou~Bmtoce.mmmmzmo
`
`
`
`tomumqUS$550:m8
`
`
`
`Eo_E:omm_uco:oc:n_
`
`
`
`CQcomgmqtEmEEo2mimeu.EEouSm.b\mS>.\O.«
`
`
`
`
`
`
`
`
`:3mEm;wa:._qc_mcocn._c.o_E:o.mm6>533
`
`Page 6 of 25
`
`
`
`Patent Application Publication
`
`r.W
`
`31«.106LI.66hS30026:
`
`US 2003/0046061 A1
`
`:529:mmcomfimu
`
`
`
`mcosbciUmccoumaBmm_>>.m:to
`
`
`
`o_EmEwmor:8.vcoqwmtooE5
`
`EmEBSm:559:.BEflcoo
`
`
`
`HCGHCOOo_EmEmm0.»?Smbxm
`
`EmE$3m“sac.ofV0SQEmm>_m:<
`
`
`
`5mocmmmaof>.E.cwn_Eficoo
`
`5.._3mEm.ma
`
`o_EmEmw
`
`o_E_mEommcpSmbxm
`
`H3qc_.mr:U5m::o:bm
`
`_mo_mo_Ucmmc._mfim.Q
`
`..cmE$3m
`
`
`
`cozatommu_mco_~oc:._
`
`€53mw>_m:<
`
`5+co_E:ommu
`
`o_EmEmm
`
`Eflcoo
`
`
`
`
`
`Eo:.$oESmqS9:ncm
`
`
`
`_.cmE8.Smcozacommn>..___S8m.:xm_
`
`
`
`
`
`Page 7 of 25
`
`
`
`Patent Application Publication Mar. 6, 2003 Sheet 7 of 13
`
`US 2003/0046061 A1
`
`Condition
`
`+-=
`
`0C
`
`ULT+
`
`—'
`
`C EQ
`
`)+-"
`(U+4
`(D
`
`Imperative
`
`Declarative
`
`Page 8 of 25
`
`
`
`Patent Application Publication Mar. 6, 2003 Sheet 8 of 13
`
`US 2003/0046061 A1
`
`
`
`
`
`relation
`
`Patient
`
`relation
`
`-6-‘
`
`cc
`
`o0
`
`)
`<
`
`Page 9 of 25
`
`
`
`Patent Application Publication Mar. 6, 2003 Sheet 9 of 13
`
`US 2003/0046061 A1
`
`:2:
`LU
`+-
`
`3D
`
`. EO0
`
`KEYBOARD
`
`Page 10 of 25
`
`
`
`Patent Application Publication
`
`r.W
`
`31El001LI.66hS30026:
`
`US 2003/0046061 A1
`
`Nmcmg
`
`_mc::m.m
`
`m2:_
`
`mmmnmpmu
`
`vcmqxm
`
`m2:_
`
`wmmnmymn
`
`mmcmg
`
`coo§m_
`
`_mcm4
`
`coo§m_
`
`—mcm4
`
`.mc:cm_m
`
`mes.
`
`mmmnmpmn
`
`wmcmg
`
`ocmaxm
`
`m2:_
`
`wmmpmymu
`
`
`
`mmmnmymo_mo_xm._
`
`Page 11 of 25
`
`
`
`Patent Application Publication Mar. 6, 2003 Sheet 11 of 13
`
`US 2003/0046061 A1
`
`ELL]
`
`Q Q E t
`
`o
`>-LL!
`35
`
`COMPUTER|
`
`Page 12 of 25
`
`
`
`Patent Application Publication Mar. 6, 2003 Sheet 12 of 13
`
`US 2003/0046061 A1
`
`I-
`Lu
`__1
`0.
`CL
`<E‘$
`Lu
`
`4 L
`
`L
`
`Page 13 of 25
`
`
`
`Patent Application Publication
`
`r.W
`
`31El031LI.66hS30026:
`
`US 2003/0046061 A1
`
`
`
`Em:umomtm...c_Em:
`
`
`
`...>>>>>>ém__u
`
`553mmmcfism
`
`
`
`Bpfimcmmm:m>>r.om
`
`oo_
`
`
`
`._dm.m_um_OUmmmnmumo
`
`$>_mm
`
`Page 14 of 25
`
`
`
`US 2003/0046061 A1
`
`Mar. 6, 2003
`
`APPARATUS FOR AUTOMATICALLY
`GENERATING SOURCE CODE
`
`[0001] The present invention relates to apparatus for auto-
`matically generating source code, and is particularly, but not
`exclusively, suitable for generating source code for commu-
`nication services.
`
`[0002] Traditionally, software development has comprised
`several identifiable processes: requirements capture, where
`customer requirements are broken down into fundamental
`descriptions that can be used to create specifications; design
`of software elements to these specifications; implementation
`of the software elements to create a software deliverable;
`and maintenance of the software deliverable. In many cases,
`the customer requirements further include developing hard-
`ware, which will be integrated with the software deliverable.
`All of these processes are time consuming and costly in their
`preparation, and often there are integration and implemen-
`tation problems. In order to correct these problems, some
`re-design may be required, which often delays the down-
`streaming of the deliverables and adds significantly to the
`costs.
`
`[0003] Several groups have focussed on identifying areas
`in the development process that could be pruned to offer
`time and cost savings, noting in particular that around sixty
`to seventy percent of a system’s functionality duplicates that
`of other systems. There is thus significant interest in devel-
`oping tools that generate software automatically, as this
`offers reductions in software design stage costs. AT&T have
`disclosed,
`in “Object Magazine 5, 1995”, a tool that can
`generate object—oriented code from graphical models. How-
`ever, ideally automatic code generators should be adaptable
`to different platforms, different standards, and different
`languages, and not be restricted to generating object oriented
`code.
`
`[0004] Automating the validation of code could also offer
`significant cost savings, as identified by the British Aero-
`space Dependable Computer System Centre in York,
`in
`“Qualification of automatic code generation using formal
`techniques“. The paper presents an animation facility to
`validate the code, which embeds formal methods to perform
`the validation itself.
`1for the IEE colloquium on “practical application of formal methods”
`
`[0005] There are several quasi-automatic code generators,
`such as the “wizards” developed by the Microsoft” Cor-
`poration; these create basic class template syntax, leaving
`the programmer to insert the code that
`is specific to the
`application under development. However,
`these are lan-
`guage specific, are limited to producing code templates, and
`require the user have a working knowledge of the language
`itself. Another quasi-automatic method of code generation
`includes “forms”, where a user fills in fields comprising the
`form. However, the entries must adhere to a specific format,
`and the functionality of the code that
`is generated is
`extremely limited.
`
`[0006] Methods of using graphical methods to generate
`code are also well known. For example, the JRuilderTM
`product from Borland incorporates a GUI designer by which
`the software developer can use a visual tool to draw the
`required user interface elements. The system then produces
`appropriate Java source code to handle these elements
`automatically, and allows the developer to merge this with
`
`conventionally-written code. Other systems such as Rational
`Rose” and Oracle Designer'“"‘ allow the developer to
`express the program logic using gaphical symbols, and then
`generate code automatically. In all of these cases the user
`must have a knowledge of the graphical notation used,
`which may be Unified Markup Language (UML) or some
`other convention. In addition, the user must have a good
`understanding of the programming language used in order
`that he or she can fill in certain parts of the template code
`produced, and also interface the automatically generated
`code with other parts of the software application. This
`restricts the usefulness of this type of system to experienced
`software programmers.
`
`[0007] There are many situations where it is desirable for
`a non-programmer to be able to program a system so that it
`can subsequently act 011 his or her behalf without further
`interaction. A telephone answering machine is a simple
`example of such a system; the user implicitly instructs the
`device to answer the telephone call and to record a message
`in his or her absence. Another well-known example is the
`video recorder, which may be set to record a programme
`when the user is out or fast asleep. However, it is well know
`that many people have di iculty even with the relatively
`simple task of programming a video recorder. In addition,
`even experienced programmers make errors, particularly
`when dealing with complex logic, and the process of testing
`that the program behaves as required (debugging) is a well
`established part of the software development process.
`
`[0008] As e—commerce continues to develop, examples of
`systems to which a user delegates some of his or her
`authority, will become more widespread. A recent example
`is that of a proxy, used in on—line auctions. The user can
`instruct his or her proxy to bid up to a certain amount for a
`particular item. Future systems may allow much more
`complex negotiations to be carried out in real time, follow-
`ing the instructions laid down previously by the human user.
`If these systems are to be used and trusted, it is essential that
`users without programming experience can program them
`effectively and have confidence that the system will subse-
`quently exhibit the appropriate behaviour. Preferably this
`should not require the user to learn a programming language
`or a particular graphical notation.
`
`[0009] According to one aspect of the present invention
`there is provided a method of automatically generating
`software from one or more predefined functions in accor-
`dance with an input statement entered in natural language,
`the method comprising the steps of:
`
`analysing the input statement for its seman-
`[0010]
`tic content, so as to extract first semantically mean-
`ingful elements from the input statement;
`
`(ii) analysing the one or more predefined
`[0011]
`functions for their semantic content, so as to extract
`one or more sets of second semantically meaningful
`elements from the one or more predefined functions;
`
`(iii) identifying at least one of a condition, a11
`[0012]
`action and/or a statement in the input statement;
`
`(iv) comparing the first semantically mean-
`[0013]
`ingful elements with the second semantically mean-
`ingful elements so as to identify one or more pre-
`defined functions that correspond to one or more
`action and/or statement of the input statement;
`
`Page 15 of 25
`
`
`
`US 2003/0046061 A1
`
`Mar. 6, 2003
`
`(V) combining at least some of the first seman-
`[0014]
`tic elements in accordance with any conditions iden-
`tified at step (iii) so as to generate corresponding
`condition variables;
`
`(vi) combining functions and condition vari-
`[0015]
`ables identified at steps (iv) and (v) according to a set
`of predetermined rules in order to generate the
`software.
`
`[0016] Embodiments of the invention will now be illus-
`trated, by way of example only, with reference to the
`accompanying drawings, in which:
`
`[0017] FIG. la is a schematic diagram showing apparatus
`for automatically generating source code according to an
`embodiment of the present invention;
`
`[0018] FIG. lb is a schematic diagram showing apparatus
`for automatically generating source code according to a
`further embodiment of the present invention;
`
`[0019] FIG. 2 is a schematic diagram showing data stor-
`age providing part of the apparatus of the embodiments of
`either FIG. 1a or FIG. 1b;
`
`[0020] FIG. 3a is a schematic diagram showing analysing
`means providing part of the apparatus of the embodiments of
`either FIG. 1a or FIG. 1b;
`
`[0021] FIG. 3b is a schematic diagram showing the rela-
`tionship between a functional definition located in the data
`storage of FIG. 2 and its functional capability;
`
`[0022] FIG. 4 is a schematic block diagram showing the
`steps involved in analysing a function description for its
`semantic content;
`
`[0023] FIG. 5 is a schematic block diagram showing the
`steps involved in analysing an input statement for its seman-
`tic patterns,
`logical structure, semantic content and for
`matching semantic content between the function descrip-
`tions and the input statement;
`
`[0024] FIG. 6a is a schematic diagram showing categori-
`sation of phrases;
`
`[0025] FIG. 6b is a schematic diagram showing analysis
`of semantic content of phrases;
`
`[0026] FIG. 7 is a block diagram showing a terminal
`utilised in a second embodiment of the invention and
`corresponding to that shown in FIG. 1;
`
`[0027] FIG. 8 is a block diagram showing an arrangement
`of lexical components according to a third embodiment;
`
`[0028] FIG. 9 is a block diagram showing in greater detail
`the components comprising the client terminal shown in
`FIGS. la and lb,’
`
`[0029] FIG. 10 is a block diagram showing in greater
`detail the processes present in the client terminal shown in
`FIGS. la and lb,’
`
`[0032] Various phrases are used in the following descrip-
`tion, and in the context of the present invention these are
`defined as follows:
`
`“Semantieally meaningful elements” are ele-
`[0033]
`ments found in natural language and may be defined
`with reference to the following example: “The cat sat
`on a mat”:
`
`a) meaningful semantic entities, typically
`[0034]
`77
`c(
`denoted by nouns. For example the semantic enti-
`ties are “cat , and “mat”.
`
`b) the form of each of the entities (e.g.
`[0035]
`whether it is singular or plural), and whether it is
`in the definite or indefinite form. In the example,
`“the cat” is singular, and “the” indicates that it is
`the definite article. “Mat” is singular, and “a”
`indicates that it is in the indefinite form.
`
`c) “States of affairs”—generally indicated
`[0036]
`by verbs. States of affairs indicate either actions,
`as most verbs do, or states of being (e.g. the verb
`“to be”). In this example, “sat” is a state of aifairs.
`
`d) The conditions attached to each state of
`[0037]
`affairs (e.g. the tense of the verb concerned)
`
`e) Modifiers (e.g. adverbs or adjectives)
`[0038]
`which ascribe properties or otherwise modify an
`entity or state of affairs.
`
`t) The linkages between the occurrences of
`[0039]
`the foregoing (e.g. which entities a state of affairs
`a ects and how; and which entities or state of
`a ‘airs a modifier modifies).
`
`“semantic content”: a collection of semanti-
`[0040:
`cally meaningful elements (as defined above) com-
`prising a phrase;
`
`“semantic pattern”: semantic identifiers that
`[0041:
`represent a relationship between semantically mean-
`ingful elements,
`
`logical flow of informa-
`“logical structure”:
`[0042:
`tion, in the form of Boolean operators (and, or, if,
`then) and conditions and actions that are dependent
`on the operators;
`
`“input statement”: phrase or sentence entered
`[0043]
`by a user for analysis of its semantic content;
`
`“function”: a named part of a computer pro-
`[0044]
`gram that can be invoked from other parts of a
`program as needed;
`
`“function definition”: the name of a function,
`[0045]
`the type of the value it returns (if any), and the types
`and names of its arguments (if any) and the code
`comprising the function. The form of a function
`definition is language-specific, in terms of variable
`types, variable declaration, and code syntax;
`
`[0030] FIG. 11 is a block diagram showing in greater
`detail
`the components comprising the server shown in
`FIGS. la and lb,’
`
`language
`natural
`description”:
`“function
`[0046]
`phrase or sentence describing the functional capa-
`bility of a function.
`
`[0031] FIG. 12 is a block diagram showing a possible
`implementation configuration for software automatically
`generated using the apparatus shown in FIGS. la and lb.
`
`[0047] Further, in the following description, a “user” is not
`necessarily limited to a human entity, as it might well be for
`instance another piece of equipment or a software agent.
`
`Page 16 of 25
`
`
`
`US 2003/0046061 A1
`
`Mar. 6, 2003
`
`[0048] Overview
`
`[0049] Broadly, in a telecommunications environment for
`instance, using an embodiment of the present invention, a
`user can input a natural
`language instruction (an “input
`statement”) and it will be analysed and used to put together
`source code customised for carrying out the user’s wishes in
`that environment. For instance, the user n1igl1t make the
`input statement “Please divert my phone to Frank’s”. That
`statement will be analysed and used to generate source code
`that causes call divert on incoming calls for that user to the
`telephone number of the named person. The source code so
`generated will need to be appropriate to the current tele-
`communications environment for the user, for instance in
`terms of operating systems, database query languages and
`transmission protocols, but
`the user needs no technical
`knowledge of that environment. Further, embodiments of
`the present invention can be transferred to a different tech-
`nical environment for the same user relatively easily.
`
`[0050] With reference to FIG. 1 of the accompanying
`drawings, apparatus 100 for analysing input statements and
`automatically generating customised source code according
`to the present invention may generally be referred to as a
`‘software generator’100. The generator 100 is
`shown
`divided into the following functional parts:
`
`[0051] DATA ANALYSER 102
`[0052] CODE GENERATOR 103
`
`[0053] COMPUTER 105
`
`[0054] DATA STORAGE 106
`
`[0055] The COMl’U'l‘l:'R 105 can either be a standalone
`machine, as shown in FIG. 1a, or a server computer that
`receives input from a client terminal 101 via a communica-
`tions network 108, as shown in FIG. 1b. The software
`generator 100 may be built into a telephone, or a mobile
`phone using speech recognition and synthesis for input and
`output respectively.
`
`[0056] When the computer is a server, as shown in FIG.
`1b,
`the computer 105 may be additionally connected to
`external data stores 112 via a communications network such
`as the Internet 110. Information about the Internet can be
`found, for example, from The World Wide Web Handbook
`from International Thomson Computer Press, ISBN: 1-850-
`32205-8. The terms “client” and “server” are illustrative but
`not limiting to any particular architecture.
`
`[0057] The DATA STORAGE 106 functional part of the
`apparatus is located on the computer 105 and includes one
`or more data stores comprising predefined functions,
`referred to as function definitions. These function definitions
`are used as described later in the generation of the software
`code, and include the code comprising a function, the name
`of each function and any arguments it takes and their types.
`In addition, each predefined function has an associated
`natural
`language description,
`referred to as a function
`description, from which the data analyser 102 can extract the
`functional capability of corresponding predefined functions.
`This process is explained in detail with reference to the
`embodiment below. The data storage 106 also includes
`linguistic stores comprising multilingual lexicons and lin-
`guistic, semantic and syntactic information. The data analy-
`ser 102 accesses the linguistic stores in order to resolve the
`meanings of input statements and function descriptions.
`
`[0058] The DATAANALYSER 102 functional part of the
`apparatus is located on the computer 105 and includes
`analysing means and comparing means. The data analyser
`102 is used for analysing and resolving the meaning of
`function descriptions that are stored in the data storage 106
`and of input statements, so as to identify the functional
`requirements of input statements and relate them to the
`functional capability of predefined functions. In descriptive
`terms,
`the data analyser 102 matches these functional
`requirements with predefined functions that have been deter-
`mined to have the fimctional capability of the functional
`requirement. In mechanistic terms, the data analyser 102
`determines the semantic content of the input statement and
`compares the input statement semantic content with the
`semantic content of a plurality of function descriptions
`(which have been similarly analysed for their semantic
`content). If there is a match between the semantics of the
`input statement and one of the function definitions then that
`function is considered to meet the functional requirement of
`the input statement.
`[0059] The CODE GENERATOR 103 functional part of
`the apparatus is located on the computer 105 and is used for
`generating source code from whichever predefined functions
`have been identified by the data analyser 102.
`[0060] Brief Overview of Operation
`[0061] Auser enters an input statement, which comprises
`any natural language input such as a statement, conditions
`and actions, and which describes a desired functionality of
`code to be generated by the generator 100, to the client
`terminal 101. The user may also specify, using a standard file
`management browser (e.g. Windows Jjxplorerm), a class or
`folder in which function descriptions, which relate to the
`input statement functionality, are located. The input state-
`ment is passed to the data analyser 102 for semantic analysis
`in order to extract the functional requirement of the input
`statement. The data analyser 102 then retrieves whichever
`function descriptions are stored at
`the specified location
`from the data storage 106 and analyses the function descrip-
`tions for their semantic content in order to determine the
`functional capability of the corresponding functions. The
`data analyser 102 checks, as is described in detail below, by
`comparing the semantics of the input statement against the
`semantics of the function descriptions, that there is a func-
`tion that meets the functional requirement of the input
`statement. Assuming that there is a suitable function, the
`data analyser 102 retrieves the corresponding code compris-
`ing the function from the data storage 106. The semantic
`analysis performed on the input statement by the data
`analyser 102 also identifies conjunctions from the input
`statement, and these, together with the retrieved code are
`passed to the code generator 103. The code generator 103
`translates the conjunctions into logical operators, and inserts
`said operators,
`together with the retrieved code into a
`predetermined template, according to a set of predetermined
`rules,
`thereby creating a processable computer program.
`Having assembled these components to form the program,
`the code generator 103 loads the program onto a terminal,
`which could be a network device such as a router, a
`telephone, a server computer or a client computer,
`for
`subsequent processing.
`[0062] The present invention thus:
`[0063]
`can make use of existing functions and/or
`methods;
`
`Page 17 of 25
`
`
`
`US 2003/0046061 A1
`
`Mar. 6, 2003
`
`can use functions in any language and gener-
`[0064]
`ate code in any language;
`
`does not require the user to be computer code
`[0065]
`literate,
`
`allows the user to enter requirements using
`[0066]
`natural language—input is not required in a standard
`format;
`
`enables validation of the software generated
`[0067]
`via input statements in the form of questions.
`
`[0068] First Embodiment of the Invention: Resolution of
`Input Statements into Source Code
`
`[0069] An embodiment of the present invention is oper-
`able to automatically resolve input statements into source
`code, provided the software generator 100 has access to
`source code that it can identify as providing the functional
`requirements of the input statements.
`In particular,
`the
`present embodiment concerns generation of software to
`handle telephone calls. The software to be generated will
`implement requested behaviour by running a number of
`predefined functions which carry out the lower—level actions
`of ringing a telephone, forwarding a call etc.
`
`In practice, it will be understood that the generated
`[0070]
`software could either comprise the actual code providing a
`set of functions to implement requested behaviour, or it
`could comprise a set of calls on code which is actually
`located elsewhere ir1 a network.
`In the latter case,
`the
`generated software thus triggers calls to this code.
`
`[0071] The embodiment is described below in more detail,
`in the following order:
`firstly analysis of one or more
`predefined functions, secondly analysis of an input state-
`ment, and thirdly subsequent combining of these analyses.
`
`[0072] Analysis of One or More Predefined Functions
`
`[0073] Function Descriptions
`
`[0074] Referring to FIG. 2, information about the func-
`tions that are accessible to the generator 100 is stored in data
`storage 106, specifically in a code database 200, which
`comprises predefined function definitions. As described
`briefly above, the predefined functions are accompanied by
`function descriptions, which, in essence, describe the func-
`tional capability of the predefined function. The function
`descriptions may be given by a separate description that
`accompanies the functions. In accordance with the conven-
`tions used in Java, it will be understood that a method is used
`to denote a function, and the terms method and function may
`be used interchangeably when describing the present
`embodiment. The function description will normally be
`written by a software developer who has an understanding of
`the operation of the classes, objects and methods. Descrip-
`tions may follow the established conventions for Java docu-
`mentation (for example, see The Design of Distributed
`Hyperlinked Programming Documentation (IWI-ID ’95)—A
`paper on the design of javadoc, the Java Software tool for
`generating web-based API documentation. Presented at the
`International Workshop on I-Iypermedia Design "95), but
`may also need to take account of the requirements of the data
`analyser 102, as described later.
`
`[0075] The code database 200 may comprise one or more
`data files 201 containing predefined function definitions,
`libraries 203 of predefined function definitions and/or links
`
`205a to remote stores 112 where predefined function defi-
`nitions 205b are located. In the present embodiment, the
`predefined function definitions are written in Java, but the
`database may be populated with definitions and descriptions
`for functions written in any programming language.
`
`[0076] The data analyser 102 identifies the functional
`capabilities of the predefined functions by analysing the
`semantic content of the function descriptions. As shown in
`FIG. 3b, function descriptions may conveniently be written
`as comments 311 in the Java source code. For example, a
`well known feature of the Java programming language is
`that information included between the “/** .
`.
`. */” symbols
`are comments. When these comments are provided as a
`precursor to a method or class declaration in the Java source,
`they may be put together with a function definition 310 and
`translated into a documentation file by running a special
`program called “javadoc”. Javadoc is the tool from Sun
`Microsystems for generating API documentation in IITML
`format from doc comments in source code (further infor-
`mation is available from the Hypermedia paper referenced
`above).
`
`[0077] For example:
`
`COIVIMENT 311:
`y*>l<
`* Causes a phone to forward an incoming call to a nominated person.
`" This function requires the extension number that you want to forward
`your calls to
`*/
`FUNCTION DEFINITION 310:
`public void forwardCall (String phone_r1urnbcr){
`
`III}
`
`[0078]
`
`[0079]
`
`is compiled by javadoc into:
`Documentation File
`
`[0080]
`
`forward Call(String)
`
`[0081] Causes a phone to forward a11 incoming call to a
`nominated person.
`
`[0082] Thus the function description 313 for this function
`forwardCall is “Causes a phone to forward an incoming call
`to a nominated person”.The function description 313 also
`details input parameters that are required for the function to
`operate; it is convenient to split the function description into
`a utility description 315“A function which causes a phone to
`forward an incoming call to X”, and an input parameter
`317“nominated person”. It is understood that splitting the
`function description, as presented in FIG. 3b,
`into utility
`description and input parameter is inessential to the inven-
`tion.
`
`[0083] FIG. 3a shows the analysing means comprising a
`query analyser 301 which has access to a linguistic store 303
`located in the data storage 106. The linguistic store 303 is
`used to find synonyms, along with semantically equivalent
`forms of the various types of inputs received by the query
`analyser 301, and contains representations of pragmatic
`knowledge needed by the semantics module (for example
`that “dial Mary” is a shorthand form, which should be
`treated more fully as “dial Mary’s telephone number”). The
`
`Page 18 of 25
`
`
`
`US 2003/0046061 A1
`
`Mar. 6, 2003
`
`steps involved in analysing the function description for its
`semantic content are shown in FIG. 4:
`
`[0084] S4.1 Query analyser 301 analyses the function
`description 313 in order to extract a utility descrip-
`tion 315 (A function which causes a phone to for-
`ward an incoming call to a nominated person) and an
`input parameter description 317 (String) (described
`above with reference to FIG. 3b);
`[0085] S42 Query analyser 301 analyses the utility
`description 315 for its semantic content. As is known
`in the art, natural language parsers perform semantic
`analysis, and the general operation of such parsers is
`well known. The specific parser utilised in the
`present invention analyses the utility description 315
`in the following manner:
`
`[0086] The utility description 315 is broken up into
`characters;
`
`[0087] Any white spaces are found and these are
`used to determine locations of the word bound-
`aries;
`
`[0088] The characters are then put back together to
`form the respective words;
`
`[0089] The words are then all converted to lower
`case;
`
`[0090] This is then stored as a list;
`
`[0091] The list is analysed to determine what sort
`of sentence it is (declarative, imperative, Yes/No
`question, which question, If/then condition etc.)
`(FIG. 6a, described below);
`
`[0092] Each word on the list is analysed for its
`semantics and its relationship with the rest of the
`words, and this generates a list of semantics (FIG.
`6b, described below).
`
`[0093] Furthermore, the base form of the operative verb,
`which for the above example is “forward”, is analysed for
`synonyms, along with semantically equivalent forms using
`derivational morphology in a linguistic store 303, giving a
`list of properties such as send, deliver, give etc. The other
`properties of the subject, which is the telephone, are
`extracted in a similar way, such that “incoming call(s)” and
`“nominated person” are assigned semantic meanings and
`alternatives,
`
`[0094] S43 Query analyser 301 analyses the input
`parameter description 317 in order to understand the
`number, and type, of parameters, or arguments,
`required by the function (following identical proce-
`dure to that described above with reference to S4.2).
`
`In the present embodiment, the query analyser 301
`[0095]
`generates Prolog facts to represent the semantically mean-
`ingful elements generated at steps S4.2 and S43, and these
`facts are stored locally, for example in a temporary database
`or in memory. The semantics of the function are stored in the
`form:
`
`method(forward_Call,sem([forward(_1,forward:v:_).
`r(_Z,patient,_1,_3),
`e(_3,call:n:_)]),param([“the
`extension number that you want to forward calls to]))_.
`
`(Expr. 1)
`
`function
`the function name,
`[0096] which means that
`semantics and arguments required by the function are stored.
`
`The Prolog mechanisms involved are explained in introduc-
`tory textbooks on the language, for example Clocksin and
`Mellish, “Programming in Prolog”, Springer-Verlag, 1987.
`
`[0097] Some of the function descriptions may have been
`pre-processed for their semantic meaning by the query
`analyser 301, or may be processed concurrent with submis-
`sion of an input statement by the client 101. In the la