Method for generating document components and managing same

Method, system, and program product for analyzing a generation program for generating document information consisting of a plurality of document components. The the generation program contains commands for generating the document components, contained in the document information. The information processing system includes: a correspondence information generator for executing the generation program and generating correspondence information which indicates correspondence between the plurality of generating commands and document components generated by the generating commands; a selector for selecting any of the plurality of document components at the instruction of a user; and a command information output unit for selecting, based on the correspondence information, the generating command which has generated the document component selected by the selector and outputting information for identifying the generating command.

SUMMARY OF THE INVENTION

1. Field of the Invention

The present invention relates to an information processing system, control method, control program, and recording medium. More particularly, it relates to an information processing system which analyzes a generation program for generating document information as well as its control method, control program, and recording medium.

2. Background Art

Conventionally, software known as a debugger is used to efficiently detect programming errors (bugs). Examples of debuggers include Visual Age for Java from the International Business Machines Corporation, WebSphere Studio Application Developer from the International Business Machines Corporation, JBuilder from Borland Software Corporation, Interstage APWORKS from Fujitsu Ltd., etc. These debuggers execute commands in a program one by one and output execution results of each command. This allows the programmers and the like to know the course of program execution and helps them modify the program.

However, although conventional debuggers are suitable for studying details of program operation, they are not suitable for detecting a problem area in a program. For example to detect a problem area in a program with a conventional debugger, the programmer must execute commands one by one in sequence from the beginning of the program until the program malfunctions. This is troublesome.

In an alternative method, if the program to be debugged outputs characters, the programmer inserts an output process (e.g., a PRINT statement) temporarily near a part where an error should exist. This allows the programmer to narrow down the problem area gradually by comparing the output resulting from the output process with the output resulting from the original program. This method is more troublesome because the programmer must rewrite the program each time it is executed.

Thus, the object of the present invention is to provide an information processing system, control method, control program, and recording medium which can solve the above problem. This object is achieved by a combination of features set forth in the independent claims herein. The dependent claims further present advantageous concrete examples of the present invention.

SUMMARY OF THE INVENTION

One aspect of the present invention provides an information processing system which analyzes a generation program for generating document information consisting of a plurality of document components as well as provides a control method and control program for controlling the information processing system, and recording medium containing the control program, wherein: the generation program contains a plurality of generating commands for generating the plurality of document components, respectively, contained in the document information; and the information processing system comprises: a correspondence information generator for executing the generation program and generating correspondence information which indicates correspondence between the plurality of generating commands and document components generated by the generating commands; a selector for selecting any of the plurality of document components at the instruction of a user; and a command information output unit for selecting, based on the correspondence information, the generating command which has generated the document component selected by the selector and outputting information for identifying the generating command.

Incidentally, the above summary of the invention does not enumerate all the necessary features of the present invention, and subcombinations of above features can also constitute inventions.

DETAILED DESCRIPTION OF THE INVENTION

The present invention will be described below by way of an embodiment of the invention, but the embodiment below is not intended to limit the claimed invention and a combination of all the features described in the embodiment is not necessarily essential for the solution of the invention.

FIG. 1shows a functional block diagram of an information processing system10. The information processing system10, for example, is a World Wide Web (WWW) system and is intended to analyze a generation program which generates document information provided as HTML documents and the like. The information processing system10comprises a server machine20, such as a Web server, which generates HTML documents and a client machine30for viewing the HTML documents generated by the server machine20. Incidentally, according to this embodiment, the server machine20is installed separately from the client machine30and communicates with the client machine30via a telecommunications line such as a LAN, a WAN, or the Internet. Alternatively, the server machine20and client machine30may be installed in the same housing. That is, the information processing system10may be provided to the user as a single unit.

The server machine20comprises a program database200, program translator210, control flow graph generator220, data flow graph generator230, buffer235, buffer stopper240, function identification information collector250, and correspondence information generator260. The program database200stores a generation program for generating document information consisting of a plurality of document components such as HTML documents. An HTML document is an example of a tagged document which contains contents information to be displayed to viewers of the document information and tag information that specifies display format of the contents information. Alternatively, the document information may consist of XML documents or other tagged documents.

The generation program contains a plurality of generating commands for generating the respective document components contained in the document information. The generation program, for example, is a servlet program written in the Javaòlanguage. Each of the generating commands outputs document information by calling an output function (e.g., a method) which outputs the document component generated by the given generating command. The output function, for example, is an output method in the Writer class, the OutputStream class, or another class which is obtained through expansion or utilization thereof if the generation program is written in the Javaòlanguage.

The program database200further stores a specification program which is to be translated into a generation program and which specifies content of the document components to be generated by the generation program. For example, it stores a JSP program compliant with JSP (JavaòServer Pages) standards as the specification program.

The program translator210receives an operation mode setting instruction from the operation mode switching unit310, specifying which operation mode the server machine20should operate in: a test mode in which the server machine20analyzes the generation program or a normal mode in which the server machine20runs without analyzing the generation program. The program translator210receives a display request, such as an HTTP request, to display Web pages or the like and acquires the generation program or specification program from the client machine30depending on the received display request. Next, the program translator210translates the specification program into a generation program, for example, by compiling it. Then, the program translator210sends the generation program resulting from the translation or the generation program acquired from the program database200to the buffer stopper240together with operation mode setting instruction. If the operation mode setting instruction specifies the test mode, the program translator210sends the generation program to the control flow graph generator220.

The control flow graph generator220generates a control flow graph which represents an execution flow of a plurality of generating commands executed in sequence in the generation program received from the program translator210and sends it to the data flow graph generator230together with the generation program. The data flow graph generator230generates a data flow graph which indicates what other command should use data generated by one command in the generation program received from the control flow graph generator220and sends it to the correspondence information generator260together with the control flow graph.

The buffer235has a storage area for storing at least one document component generated by the generation program and outputs the at least one document component stored in the storage area, as part of the document information with a predetermined timing. Besides, the buffer235stops storing document components at the instruction of the buffer stopper240.

The buffer stopper240stops the buffer235from storing document components if the operation mode setting instruction received from the operation mode switching unit310specifies the test mode. Consequently, each time a document component is generated by the generation program, the buffer stopper240allows it to be output as part of the document information. Specifically, the buffer stopper240stops the buffer235from storing document components by setting the size of an output buffer used by the generation program received from the program translator210to ‘0.’ Then, the buffer stopper240sends the generation program to the function identification information collector250.

Each time any output function of the generation program outputs a document component, the function identification information collector250collects function identification information that associates the document component with the output function which has output the document component and the generating command which has called the output function.

Specifically, the function identification information collector250inserts, in the generation program, a filter function which is executed each time the generation program is executed. Instead of the output function which outputs a document component, the function identification information collector250causes a monitor function which outputs a document component and monitors the output to be executed in the filter function. For example, as a monitor function, the function identification information collector250inserts the process of outputting a hierarchical structure of the functions which have been called before the monitor function is called. Consequently, based on the hierarchical structure of functions outputted each time a monitor function is executed, the function identification information collector250identifies the document component outputted by the monitor function and the generation program which has called the monitor function by associating them with each other. Then, the function identification information collector250sends the generation program in which the filter function and the like are inserted to the correspondence information generator260.

To take an example, if the generation program is written in the Javaòlanguage, by generating an exception in a monitor function, the function identification information collector250outputs a stack trace which represents the state of a stack used for function calls, as information which represents the hierarchical structure of functions.

The correspondence information generator260generates document information by executing the generation program received from the function identification information collector250. The correspondence information generator260generates correspondence information which indicates correspondence between the generating commands and respective document components generated by the generating commands. Then, the correspondence information generator260sends the control flow graph received from the control flow graph generator220, data flow graph received from the data flow graph generator230, generation program, document information, and correspondence information to a display unit320and command information output unit350.

The client machine30comprises an input processing unit300, the operation mode switching unit310, the display unit320, a document structure information output unit322, a display screen325, a display result analyzer/detector330, a selector340, the command information output unit350, and a document component output unit360. The input processing unit300accepts a display request to display Web pages from a viewer of Web pages or the like and transfers the display request to the operation mode switching unit310. According to the content of the display request, the operation mode switching unit310switches between a test mode in which the command information output unit350outputs information for identifying the generating command and a normal mode in which the command information output unit350stops outputting the information for identifying the generating command. Specifically, together with the display request to display Web pages, the command information output unit350sends the server machine20an operation mode setting instruction, specifying which operation mode the server machine20should operate in, the test mode or normal mode.

The display unit320displays the document information received from the server machine20on the display screen325as well as sends it to the document structure information output unit322and the display result analyzer/detector330. Also, the display unit320displays the generation program received from the server machine20on the display screen325. Furthermore, the display unit320displays the information received from the command information output unit350and the document component output unit360on the display screen325. The document structure information output unit322generates document structure information about the structure of the received document information such as an HTML document and displays it on the display screen325. In addition, the display unit320may reproduce the information received from the command information output unit350and the document component output unit360as voice output. In other words, the information outputted by each of the command information output unit350and the document component output unit360via the display unit320is not limited to images, and may be audio information produced by a speech reading technology.

Upon receiving the document information from the display unit320, the display result analyzer/detector330analyzes whether the user can readily recognize displayed objects displayed based on the document information. Specifically, ease-of-recognition conditions have been established to indicate whether viewers can recognize displayed objects displayed on the display screen325, and the display result analyzer/detector330detects hard-to-recognize objects which do not satisfy the ease-of-recognition conditions and sends them to the selector340.

The selector340selects one of the document components in the document information based on instructions received from the viewer via the input processing unit300or detection results received from the display result analyzer/detector330and sends it to the command information output unit350. For example, if the document information is provided as HTML documents, the selector340selects tag information which specifies contents information about any of the HTML documents or display format of the contents information. Also, the selector340selects one of the generating commands in the generation program according to instructions entered by the user via the input processing unit300and sends it to the document component output unit360.

The command information output unit350selects the contents information or tag information about the generating command which has generated the document component such as an HTML document selected by the selector340, based on the correspondence information received from the correspondence information generator260. Then, the command information output unit350outputs information which identifies the generating command to the display unit320via the display screen325. If the document component selected by the selector340has been specified by a JSP program, the command information output unit350may select the specification command which has specified the content of the document component, based on the correspondence information, and further outputs identification information about the specification command. The document component output unit360selects the document component generated by the generating command selected by the selector340, based on the correspondence information received from the correspondence information generator260, and displays it on the display screen325.

As described above, the server machine20executes the generation program for generating document information and generates the correspondence information which indicates correspondence between the generating commands and the respective document components generated by the generating commands. On the other hand, the client machine30selects a document component at the instruction of the user and outputs the generating command which corresponds to the document component. This allows the author of the generation program to properly identify the generating command which corresponds to a desired document component.

FIG. 2shows a flowchart of the information processing system10. Based on instructions received from the user, the operation mode switching unit310determines whether to operate the server machine20in the test mode (S200). If the server machine20will not be operated in the test mode (S200: NO), the program translator210acquires a specification program such as a JSP program from the program database200according to an HTTP request received from the client machine30and translates it into a generation program (S205). Then, the information processing system10performs normal processing—presents displayed objects on the display screen325of a Web browser or the like based on an HTML document generated by the generation program—and finishes processing (S210).

On the other hand, when operating the server machine20in the test mode (S200: YES), the program translator210acquires a specification program such as a JSP program from the program database200according to an HTTP request received from the client machine30and translates it into a generation program (S220).

The control flow graph generator220generates a control flow graph which represents an execution flow of a plurality of generating commands executed in sequence in the generation program resulting from the translation (S225). On the other hand, the data flow graph generator230generates a data flow graph which indicates what other command should use data generated by one command in the generation program resulting from the translation.

Then, the buffer stopper240stops the buffer235from storing document components because the operation mode switching unit310has set the operation mode to the test mode (S230). Consequently, each time a document component is generated by the generation program, the buffer stopper240outputs it as part of the document information. The function identification information collector250inserts a filter function in an output function to collect function identification information that associates document components with output functions and generating commands (S240).

The correspondence information generator260executes the generation program received from the function identification information collector250to generate document information. Then, the correspondence information generator260generates correspondence information which indicates correspondence between the generating commands and respective document components generated by the generating commands (S250). Incidentally, according to this example, the correspondence information generator260generates correspondence information about all the document components generated by the generation program. Alternatively, the correspondence information generator260may generate correspondence information about the document components which satisfy a predetermined condition. The predetermined condition here may be that the document component is output on predetermined lines in the document information or that the document component matches a predetermined character string. In that case, the correspondence information generator260can reduce the time required to execute the generation program.

The information processing system10repeats the above sequence of operations each time the client machine30sends a Web page display request to the server machine20.

FIG. 3shows a conceptual diagram of operation of the information processing system10. With reference to the figure, generation and selection of document components will be described in more detail. The program translator210compiles a JSP program, and thereby translates it into a servlet program (S300). Then, the program translator210generates JSP-servlet correspondence information365which associates a plurality of specification commands in the JSP program with respective generating commands translated from the specification commands (S310).

The control flow graph generator220generates a control flow graph of the generation program resulting from the translation (S320). On the other hand, the data flow graph generator230generates a data flow graph in the generation program resulting from the translation.

As preparation for execution of the generation program (S325), the buffer stopper240sets the size of the output buffer used by the generation program to ‘0’ and thereby stops the buffer235from storing the output from the generation program. On the other hand, the function identification information collector250inserts a filter function in the generation program to collect function identification information that associates document components with the generating commands which have generated the document components.

The correspondence information generator260executes the generation program received from the function identification information collector250, together with a library group as required, and thereby generates document information such as an HTML document (S330).

Then, the correspondence information generator260generates correspondence information which indicates correspondence between the generating commands and respective document components generated by the generating commands.

To take an example, if the generation program is written in the Javaòlanguage, by inserting the process of generating exceptions in monitor functions, the function identification information collector250collects stack trace information370which represents the hierarchical structure of functions at the time when each document component is output (S340). Also, the function identification information collector250collects function identification information by associating the generating commands contained in the stack trace information370with the document component which is output when the stack trace information370is generated.

Consequently, the correspondence information generator260can generate correspondence information which indicates correspondence between generating commands and document components: for example, servlet-HTML correspondence information380(S350). Preferably, by combining the JSP-servlet correspondence information365and servlet-HTML correspondence information380, the correspondence information generator260further generates information which indicates correspondence between a plurality of generating commands in the JSP program and respective servlet programs generated by the generating commands.

The selector340selects one of the document components according to instructions from the user. For example, the document structure information output unit322generates document structure information which indicates the structure of an HTML document (S355) and the selector340selects a document component by allowing the user to specify a piece of information in the document structure information.

More specifically, tag information in the HTML document may be external tag information that further contains internal tag information in contents information whose display format is specified by the external tag information. In that case, the document structure information output unit322generates document structure information (e.g., HTML-DOM-TREE) which is a tree-structured graph with the external tag information represented as a root node and the internal tag information represented as a leaf node of the root node. Furthermore, if the contents information whose display format is specified by the internal tag information further contains internal tag information, the document structure information output unit322expresses the latter internal tag information as a leaf node of a leaf node. To take an example, the document structure information output unit322may generate structure information which describes the syntactic structure of the HTML document. Then, by allowing the user to specify a node in the document structure information thus generated, the selector340selects the tag information which corresponds to the specified node.

FIG. 4is a diagram illustrating details of specification commands to be translated by the program translator210. The figure shows correspondence between types and meanings of specification commands in a JSP program, which is a type of specification program. The program translator210classifies a statement, such as an HTML tag, which is described simply as text data into a “Text” type of specification command. Also, the program translator210classifies a statement which begins with tag information ‘<%=’ and ends with ‘%>’ into an “Expression” type of specification command.

Also, the program translator210classifies a statement which begins with tag information ‘<%’ and ends with ‘%>’ into a “Scriptlet” type of specification command. Also, the program translator210classifies a declaration which specifies a taglib (tag library) and encoding into a “JSP Directive” type of specification command. Also, the program translator210classifies tag information which manipulates JavaòBeans and the like into a “JSP Tag” type of specification command. Also, the program translator210classifies a statement which describes a taglib into a “Tag Library” type of specification command.

In this way, the program translator210classifies specification commands according to predetermined rules. The program translator210generates the JSP-servlet correspondence information365which indicates what generating command each classified command has been translated into.

FIG. 5(a) shows a first example of a configuration file which specifies how the function identification information collector250should insert a filter function. If the generation program is a servlet program, the function identification information collector250inserts the filter function by adding the description shown inFIG. 5(a) to the web.xml file that sets up the execution environment in which the servlet program is executed. More specifically, the function identification information collector250inserts the filter function's name referenced in the web.xml file between the <filter-name> tag and </filter-name> tag.

Also, the function identification information collector250inserts the class name of the filter function between the <filter-name> tag and </filter-name> tag. This description states that the information processing system10calls a predetermined method in the ObserverFilter class each time it executes an output function of the generation program.

Also, the function identification information collector250inserts the name of the function into which the filter function is inserted, between the <servlet-name> tag and </servlet-name> tag. For example, ‘/*’ inFIG. 5(a) indicates that the filter function should be inserted in all the JSP programs, Servlet programs, and the like in the Web application specified by the web.xml file. Alternatively, the function identification information collector250may insert the storage location (e.g., URL: Uniform Resource Locator) of the function into which the filter function is inserted, between the <url-pattern> tag and </url-pattern> tag.

In this way, the function identification information collector250inserts the filter function which is executed each time the generation program is executed, by associating it with the function in the generation program into which the filter function is inserted.

FIG. 5(b) shows a second example of a configuration file which specifies how the function identification information collector250should insert a filter function. Specifically,FIG. 5(b) shows a configuration file which specifies how the function identification information collector250should insert a filter function in an integration program that displays, on a browser screen, a plurality of partial contents generation programs which operate independently of each other. To take an example, the integration program and partial contents generation programs may be compliant with the JavaòPortal API. Specifically, they have been implemented as WebSphere Portal Server by the International Business Machines Corporation. In this case, the integration program, for example, is a Portal program and the partial contents generation programs, for example, are Portlet programs.

FIG. 5(c) shows a third example of a configuration file which specifies how the function identification information collector250should insert a filter function. Specifically,FIG. 5(c) shows a configuration file which specifies how the function identification information collector250should insert a filter function in the partial contents generation programs which create displays, being integrated by the integration program.

In this way, the function identification information collector250inserts the filter function by a different and appropriate method according to the concrete form of the generation program. Then, the function identification information collector250describes, in the inserted filter function, the process of executing a monitor function which monitors document components to be monitored instead of executing the output function of the generation program. Since the monitor function associates the document components with generating commands, the information processing system10can identify the document component generated by a generating command each time the generating command is executed.

Instead of the example inFIG. 5(c), the function identification information collector250may identify a generation program or specification program which will serve as a starting point upon receiving a display request from the user, and may specify in web.xml that the filter function will be executed after the display request is received from the user, but before the generation program is executed. Specifically, the function identification information collector250identifies the generation program or specification program which will serve as a starting point upon receiving the display request from the user, by analyzing the structures of the directories in which generation programs, specification program, and web.xml files reside. In that case, even if the information processing system10does not have filter processing capability to execute a predetermined program before running various programs, a monitor function can be executed instead of an output function.

As still another example, the function identification information collector250may add the capabilities of the monitor function to the output function of the generation program. For example, if the generation program is written in the Javaòlanguage, the function identification information collector250may implement a ServletResponse class or JspWriter class to add the capabilities of the monitor function. Then, even if the information processing system10does not have filter processing capability, it can generate correspondence information without analyzing the starting point of execution at which a display request is received from the user.

FIG. 6(a) shows a first example of the stack trace information370. Specifically, it shows an example of the stack trace information370produced by the function identification information collector250when a servlet program which is a generation program is translated from a JSP program which is a specification program. In the first line, the function identification information collector250outputs, as the stack trace information370, information to the effect that an exception occurred in the Javaòlanguage. Also, in the second line, the function identification information collector250outputs information to the effect that the name of the monitor function which caused the exception is ObserverPrintWriter.write and that the monitor function is described in the 94th line of an ObserverPrintWriter.java file.

Furthermore, the function identification information collector250outputs information to the effect that the name of the function that has called the monitor function is org.apache.jasper.runtime.JspWriterImpl.write, as the stack trace information370in the third line. Also, the function identification information collector250outputs the name of the file in which the function is described and the line number of the line which contains the description of the function in the file.

Similarly, the function identification information collector250displays the structure of the functions called until the monitor function is called, as the stack trace information370. Then, the function identification information collector250identifies functions beginning with the function which called the monitor function and ending with a predetermined function org.apachejasper.runtime.HttpJasBase.service which starts the generation program, as the hierarchical structure of functions which have called the output function. For example, according to the stack trace information370shown inFIG. 6(a), the function identification information collector250can identify that the generating command which calls the output function is described in the 124th line of a generation program date$jsp.java.

FIG. 6(b) shows a second example of the stack trace information370. Specifically, it shows an example of the stack trace information370produced when a servlet program which is a generation program is not translated from a JSP program which is a specification program. In the first line, the function identification information collector250outputs, as the stack trace information370, information to the effect that an exception occurred in the Javaòlanguage. Also, in the second line, the function identification information collector250outputs information to the effect that the name of the monitor function which caused the exception is ObservedPrintWriter.write and that the monitor function is described in the 83rd line of an ObservedPrintWriter.java file.

Furthermore, the function identification information collector250outputs information to the effect that the name of the function that has called the monitor function is java.io.PrintWriter.print, as the stack trace information370. Similarly, the function identification information collector250displays the hierarchical structure of the functions called until the monitor function is called, as the stack trace information370. Then, the function identification information collector250identifies functions beginning with the function which called the monitor function and ending with a predetermined function javax.servlet.http.HttpServlet.service which starts the generation program, as the hierarchical structure of functions which have called the monitor function. For example, according to the stack trace information370shown inFIG. 6(b), the function identification information collector250can identify that the generating command which calls the output function is described in the 125th line of a generation program SnoopServlet.java.

FIG. 7(a) shows an HTML document, which is an example of document information. The HTML document shown in the figure is an example of a tagged document and contains contents information700to be shown to the viewer of the document information, tag information710which specifies the display format of the contents information700, and a document component730. For example, the contents information700is displayed directly on the display screen325of a Web browser or the like while the tag information710instructs the Web browser or the like to itemize the contents information700.

Thus, inFIG. 7(a), the tag information is provided as HTML tags for the HTML document, beginning with the symbol ‘<’ and ending with ‘>.’ Alternatively, the tag information may be part of an HTML tag or an HTML option which controls details of the display format of contents information. As an example, description will be given of the following HTML document which displays an image with a file name ‘photo.gif.’

In this example, the tag information may be ‘<IMG’ and ‘>,’ an HTML tag which indicates that an image will be displayed or it may be ‘<,’ part of the HTML tag. Alternatively, the tag information may be ‘alt=″″,’ an HTML option which specifies information to be displayed instead of images in the absence of any image file or it may be ‘″″,’ which is an attribute value. In other words, the tag information may be a tag name, tag attribute, attribute value, or other information which indicates part of HTML tag description.

FIG. 7(b) shows an example of the stack trace information370obtained when the document component730shown inFIG. 7(a) is generated. For example, the function identification information collector250identifies based on the stack trace information370that the generating command which generates the document component730is the command described in the 124th line of the date$jspjava file.

FIG. 7(c) shows an example of the generating command which generates the document component730shown inFIG. 7(a). A generating command740is called in the 124th line of the date$jsp.java file. Incidentally, the program translator210generates, in the 123th line, information which identifies the specification command from which the generating command740is translated as a comment statement irrelevant to the generating command.FIG. 7(c) shows an example in which the program translator210is a Jasper or other JSP compiler. The figure indicates that the specification command translated into the generating command740is described in the range from the 62nd column in the 20th line to the 14th column in the 21st line of a JSP program named /jsp/dates/data.jsp.

FIG. 7(d) shows an example of the specification command translated into the generating command shown inFIG. 7(c). A JSP program which is an example of a specification program has a specification command ‘<li> Day:is’ which indicates the content to be displayed as an HTML document and a specification command ‘<jsp:getProperty name=“lock” property=“day”>’ which indicates the content to be generated as the HTML document. In this way, at least part of the content to be displayed as an HTML document may be contained in the JSP program.

A specification command in a JSP program is smaller in size than a generating command in the generation program into which the JSP program is translated. For example, ‘<li> Day:is’ which is underlined inFIG. 7(d) is smaller in size than the generating command740underlined inFIG. 7(c).

FIG. 7(d) shows the 20th and 21st line of the JSP program named /jsp/dates/data.jsp. As shown inFIG. 7(c), the specification command translated into the generating command740is described in the range from the 62nd column in the 20th line to the 14th column in the 21 st line of a JSP program named /jsp/dates/data.jsp inFIG. 7(d).

As shown inFIG. 7(d), the program translator210inserts information which indicates correspondence between the specification commands of a JSP program and the generating commands of a servlet program into the servlet program as a comment statement. Consequently, the correspondence information generator260can output correspondence information which associates document components with specification commands based on the comment statements in the stack trace information370and servlet program.

Alternatively, the function identification information collector250may collect document components and specification commands which specify contents of the document components by associating them with each other in the stack trace information370. Specifically, depending on the implementation method of processes which execute servlet programs and implementation method of the program translator210, information which indicates the location of a specification command such as date.jsp:21may be available in the stack trace information370instead of date$jsp.java:124shown inFIG. 7(b). In that case, the program translator210does not need to generate the comment statement shown inFIG. 7(c).

FIG. 8shows a display example of the display screen325. The display screen325has a trace window800which shows what generating command is being executed by a generation program, value window810which shows the values of variables used by the generation program, editor window820which shows a plurality of generating commands contained in the generation program, outline window830which lists files containing programs used for execution of the generation program, browser window840which shows displayed objects displayed by an HTML document generated by the generation program, and task window850which displays displayed objects difficult for the user to recognize. The browser window840may display HTML-DOM-TREE or the HTML document together with the displayed objects.

In this way, the display unit320displays the displayed objects presented by the generation program and HTML document on the display screen325. The selector340allows the user to specify some of the displayed objects presented in the browser window840on the display screen325. Then, the selector340selects the contents information and tag information which has caused the specified displayed object to be displayed. In response, the command information output unit350outputs information which identify the generating command which has generated the contents information and tag information selected by the selector340, for example, by highlighting the generating command in the editor window820.

As another example, the display result analyzer/detector330detects hard-to-recognize objects which do not satisfy predetermined ease-of-recognition conditions from among the displayed objects presented in the browser window840and displays information for identifying the detected hard-to-recognize objects in the task window850.

For example, when an HTML document presents displayed objects in the browser window840, the display result analyzer/detector330may carry out an accessibility check to detect whether the displayed objects are easy for the user to recognize. As an example, the display result analyzer/detector330may be implemented using a Bobby program which carries out accessibility checks on HTML documents generated by JSP programs or servlet programs (see Non-Patent Document 2). In that case, regarding the displayed objects determined by the accessibility checks to be hard to recognize, the display result analyzer/detector330displays, in the browser window840, the reasons why they are hard to recognize and line numbers of the displayed objects in the HTML document, by associating them with each other.

Then, the selector340selects the contents information and tag information which have caused the hard-to-recognize objects specified by the user out of those displayed in the task window850to be displayed in the browser window840of the display screen325. In response, the command information output unit350displays, in the editor window820, information for identifying the generating command which has generated the contents information and tag information selected by the selector340.

In this way, each time a displayed object or document component is selected, the display screen325displays the corresponding generating command on the same screen. Consequently, the author of the generation program can find errors in the generation program by pointing out errors in the displayed objects in the browser window840.

FIG. 9is a conceptual diagram of a display presented by the display screen325. When the display screen325presents displayed objects840con the browser window840, the selector340allows the user to specify one or more of the displayed objects and selects document components which correspond to the displayed objects. Alternatively, the display screen325may display HTML-DOM-TREE840ain the browser window840instead of the displayed objects840c. In that case, the selector340allows the user to specify nodes of HTML-DOM-TREE840aand thereby selects tag information indicated by the specified nodes.

The command information output unit350selects the generating command which has generated the document component selected in the above process, based on the correspondence information, and outputs it, for example, to the editor window820.

The control flow graph generator220generates a control flow graph920of the generation program in advance. Then, the command information output unit350further outputs control flow position information820ato the editor window820, with the control flow position information820aindicating the position of the generating command selected based on the correspondence information in the control flow graph920. Preferably, the command information output unit350highlights the selected generating command in the generation program as well as that part of the generating command into which control flows.

The data flow graph generator230generates a data flow graph930of the generation program in advance. Then, the command information output unit350further outputs data flow position information820bto the editor window820, with the data flow position information820bindicating the position of the generating command selected based on the correspondence information in the data flow graph930. Preferably, the command information output unit350highlights the selected generating command in the generation program as well as the part in which the command that generates the data used by the generating command is described.

In this way, the information processing system10outputs not only the generating command, but also those parts that affect the generating command, i.e., other commands which give data to the generating command and condition branching commands executed before the generating command. Consequently, the information processing system10can help the programmer understand dependencies between commands. Also, the information processing system10outputs only that part of the generation program which is directly relevant to the generating command. This allows the programmer to narrow down a problem area properly.

FIG. 10shows an exemplary hardware configuration of the server machine20. The server machine20comprises a CPU1000, RAM1020, and graphic controller1075, which are interconnected via a host controller1082; CPU peripheral which has a display device1080; communications interface1030connected to an input/output controller1084via the host controller1082; input/output device which has a hard disk drive1040and CD-ROM drive1060; ROM1010connected to the input/output controller1084; flexible disk drive1050; and legacy input/output device which has an input/output chip1070.

The host controller1082connects the RAM1020with the CPU1000and graphic controller1075which access the RAM1020at a high transfer rate. The CPU1000, which operates based on programs stored in the ROM1010and RAM1020, controls various parts. The graphic controller1075acquires image data generated by the CPU1000and the like in a frame buffer provided in the RAM1020and displays it on the display device1080. Alternatively, the graphic controller1075may incorporate a frame buffer for storing the image data generated by the CPU1000and the like.

The input/output controller1084connects the host controller1082with the communications interface1030which is a relatively high-speed input/output device as well as with the hard disk drive1040and CD-ROM drive1060. The communications interface1030communicates with other devices via a network. The hard disk drive1040stores a control program and data used by the server machine20. The CD-ROM drive1060reads a control program or data from a CD-ROM1095and provides it to the input/output chip1070via the RAM1020.

The input/output controller1084is connected with the ROM1010as well as with the flexible disk drive1050, input/output chip1070, and other relatively low-speed input/output devices. The ROM1010stores a boot program executed by the CPU1000at the startup of the server machine20, programs dependent on hardware of the server machine20, etc. The flexible disk drive1050reads a control program or data from a flexible disk1090and provides it to the input/output chip1070via the RAM1020. The input/output chip1070connects the flexible disk1090with various input/output devices, for example, via a parallel port, serial port, keyboard port, mouse port, etc.

The control program provided to the server machine20is provided by the user, being stored in a recording medium such as a flexible disk1090, CD-ROM1095, or IC card. It is read out of the recording medium, installed on the server machine20via the input/output chip1070, and run on the server machine20.

The control program installed and run on the server machine20includes a program translation module, control flow graph generating module, data flow graph generating module, buffer module, buffer stopper module, function identification information collector module, and correspondence information generating module. The operations which these modules make the server machine20perform are the same as the operations of the corresponding members in the server machine20described with reference toFIGS. 1 to 9, and thus description thereof will be omitted.

The server machine20may send the client machine30a control program for operating the client machine30so that the control program will be run on the client machine30. The control program provided to the client machine30is provided by the user, being stored in a recording medium such as a flexible disk1090, CD-ROM1095, or IC card. It is read out of the recording medium, provided to the server machine20via the input/output chip1070, and run on the client machine30.

The control program installed and run on the client machine30includes an input accepting module, operation mode switching module, display module, document structure information output module, display result analyzer/detector module, selection module, and command information output module. The operations which these modules make the client machine30perform are the same as the operations of the corresponding members in the client machine30described with reference toFIGS. 1 to 9, and thus description thereof will be omitted.

The control programs and modules described above may be stored on an external storage medium. The external storage medium may be not only the flexible disk1090or CD-ROM1095, but also an optical recording medium such as a DVD or PD, magneto-optical recording medium such as an MD, tape medium, or semiconductor memory such as an IC card. Alternatively, a hard disk or RAM installed in a server system connected to a private communications network or the Internet may be used as a recording medium and the control programs may be supplied to the server machine20and client machine30via the network.

As can be seen from the above embodiment, the information processing system10executes a servlet program for generating an HTML document and generates correspondence information which indicates correspondence between generating commands and respective document components generated by the generating commands. Then, the information processing system10selects a document component at the instruction of the user and outputs the generating command which corresponds to the document component. This allows the author of the servlet program to properly identify the generating command which corresponds to a desired document component.

Regarding a JSP program translated into a servlet program, the information processing system10also generates correspondence information which indicates correspondence between specification commands in the JSP program and respective document components. This allows the author of the JSP program to properly identify the generating command which corresponds to a desired document component. Furthermore, the information processing system10aids the programmer with his/her tasks by outputting information about the position of the identified generating command and specification command on a control flow graph or data flow graph.

The information processing system10displays an HTML document on the browser screen, allows the user to select displayed objects, and thereby selects document components. Furthermore, the information processing system10generates document structure information (e.g., HTML-DOM-TREE) which indicates the structure of the HTML document, allows the user to select nodes of a graph which represents document structure information, and thereby selects document components. This is convenient because the programmer can select an appropriate input method according to the nature of program modification.

The present invention has been described above by way of an embodiment, but the technical scope of the present invention is not limited to the scope of the embodiment described above. Various modifications or improvements can be made to the embodiment described above. It is obvious from the appended claims that results of such modifications or improvements can also be included in the technical scope of the present invention.